aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Mayer <entroP@gmail.com>2016-06-11 22:34:23 +0200
committerGitHub <noreply@github.com>2016-06-11 22:34:23 +0200
commit83265b06c516684c6646237f7a0f57b88fd76624 (patch)
tree249f3a925140ed71667e6a653dd7e150cd08919a
parentccb8efc064dff0cc24fe715d8f83e33e061c64de (diff)
parent77af0b69c30fe5c23e72b3ec0a1e362c140968f0 (diff)
downloadpelican-themes-83265b06c516684c6646237f7a0f57b88fd76624.zip
pelican-themes-83265b06c516684c6646237f7a0f57b88fd76624.tar.gz
pelican-themes-83265b06c516684c6646237f7a0f57b88fd76624.tar.bz2
Merge pull request #402 from LutzCle/pelican-bootstrap3-mod
pelican-bootstrap3: hide certain elements if empty
-rw-r--r--pelican-bootstrap3/templates/base.html4
-rw-r--r--pelican-bootstrap3/templates/page.html2
2 files changed, 6 insertions, 0 deletions
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html
index 610d050..1ad6611 100644
--- a/pelican-bootstrap3/templates/base.html
+++ b/pelican-bootstrap3/templates/base.html
@@ -105,12 +105,14 @@
<div class="navbar {% if BOOTSTRAP_NAVBAR_INVERSE %}navbar-inverse{% else %}navbar-default{% endif %} navbar-fixed-top" role="navigation">
<div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
<div class="navbar-header">
+ {% if MENUITEMS or (PAGES and DISPLAY_PAGES_ON_MENU) or (categories and DISPLAY_CATEGORIES_ON_MENU) %}
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
+ {% endif %}
<a href="{{ SITEURL }}/" class="navbar-brand">
{% if SITELOGO %}<img src="{{ SITEURL }}/{{ SITELOGO }}" width="{{ SITELOGO_SIZE }}"/> {% endif %}
{% if not HIDE_SITENAME %}{{ SITENAME }}{% endif %}
@@ -144,7 +146,9 @@
</form></span>
</li>
{% endif %}
+ {% if ARCHIVES_SAVE_AS %}
<li><a href="{{ SITEURL }}/{{ ARCHIVES_URL | default('archives.html') }}"><i class="fa fa-th-list"></i><span class="icon-label">Archives</span></a></li>
+ {% endif %}
</ul>
</div>
<!-- /.navbar-collapse -->
diff --git a/pelican-bootstrap3/templates/page.html b/pelican-bootstrap3/templates/page.html
index f8757fa..c4d35ee 100644
--- a/pelican-bootstrap3/templates/page.html
+++ b/pelican-bootstrap3/templates/page.html
@@ -46,7 +46,9 @@
{% block content %}
<section id="content" class="body">
+ {% if page.title %}
<h1 class="entry-title">{{ page.title }}</h1>
+ {% endif %}
{% import 'includes/translations.html' as translations with context %}
{{ translations.translations_for(page) }}
{% if PDF_PROCESSOR %}