Updated header template
authorThierry Florac <thierry.florac@onf.fr>
Tue, 13 Nov 2018 09:23:18 +0100
changeset 216 a12caaa4299d
parent 215 78f7e033c9f4
child 217 58c9992cb4dc
child 219 b82dc95dff03
Updated header template
src/pyams_default_theme/features/header/skin/templates/simple-header.pt
--- a/src/pyams_default_theme/features/header/skin/templates/simple-header.pt	Mon Nov 12 11:42:32 2018 +0100
+++ b/src/pyams_default_theme/features/header/skin/templates/simple-header.pt	Tue Nov 13 09:23:18 2018 +0100
@@ -1,16 +1,35 @@
 <div class="header header-simple"
-	 tal:define="settings view.settings"
+	 tal:define="settings view.settings;
+				 config tales:configuration(request.root);"
 	 tal:condition="settings is not None" i18n:domain="pyams_default_theme">
 	<tal:var replace="structure provider:pyams.banner" />
-	<ul class="nav nav-pills margin-bottom-20" role="tablist">
-		<tal:loop repeat="link settings.tabs.get_visible_items(request)">
-			<li role="presentation"
-				tal:attributes="class 'active' if view.is_active(link) else ''">
-				<a tal:define="info view.get_link_info(link);
-							   href link.get_url(request);"
-				   tal:condition="href"
-				   href="${href}">${info.user_title}</a>
-			</li>
-		</tal:loop>
-	</ul>
+	<nav class="navbar"
+		 data-spy="affix" data-offset-top="150">
+		<div class="container">
+			<div class="navbar-header">
+				<button type="button" class="navbar-toggle collapsed"
+						data-toggle="collapse" data-target="#navbar-collapser"
+						aria-expanded="false">
+					<span class="sr-only" i18n:translate="">Toggle navigation</span>
+					<span class="icon-bar"></span>
+					<span class="icon-bar"></span>
+					<span class="icon-bar"></span>
+				</button>
+				<a class="navbar-brand" href="#">${i18n:config.short_title}</a>
+			</div>
+			<div class="collapse navbar-collapse" id="navbar-collapser">
+				<ul class="nav navbar-nav" role="tablist">
+					<tal:loop repeat="link settings.tabs.get_visible_items(request)">
+						<li role="presentation"
+							tal:attributes="class 'active' if view.is_active(link) else ''">
+							<a tal:define="info view.get_link_info(link);
+										   href link.get_url(request);"
+							   tal:condition="href"
+							   href="${href}">${info.user_title}</a>
+						</li>
+					</tal:loop>
+				</ul>
+			</div>
+		</div>
+	</nav>
 </div>