diff options
author | David Runge <dave@sleepmap.de> | 2015-04-03 05:10:25 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2015-04-03 05:10:25 +0200 |
commit | 8ef86b3be4c38116540b99bf4cac71b892e282d2 (patch) | |
tree | ee8437eb93c6cd7e88396f964af8f9ee3a7f9967 | |
parent | 76839ecd66f6aa393fd75f2d1db53b72c4779053 (diff) | |
download | sleepmap-8ef86b3be4c38116540b99bf4cac71b892e282d2.tar.gz sleepmap-8ef86b3be4c38116540b99bf4cac71b892e282d2.tar.bz2 sleepmap-8ef86b3be4c38116540b99bf4cac71b892e282d2.tar.xz sleepmap-8ef86b3be4c38116540b99bf4cac71b892e282d2.zip |
sleepmap-theme/templates/base.html: Adding a submenu, that derives from children of pages (that have children).
-rw-r--r-- | sleepmap-theme/templates/base.html | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/sleepmap-theme/templates/base.html b/sleepmap-theme/templates/base.html index 8026b78..7385cfc 100644 --- a/sleepmap-theme/templates/base.html +++ b/sleepmap-theme/templates/base.html @@ -13,25 +13,38 @@ <body id="index" class="home"> <header id="banner" class="body"> <h1><a href="{{ SITEURL }}/index.html">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1> - <nav><ul> - {% for title, link in MENUITEMS %} - <li><a href="{{ link }}">{{ title }}</a></li> - {% endfor %} - {% if DISPLAY_PAGES_ON_MENU != False %} - {% for p in PAGES %} - <li {% if p == page %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li> - {% endfor %} - {% endif %} - <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL }}">Archives</a></li> - {#{% for cat, null in categories %} - <li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li> - {% endfor %}#} - </ul></nav> + <nav> + <ul> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% if DISPLAY_PAGES_ON_MENU != False %} + {% for p in PAGES %} + {% if p.title == "Projects" or p.title == "Music" or p.title == "Installations" %} + <li {% if p == page %}class="active"{% endif %}> + <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a> + <ul> + {% for child in p.children %} + <li {% if child == page %}class="active"{% endif %}> + <a href="{{ SITEURL }}/{{ child.url }}">{{ child.title }}</a> + </li> + {% endfor %} + </ul> + </li> + {% endif %} + {% endfor %} + {% endif %} + <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL }}">Archives</a></li> + {#{% for cat, null in categories %} + <li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li> + {% endfor %}#} + </ul> + </nav> </header><!-- /#banner --> - + {% block content %} {% endblock %} - + <aside id="sidebar"> <div class="widget"> <h2>Categories</h2> @@ -66,7 +79,7 @@ </div><!-- /.social --> {% endif %} </aside><!-- /#sidebar --> - + <footer id="footer" class="body"> <address id="about" class="vcard body"> <p> © Sleep Map 2015 </p> |