django_blog/blog/templates/blog/base.html
2017-10-29 13:40:42 +03:00

59 lines
2.2 KiB
HTML

{% load staticfiles %}
<html>
<head>
<title>BLOG</title>
<link rel="stylesheet" href="{% static 'css/blog.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 class="page-header block" style="position: relative; ">
<h1><a href="/">Django Blog</a></h1>
<ul class="menu">
<li class="shirt"><a href="/pfm">PFM</a>
<li><a href="#1">Notes</a>
<ul class="sub-menu">
<li> <a href="{% url 'post_new' %}">new post</a></li>
<li> <a href="/blog/1"> all notes</a></li>
</ul>
</li>
<li class="long"><a href="#2">Images</a>
<ul class="sub-menu right">
<li class="long"> <a href="{% url 'image_new' %}"> new image</a></li>
<li class="long"> <a href="{% url 'all_posts' %}"><span>all images</span></a></li>
</ul>
</li>
<li class="shirt"><a href="/admin">/admin</a></li>
</ul>
</div>
{% block content %}
{% endblock %}
</body>
<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 %}
{% comment %}
<!--li> {% for i in posts.paginator.page_range %} </li-->
{% endcomment %}
</ul>
</html>