aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-06-13 19:02:06 +0300
committerYaroslav <contact@yaroslavps.com>2020-06-13 19:02:06 +0300
commitc68225e360a95f000bc08bf9aa3fbfdfe942572e (patch)
tree343368f87052833808521ac174dad49f8b84f780 /templates
parent6d9127a527f8e02a991820bf9983e58b5458d521 (diff)
downloadyaroslavps.com-c68225e360a95f000bc08bf9aa3fbfdfe942572e.tar.gz
yaroslavps.com-c68225e360a95f000bc08bf9aa3fbfdfe942572e.zip
template fixes
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html17
-rw-r--r--templates/weblog.html10
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 %}