django_blog/blog/templates/blog/base.html.save
2017-12-08 00:56:38 +03:00

71 lines
2.4 KiB
Plaintext

{% load staticfiles %}
<html>
<head>
<title>BLOG</title>
<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.0" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
</head>
<body>
<div id="header">
<a id="logo" href="/">Django Blog</a>
<div id="search">
<form id="search-form">
<input name="search" type="text"></input>
<input id="button-search" type="submit" value=""></input>
</form>
</div>
</div>
<div id="content">
<div id="posts">
{% block content %}
{% endblock %}
</div>
<div class="sidemenu">
<div class="block">
<h2>Меню</h2>
<ul>
<li><li><a href="{% url 'post_new' %}">new post</a></li>
<li><a href="/">all notes</a></li>
</ul>
</div>
<div class="block">
<h2>Последние</h2>
<ul>
{% for i in latest %}
<li><a href="{% url 'post_detail' pk=i.pk %}"> {{ i.title }} </a> <br>
<div class="date"> {{ i.published_date }} </div>
{% endfor %}
</ul>
</div>
<div class="block">
<h2>Теги</h2>
<ul>
<li><li><a href="{% url 'post_new' %}">new post</a></li>
<li><a href="/">all notes</a></li>
</ul>
</div>
</div>
</div>
<ul class="menu_top paginator">
{% if posts.has_previous %}
<li> <a href="?page=1"><<</a> </li>
<li> <a href="?page={{ posts.previous_page_number }}">{{ posts.previous_page_number }}</a> </li>
{% endif %}
<li> <a style="color: #000000" href="">{{ posts.number }}<a></li>
{% if posts.has_next %}
<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 %}
</ul>
</html>