diff options
author | Pavel Grunt <pgrunt@redhat.com> | 2015-10-21 10:33:01 +0200 |
---|---|---|
committer | Pavel Grunt <pgrunt@redhat.com> | 2015-10-21 10:34:38 +0200 |
commit | 7f710febfb22fca24aa112475e81eb01f6e147da (patch) | |
tree | 06bab0bd6e43f830ce58e2efc60e1a6953d59e96 /spice-space | |
parent | c5228cab55dbcba8f9a76f3a33d0da9021102309 (diff) |
template: Add support for submenus
Diffstat (limited to 'spice-space')
-rw-r--r-- | spice-space/static/css/main.css | 6 | ||||
-rw-r--r-- | spice-space/templates/base.html | 6 | ||||
-rw-r--r-- | spice-space/templates/page.html | 11 |
3 files changed, 21 insertions, 2 deletions
diff --git a/spice-space/static/css/main.css b/spice-space/static/css/main.css index 28ce93f..e3bcb6c 100644 --- a/spice-space/static/css/main.css +++ b/spice-space/static/css/main.css @@ -282,6 +282,12 @@ img.left, figure.left {float: left; margin: 0 2em 2em 0;} text-decoration: underline; } +#content nav li { + display: inline; + margin-top: 4px; + margin-right: 10px; +} + /* Extras *****************/ diff --git a/spice-space/templates/base.html b/spice-space/templates/base.html index c3d4834..d1e6552 100644 --- a/spice-space/templates/base.html +++ b/spice-space/templates/base.html @@ -25,11 +25,13 @@ <input type="hidden" name="sitesearch" value="spice-space.org"/> </form> </div> - <nav><ul> + <nav> + <ul> {% for title, link in MENUITEMS %} <li><a href="{{ SITEURL }}/{{ link }}">{{ title }}</a></li> {% endfor %} - </ul></nav> + </ul> + </nav> <div class="gradient"/> </header><!-- /#banner --> {% block content %} diff --git a/spice-space/templates/page.html b/spice-space/templates/page.html index 0d8283f..670f061 100644 --- a/spice-space/templates/page.html +++ b/spice-space/templates/page.html @@ -3,6 +3,17 @@ {% block content %} <section id="content" class="body"> <h1 class="entry-title">{{ page.title }}</h1> + {% if page.submenu and SUBMENUS[page.submenu] %} + <div> + <nav> + <ul> + {% for title, link in SUBMENUS[page.submenu] %} + <li><a href="{{ SITEURL }}/{{ link }}">{{ title }}</a></li> + {% endfor %} + </ul> + </nav> + </div> + {% endif %} {% import 'translations.html' as translations with context %} {{ translations.translations_for(page) }} {{ page.content }} |