7
|
1 [%
|
|
2 labels(
|
|
3 CollectionTitle = "Home (%name%)"
|
|
4 );
|
8
|
5 document.postRender.push('dojo');
|
|
6
|
7
|
7 document.css.push(css.library);
|
|
8
|
|
9 CollectionClass = 'Benzin::Doxygen::Model::Collection';
|
|
10 CompoundClass = 'Benzin::Doxygen::Model::Compound';
|
|
11 MemberClass = 'Benzin::Doxygen::Model::Member';
|
|
12
|
|
13 Icons = {
|
|
14 namespace = 'NS',
|
|
15 class = 'C',
|
|
16 variable = 'Var',
|
|
17 function = 'F',
|
|
18 property = 'P',
|
|
19 interface = 'I',
|
|
20 struct = 'S',
|
|
21 enum = 'E',
|
|
22 event = 'Ev'
|
|
23 };
|
|
24
|
|
25 NullIcon = ' ';
|
|
26
|
|
27 coll = resource.Seek('doxygenCollection');
|
|
28
|
|
29 compounds = coll.location.compounds;
|
|
30 members = resource.Seek('compound').location || coll.location.members;
|
|
31
|
|
32 document.title = model.canonicalName;
|
|
33
|
|
34 MACRO GetLocationFor(model) BLOCK;
|
|
35 members.Child(model.doxId) IF model.isa(MemberClass);
|
|
36 compounds.Child(model.doxId) IF model.isa(CompoundClass);
|
|
37 END;
|
|
38 %]
|
|
39 [% MACRO IconKind(model) BLOCK %]<span class="icon">[% Icons.item(model.kind) || NullIcon %]</span>[% END %]
|
|
40 [% MACRO Link(model,label,title) BLOCK %]<a class="$model.kind $model.protection" [% IF title %]title="$title" [% END %]href="[% GetLocationFor(model) %]">[% IconKind(model) %] $label</a>[% END %]
|
|
41 [% MACRO CompoundSiblings(model) BLOCK %]
|
|
42 [% compound = model.isa(MemberClass) ? model.compound : model %]
|
|
43 <ul class="members">
|
|
44 [% FOREACH item IN compound.GetSiblings({ kind = { '-not_in' = [ 'file', 'dir' ] } }) %]
|
|
45 <li [% IF item.doxId == compound.doxId %]class="active"[% END %]>[% Link(item,item.shortName, item.canonicalName) %]</li>
|
|
46 [% END %]
|
|
47 </ul>
|
|
48 [% END %]
|
|
49 [% MACRO Members(model) BLOCK %]
|
|
50 [% compound = model.isa(MemberClass) ? model.compound : model %]
|
|
51 <ul class="members">
|
|
52 [% FOREACH item IN compound.GetMembers({ kind = { '-not_in' = [ 'file', 'dir' ] } }) %]
|
|
53 <li [% IF item.doxId == model.doxId %]class="active"[% END %]>[% Link(item,item.shortName, item.canonicalName) %]</li>
|
|
54 [% END %]
|
|
55 </ul>
|
|
56 [% END %]
|
8
|
57 [% BLOCK LAYOUT %]
|
7
|
58 <div class="library-pane">
|
|
59
|
|
60 <div id="toc-nav" class="nav-pane left">
|
|
61 [% IF model.isa(CollectionClass) %]
|
|
62
|
|
63 <ul class="dox-nav-menu">
|
|
64 <li class="last"><a href="$coll.location" title="$coll.model.description">[% CollectionTitle( name = coll.model.name) %]</a></li>
|
|
65 [% Members(model) %]
|
|
66 </ul>
|
|
67 [% ELSE %]
|
|
68 [%
|
|
69 parents = model.GetParents({ kind = { '-not_in' = [ 'file', 'dir' ] } });
|
|
70 parents.push(model) IF model.isa(CompoundClass);
|
|
71 %]
|
|
72 <ul class="dox-nav-menu">
|
|
73 <li [% IF !parents.size %]class="last"[% END %]><a href="$coll.location" title="$coll.model.description">[% CollectionTitle( name = coll.model.name) %]</a></li>
|
|
74 [% FOREACH parent IN parents %]
|
|
75 <li [% IF loop.last %]class="last"[% END %]>[% Link(parent, parent.shortName, parent.canonicalName) %]</li>
|
|
76 [% END %]
|
|
77 [% Members(model) %]
|
|
78 </ul>
|
|
79 [% END %]
|
|
80 </div>
|
|
81 <div id="siblings-nav" class="nav-pane right">
|
|
82 [% CompoundSiblings(model) %]
|
|
83 </div>
|
|
84 <div id="content-pane" class="content-pane">
|
|
85 $content
|
|
86 </div>
|
|
87 <script type="text/javascript">
|
|
88 require(['implab/sticky'],function(sticky) {
|
|
89 sticky('toc-nav',{ along: 'content-pane' });
|
|
90 sticky('siblings-nav', { along: 'content-pane' });
|
|
91 });
|
|
92 </script>
|
8
|
93 </div>
|
|
94 [% END %]
|
|
95 [% WRAPPER LAYOUT;
|
|
96 render('base', content = content);
|
|
97 END %] |