From 5a7466204b4030873405b1a0fcb8b208762453ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Thu, 31 May 2018 15:04:45 +0300 Subject: Ability to pin posts, updated to bootstrap 4, fixes --- weblog/templates/weblog/index.html | 30 ++++++++++++++++++++++--- weblog/templates/weblog/post.html | 0 weblog/templates/weblog/sidebar_archive.html | 0 weblog/templates/weblog/sidebar_categories.html | 0 weblog/templates/weblog/weblog.html | 14 ++++++------ weblog/templates/weblog_base.html | 19 ++++++++-------- weblog/templates/weblog_base_old.html | 0 7 files changed, 44 insertions(+), 19 deletions(-) mode change 100644 => 100755 weblog/templates/weblog/index.html mode change 100644 => 100755 weblog/templates/weblog/post.html mode change 100644 => 100755 weblog/templates/weblog/sidebar_archive.html mode change 100644 => 100755 weblog/templates/weblog/sidebar_categories.html mode change 100644 => 100755 weblog/templates/weblog/weblog.html mode change 100644 => 100755 weblog/templates/weblog_base.html mode change 100644 => 100755 weblog/templates/weblog_base_old.html (limited to 'weblog/templates') diff --git a/weblog/templates/weblog/index.html b/weblog/templates/weblog/index.html old mode 100644 new mode 100755 index c46da38..7231cf7 --- a/weblog/templates/weblog/index.html +++ b/weblog/templates/weblog/index.html @@ -8,7 +8,7 @@ {{ category.name }} {% endif %} {% else %} -{{ blog_title }} +{% trans "Home" context "Home page" %} {% endif %} {% endblock %} {% block blog_content_block %} @@ -18,9 +18,32 @@ {% else %}

{% blocktrans with category_name=category.name context 'Posts in category' %}Posts in {{ category_name }}{% endblocktrans %}

{% endif %} +{% elif year %} +{% if month %} +

{% blocktrans with category_name=category.name context 'Posts from archive (year/month,year)' %}Posts from {{ month }}, {{ year }}{% endblocktrans %}

{% else %} -

{{ blog_title }}

+

{% blocktrans with category_name=category.name context 'Posts from archive (year/month,year)' %}Posts from {{ year }}{% endblocktrans %}

{% endif %} +{% else %} +

{{ blog_title }} - {% trans "Home" context "Home page" %}

+{% endif %} + {% if posts or pinned_posts %} + {% if pinned_posts %} + {% for post in pinned_posts %} +
+

{% trans 'Important post' %}

+

{{ post.title }}

+

{% blocktrans with publish_date=post.publish_date %}Published on {{ publish_date }}{% endblocktrans %}{% if post.author %}{% blocktrans with author=post.author context 'Written by (Author)' %}, by {{ author }}{% endblocktrans %}{% endif %}

+
+ {% if post.preview_image %}{% endif %} + {{ post.preview_text|safe }} +
+ +
+ {% endfor %} + {% endif %} {% if posts %} {% for post in posts %}
@@ -72,7 +95,8 @@ {% endif %} {% endif %} + {% endif %} {% else %}

{% trans 'Nothing has been posted yet.' %}

{% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/weblog/templates/weblog/post.html b/weblog/templates/weblog/post.html old mode 100644 new mode 100755 diff --git a/weblog/templates/weblog/sidebar_archive.html b/weblog/templates/weblog/sidebar_archive.html old mode 100644 new mode 100755 diff --git a/weblog/templates/weblog/sidebar_categories.html b/weblog/templates/weblog/sidebar_categories.html old mode 100644 new mode 100755 diff --git a/weblog/templates/weblog/weblog.html b/weblog/templates/weblog/weblog.html old mode 100644 new mode 100755 index 9980b54..e24c918 --- a/weblog/templates/weblog/weblog.html +++ b/weblog/templates/weblog/weblog.html @@ -3,18 +3,18 @@ {% load weblog_extras %} {% block title_block %}{% endblock %} {% block blog_block %} - +
{% block blog_content_block %} @@ -39,4 +39,4 @@
{% endif %}
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/weblog/templates/weblog_base.html b/weblog/templates/weblog_base.html old mode 100644 new mode 100755 index 536e736..9a739cb --- a/weblog/templates/weblog_base.html +++ b/weblog/templates/weblog_base.html @@ -3,19 +3,20 @@ - Simple blog - {% block title_block %} Home {% endblock %} - + + {{ blog_title }} - {% block title_block %} Home {% endblock %} + + - + + + - -