diff options
author | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
commit | 987124b09a32248414faf4d0d6615d43b29ac6f6 (patch) | |
tree | a549db8af723c981d3b346e855f25d6fd5ff8aa7 /templates/web/base/main_nav.html | |
parent | dbf56159e44c1560a413022451bf1a1c4cb22a52 (diff) | |
parent | a085b63ce09f87e83b75cda9b9cd08aadfe75d61 (diff) |
Merge tag 'v2.0.4' into fiksgatami-dev
Diffstat (limited to 'templates/web/base/main_nav.html')
-rw-r--r-- | templates/web/base/main_nav.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/templates/web/base/main_nav.html b/templates/web/base/main_nav.html new file mode 100644 index 000000000..31bd61af5 --- /dev/null +++ b/templates/web/base/main_nav.html @@ -0,0 +1,35 @@ +[% + SET base = ""; + SET base = c.cobrand.base_url IF admin; + + # DEFAULT would make sense here, except it treats the empty string as falsy + # and some cobrands want to set ul_class to an empty string. + SET ul_class="nav-menu nav-menu--main" UNLESS ul_class.defined; +%] +[% BLOCK navitem ~%] + <li [% liattrs %]> + [%~ IF c.req.uri.path == uri ~%] + <span [% attrs %]>[% label %]</span> + [%~ ELSE ~%] + <a href="[% base %][% uri %][% suffix IF suffix %]" [% attrs %]>[% label %]</a> + [%~ END ~%] + </li> +[%~ END %] + +[% UNLESS omit_wrapper %] + <div id="main-nav" role="navigation"> +[% END %] + + [% UNLESS hide_mysoc_link %] + <ul class="nav-menu nav-menu--mysoc"> + <li><a id="mysoc-logo" href="https://www.mysociety.org/">mySociety</a></li> + </ul> + [% END %] + + <ul class="[% ul_class %]"[% " id='" _ ul_id _ "'" IF ul_id %]> + [% INCLUDE 'main_nav_items.html' %] + </ul> + +[% UNLESS omit_wrapper %] + </div> +[% END %] |