diff options
author | EuAndreh <eu@euandre.org> | 2020-02-15 00:39:14 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-02-15 00:39:14 -0300 |
commit | 4cbc208f49a12849216aeb6b344b345d8df52b03 (patch) | |
tree | e775574f15c0051b7b0a4af800d6155f66116398 /_layouts/default.html | |
parent | Merge branch 'master' into wip (diff) | |
parent | Fix navigation bar links to Atom feeds (diff) | |
download | euandre.org-4cbc208f49a12849216aeb6b344b345d8df52b03.tar.gz euandre.org-4cbc208f49a12849216aeb6b344b345d8df52b03.tar.xz |
Merge branch 'master' into wip
Diffstat (limited to '')
-rw-r--r-- | _layouts/default.html | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/_layouts/default.html b/_layouts/default.html index 1ff8c1d..6a0587b 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -28,25 +28,25 @@ <a href="{{ site.t.home_url[page.lang] }}">{{ site.t.home[page.lang] }}</a> </div> <div id="nav-right"> - <ul> - {% if page.ref != nil %} - {% assign lposts=site.posts | where:"ref", page.ref | sort: 'lang' %} - {% for lpost in lposts %} - <li> - <a href="{{ lpost.url }}" class="{{ lpost.lang }}">{{ lpost.lang }}</a> - </li> - {% endfor %} - {% endif %} + {% if page.ref != nil %} + {% if site.posts.size > 0 or site.pages.size > 0 %} + <ul> + {% assign lposts=site.posts | where:"ref", page.ref | sort: 'lang' %} + {% for lpost in lposts %} + <li> + <a href="{{ lpost.url }}" class="{{ lpost.lang }}">{{ lpost.lang }}</a> + </li> + {% endfor %} - {% if page.ref != nil %} - {% assign lpages=site.pages | where:"ref", page.ref | sort: 'lang' %} - {% for lpage in lpages %} - <li> - <a href="{{ lpage.url }}" class="{{ lpage.lang }}">{{ lpage.lang }}</a> - </li> - {% endfor %} + {% assign lpages=site.pages | where:"ref", page.ref | sort: 'lang' %} + {% for lpage in lpages %} + <li> + <a href="{{ lpage.url }}" class="{{ lpage.lang }}">{{ lpage.lang }}</a> + </li> + {% endfor %} + </ul> {% endif %} - </ul> + {% endif %} <a href="{{ site.t.about_url[page.lang] }}">{{ site.t.about[page.lang] }}</a> <a href="{{ site.t.feed_url[page.lang] }}"> @@ -57,7 +57,7 @@ </header> <main> - <h1>{{ page.title }}</h1> + {% if page.title %}<h1>{{ page.title }}</h1>{% endif %} {{ content }} </main> |