| 
7
 | 
     1 [%
 | 
| 
 | 
     2 	labels(
 | 
| 
 | 
     3 		CollectionTitle = "Home (%name%)"
 | 
| 
 | 
     4 	);
 | 
| 
11
 | 
     5 	document.dojo.enable = 1;
 | 
| 
12
 | 
     6 	document.class.push('library');
 | 
| 
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 %]
 | 
| 
12
 | 
    40 [% MACRO Link(model,label,title) BLOCK %]<a class="$model.kind $model.protection" [% IF title %]title="$title" [% END %]href="[% GetLocationFor(model) %]">[% IconKind(model) %] [% label | html %]</a>[% END %]
 | 
| 
7
 | 
    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 %]
 | 
| 
11
 | 
    57 [% BLOCK LAYOUT;
 | 
| 
 | 
    58 	render('base', content = content);
 | 
| 
 | 
    59 END %]
 | 
| 
 | 
    60 [% WRAPPER LAYOUT %]
 | 
| 
12
 | 
    61 <div id="content-expando" style="float: right; height: 10px; width: 0px;overflow: hidden;"> </div>
 | 
| 
7
 | 
    62 <div class="library-pane">
 | 
| 
 | 
    63 	
 | 
| 
 | 
    64 	<div id="toc-nav" class="nav-pane left">
 | 
| 
 | 
    65 		[% IF model.isa(CollectionClass) %]
 | 
| 
 | 
    66 			
 | 
| 
 | 
    67 			<ul class="dox-nav-menu">
 | 
| 
 | 
    68 				<li class="last"><a href="$coll.location" title="$coll.model.description">[% CollectionTitle( name = coll.model.name) %]</a></li>
 | 
| 
 | 
    69 				[% Members(model) %]
 | 
| 
 | 
    70 			</ul>
 | 
| 
 | 
    71 		[% ELSE %]
 | 
| 
 | 
    72 			[%
 | 
| 
 | 
    73 				parents = model.GetParents({ kind = { '-not_in' = [ 'file', 'dir' ] } });
 | 
| 
 | 
    74 				parents.push(model) IF model.isa(CompoundClass);
 | 
| 
 | 
    75 			%]
 | 
| 
 | 
    76 			<ul class="dox-nav-menu">
 | 
| 
 | 
    77 				<li [% IF !parents.size %]class="last"[% END %]><a href="$coll.location" title="$coll.model.description">[% CollectionTitle( name = coll.model.name) %]</a></li>
 | 
| 
 | 
    78 			[% FOREACH parent IN parents %]
 | 
| 
12
 | 
    79 				<li [% IF loop.last %]class="last"[% END %]>
 | 
| 
 | 
    80 					[% Link(parent, parent.shortName, parent.canonicalName) %]
 | 
| 
 | 
    81 				</li>
 | 
| 
7
 | 
    82 			[% END %]
 | 
| 
 | 
    83 			</ul>
 | 
| 
12
 | 
    84 			[%- Members(model) %]
 | 
| 
7
 | 
    85 		[% END %]
 | 
| 
 | 
    86 	</div>
 | 
| 
 | 
    87 	<div id="siblings-nav" class="nav-pane right">
 | 
| 
 | 
    88 		[% CompoundSiblings(model) %]
 | 
| 
 | 
    89 	</div>
 | 
| 
 | 
    90 	<div id="content-pane" class="content-pane">
 | 
| 
 | 
    91 		$content
 | 
| 
12
 | 
    92 		<div style="clear:both;"></div>
 | 
| 
7
 | 
    93 	</div>
 | 
| 
12
 | 
    94 	
 | 
| 
7
 | 
    95 	<script type="text/javascript">
 | 
| 
12
 | 
    96 		require(['implab/sticky','dojo/on', 'dojo/dom-geometry', 'dojo/dom-style'],function(sticky,on,g,css) {
 | 
| 
 | 
    97 			sticky('toc-nav',{ along: 'content-pane', alongContent: true });
 | 
| 
 | 
    98 			sticky('siblings-nav', { along: 'content-pane', stick: 'right', alongContent: true });
 | 
| 
 | 
    99 			
 | 
| 
 | 
   100 			var sfn = function() {
 | 
| 
 | 
   101 				var h = window.innerHeight;
 | 
| 
 | 
   102 				
 | 
| 
 | 
   103 				var header = g.position('header');
 | 
| 
 | 
   104 				
 | 
| 
 | 
   105 				var expand = h - header.h - 10; // windowHeight - headerHeight - contentBottomPadding
 | 
| 
 | 
   106 				
 | 
| 
 | 
   107 				if (expand < 0)
 | 
| 
 | 
   108 					expand = 0;
 | 
| 
 | 
   109 				
 | 
| 
 | 
   110 				css.set('content-expando', 'height', expand + 'px');
 | 
| 
 | 
   111 			};
 | 
| 
 | 
   112 			sfn();
 | 
| 
 | 
   113 			on(window,'resize',sfn);
 | 
| 
7
 | 
   114 		});
 | 
| 
 | 
   115 	</script>
 | 
| 
8
 | 
   116 </div>
 | 
| 
11
 | 
   117 [% END %] |