danielmochdotcom

Nikola site for www.danielmoch.com
git clone git://git.danielmoch.com/danielmochdotcom.git
Log | Files | Refs

commit 9220de53a0021550bb60020b10be65377f22c2e1
parent 97e6ed3153835e38e24ff1394277f919c7f48c3c
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri, 19 Oct 2018 23:03:52 -0400

Add Page Source link

Diffstat:
Mthemes/djmoch/assets/site.css | 16+++++++---------
Mthemes/djmoch/templates/base.tmpl | 15+++++++++------
Mthemes/djmoch/templates/page.tmpl | 8++++++++
Mthemes/djmoch/templates/post.tmpl | 8++++++++
4 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/themes/djmoch/assets/site.css b/themes/djmoch/assets/site.css @@ -82,15 +82,13 @@ body { margin-bottom: 1em; } -/* Tags */ -.postpromonav { - border-bottom: 1px solid #4F5151; - border-top: 1px solid #4F5151; - margin-top: 1em; - padding: .5em 0; -} -.postpromonav .tags { - text-align: center; +.no-padding +{ + padding: 0; +} +.no-margin +{ + margin: 0; } .metadata p:before, .postpromonav .tags li:before, diff --git a/themes/djmoch/templates/base.tmpl b/themes/djmoch/templates/base.tmpl @@ -18,12 +18,15 @@ <header class="banner"> <div class="container no-padding"> <h1 class="banner-title">Daniel Moch</h1> - <nav class="banner-subtitle"> - <li><a href="/">Home</a></li> - <li><a href="/projects">Projects</a></li> - <li><a href="https://git.danielmoch.com">Git</a></li> - <li><a href="/blog">Blog</a></li> - {% block nav %}{% endblock %} + <nav class="col-xs-12 col-md-6 banner-subtitle" style="display: flex;"> + <ul class="no-margin no-padding" style="margin-right: auto;"> + <li><a href="/">Home</a></li> + <li><a href="/projects">Projects</a></li> + <li><a href="https://git.danielmoch.com">Git</a></li> + <li><a href="/blog">Blog</a></li> + {% block nav %}{% endblock %} + </ul> + {% block nav_extra %}{% endblock %} </nav> </div> </header> diff --git a/themes/djmoch/templates/page.tmpl b/themes/djmoch/templates/page.tmpl @@ -1,5 +1,13 @@ {% extends 'base.tmpl' %} +{% block nav_extra %} +{% if show_sourcelink %} +<ul class="no-margin no-padding" style="text-align: right;"> + <li><a href="{{ post.source_link() }}">Page Source</a></li> +</ul> +{% endif %} +{% endblock %} + {% block content %} {{ post.text() }} {% endblock %} diff --git a/themes/djmoch/templates/post.tmpl b/themes/djmoch/templates/post.tmpl @@ -4,6 +4,14 @@ <link rel="canonical" href="https://www.danielmoch.com/blog/{{post.permalink()}}"/> {% endblock %} +{% block nav_extra %} +{% if show_sourcelink %} +<ul class="no-margin no-padding" style="text-align: right;"> + <li><a href="{{ post.source_link() }}">Page Source</a></li> +</ul> +{% endif %} +{% endblock %} + {% block content %} <h1 class="page-title">{{post.title()}}</h1> <h2 class="page-subtitle">