diff options
-rw-r--r-- | templates/base.html | 17 | ||||
-rw-r--r-- | templates/weblog.html | 10 |
2 files changed, 14 insertions, 13 deletions
diff --git a/templates/base.html b/templates/base.html index 2974335..8af6021 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,10 @@ <!DOCTYPE html> +{% set permalink = "/weblog/" %} +{% if section %} + {% set permalink = section.permalink %} +{% elif page %} + {% set permalink = page.permalink %} +{% endif %} <html> <head> <meta charset="utf-8"> @@ -29,9 +35,14 @@ <div class="sidebar-container"> <div class="sticky-wrapper"> {% block sbdesc %} - <p>Hello, my name is Yaroslav de la Peña Smirnov, welcome to my - weblog. Sometimes I write software, sometimes I might write my mind - here. </p> + {% if permalink is containing("weblog") %} + <p>Hello, my name is Yaroslav de la Peña Smirnov, welcome to my weblog. + Sometimes I write software, sometimes I might write my mind here. </p> + {% elif permalink is containing("food") %} + <p>Here I keep some of the recipes for food that I cook. Nothing really + special in here, just food that I find delicious, and generally not very + expensive nor time consuming to cook.</p> + {% endif %} {% endblock %} <div class="links-container"> <a href="https://github.com/Yaroslav-95" title="GitHub"><span class="icon"></span></a> diff --git a/templates/weblog.html b/templates/weblog.html index 8b2eec6..06673ee 100644 --- a/templates/weblog.html +++ b/templates/weblog.html @@ -17,16 +17,6 @@ <h1>Yaroslav's website</h1> {% endif %} {% endblock %} -{% block sbdesc %} - {% if section.permalink is containing("weblog") %} - <p>Hello, my name is Yaroslav de la Peña Smirnov, welcome to my weblog. - Sometimes I write software, sometimes I might write my mind here. </p> - {% elif section.permalink is containing("food") %} - <p>Here I keep some of the recipes for food that I cook. Nothing really - special in here, just food that I find delicious, and generally not very - expensive nor time consuming to cook.</p> - {% endif %} -{% endblock %} {% block content %} <div class="posts-list"> {% for post in paginator.pages %} |