This commit is contained in:
Anna Sudnitsina 2017-11-05 00:42:58 +03:00
parent a2252bd5ef
commit a1ae9758fb
2 changed files with 18 additions and 27 deletions

View File

@ -6,17 +6,9 @@
<link rel="stylesheet" href="{% static 'css/blog.css' %}">
<link rel="stylesheet" href="{% static 'css/new.css' %}">
<meta charset="utf-8"><meta name=viewport content="width=device-width, initial-scale=1">
<!--style type="text/css">
.menu li {width: 85px;}
.sub-menu li a {padding: 10px 9px;}
.menu .shirt {width: 1px;}
.menu .long {min-width: 95px;}
</style-->
<!--script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script-->
<!--Let browser know website is optimized for mobile--> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div id="header">
<a id="logo" href="/">Django Blog</a>
@ -30,24 +22,23 @@
<div id="content">
{% block content %}
{% endblock %}
<div class="sidemenu">
<h2>Меню</h2>
<ul>
<li><li> <a href="{% url 'post_new' %}">new post</a></li>
<li> <a href="/blog/1"> all notes</a></li>
</ul>
<div class="sidemenu">
<h2>Меню</h2>
<ul>
<li><li><a href="{% url 'post_new' %}">new post</a></li>
<li><a href="/blog/1">all notes</a></li>
</ul>
</div>
<div class="sidemenu">
<h2>Последние</h2>
<ul>
<li><a href="/">ToDo List</a><div class="date">2017-11-04</div></li>
<li><a href="/">Йа сцылко</a><div class="date">2017-11-03</div></li>
<li><a href="/">Йа сцылко №2</a><div class="date">2017-11-03</div></li>
< /ul>
</div>
</div>
<div class="sidemenu">
<h2>Последние</h2>
<ul>
<li><a href="/">ToDo List</a><div class="date">2017-11-04</div></li>
<li><a href="/">Йа сцылко</a><div class="date">2017-11-03</div></li>
<li><a href="/">Йа сцылко №2</a><div class="date">2017-11-03</div></li>
</ul>
</div>
</div>
</body>
<ul class="menu_top paginator">
{% if posts.has_previous %}
@ -59,7 +50,7 @@
<li> <a href="?page={{ posts.next_page_number }}"> {{ posts.next_page_number }}</a> </li>
<li> <a href="?page={{ posts.next_page_number|add:1 }}">{{ posts.next_page_number|add:1 }}</a></li>
<li><a href="?page={{ posts.paginator.num_pages }}"> >> </a></li> {% endif %}
</body>
{% comment %}
<!--li> {% for i in posts.paginator.page_range %} </li-->
{% endcomment %}

View File

@ -10,11 +10,11 @@
<div class="date">{{ post.published_date}}</div>
</div>
{{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p--><br>
<p style="float: left; color: #1abc9c; font-style: italic;">
<p>
{% if post.tags.names %}
Tags:
{% for tag in post.tags.names %}
<a href="{% url 'search_by_tag' tag=tag%}" style="color: #1abc9c; ">{{ tag }}</a>
<a href="{% url 'search_by_tag' tag=tag%}">{{ tag }}</a>
{% endfor %}
{% endif %}
</p>