aboutsummaryrefslogtreecommitdiff
path: root/weblog/templates
diff options
context:
space:
mode:
authorYaroslsav-95 <contact@yaroslavps.com>2018-03-29 16:45:02 +0300
committerYaroslsav-95 <contact@yaroslavps.com>2018-03-29 16:45:02 +0300
commitd6c508bb46d660947718083e3fa214049253c42b (patch)
tree3e4d8bac2247dbdcb3573e1ed00b23d80baf2c56 /weblog/templates
parentbe41310b3dc4aec12d3a950cf9fe737811436499 (diff)
downloadw3blog-d6c508bb46d660947718083e3fa214049253c42b.tar.gz
w3blog-d6c508bb46d660947718083e3fa214049253c42b.zip
Fixed bugs, and compatibility issues with Django 2.0
Diffstat (limited to 'weblog/templates')
-rw-r--r--weblog/templates/weblog/sidebar_archive.html8
-rw-r--r--weblog/templates/weblog_base.html4
-rw-r--r--weblog/templates/weblog_base_old.html35
3 files changed, 9 insertions, 38 deletions
diff --git a/weblog/templates/weblog/sidebar_archive.html b/weblog/templates/weblog/sidebar_archive.html
index 5953bfe..ca74018 100644
--- a/weblog/templates/weblog/sidebar_archive.html
+++ b/weblog/templates/weblog/sidebar_archive.html
@@ -1,5 +1,6 @@
{% load i18n %}
<h3>{% trans 'Archive' context 'Blog archive' %}</h3>
+{% if archive %}
<ul class='archive-list'>
{% for a_year in archive %}
<li><a class="node-toggle" node-target="{{ a_year.0 }}-list" node-state="closed" href="javascript:void(0)" onclick="toggleNode(this);">+</a> <a href="{% url 'weblog:ArchiveIndex' year=a_year.0 %}">{{ a_year.0 }}</a>
@@ -10,4 +11,9 @@
</ul>
</li>
{% endfor %}
-</ul> \ No newline at end of file
+{% else %}
+<div class="text-center">
+ <p>{% trans 'Nothing has been posted yet.' %}</p>
+</div>
+{% endif %}
+</ul>
diff --git a/weblog/templates/weblog_base.html b/weblog/templates/weblog_base.html
index 536e736..6a551ff 100644
--- a/weblog/templates/weblog_base.html
+++ b/weblog/templates/weblog_base.html
@@ -3,7 +3,7 @@
<html>
<head>
<meta charset="utf-8">
- <title>Simple blog - {% block title_block %} Home {% endblock %}</title>
+ <title>{% block title_block %} Home {% endblock %}</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="{% static '/weblog/css/weblog.css' %}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" defer></script>
@@ -25,4 +25,4 @@
{% endblock %}
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/weblog/templates/weblog_base_old.html b/weblog/templates/weblog_base_old.html
deleted file mode 100644
index a4dbd30..0000000
--- a/weblog/templates/weblog_base_old.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-{% load static %}
-<html>
- <head>
- <meta charset="utf-8">
- <title>Simple blog - {% block title_block %} Home {% endblock %}</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <link rel="stylesheet" href="{% static '/weblog/css/weblog.css' %}">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" defer></script>
- <script src="{% static '/weblog/js/weblog.js' %}" defer></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" defer></script>
- </head>
- <body>
- <nav class="navbar navbar-inverse">
- <div class="container nav-container">
- <div class="navbar-header">
- <a class="navbar-brand" href="{% url 'weblog:Index' %}">{{ blog_title }}</a>
- </div>
- <div class="collapse navbar-collapse">
- <ul class="nav navbar-nav navbar-right">
- <li><a href="{% url 'weblog:ChangeLanguage' language='en' %}?next={{ request.path }}">EN</a></li>
- <li><a href="{% url 'weblog:ChangeLanguage' language='es' %}?next={{ request.path }}">ES</a></li>
- <li><a href="{% url 'weblog:ChangeLanguage' language='ru' %}?next={{ request.path }}">RU</a></li>
- </ul>
- </div>
- </div>
- </nav>
- <div class="container">
- {% block content_block %}
- {% block blog_block %}
- {% endblock %}
- {% endblock %}
- </div>
- </body>
-</html> \ No newline at end of file