This commit is contained in:
Anna Sudnitsina 2017-11-08 12:43:13 +03:00
parent dfe6c2ad56
commit 64eaab9d6b
6 changed files with 88 additions and 92 deletions

View File

@ -23,6 +23,14 @@ a {
letter-spacing: 1px; letter-spacing: 1px;
margin-right: 10px; margin-right: 10px;
} }
.delete {
right: 80px;
}
.edit {
position: absolute;
right: 10px;
bottom: 10px;
}
input#button-search { input#button-search {
background: url('https://touchit.com.ua/static/images/icons/search-25.png') no-repeat center center; background: url('https://touchit.com.ua/static/images/icons/search-25.png') no-repeat center center;
border: none; border: none;

View File

@ -5,10 +5,9 @@
<title>BLOG</title> <title>BLOG</title>
<link rel="stylesheet" href="{% static 'css/blog.css' %}"> <link rel="stylesheet" href="{% static 'css/blog.css' %}">
<link rel="stylesheet" href="{% static 'css/new.css' %}"> <link rel="stylesheet" href="{% static 'css/new.css' %}">
<meta charset="utf-8"><meta name=viewport content="width=device-width, initial-scale=1"> <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"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<!--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> </head>
<body> <body>
<div id="header"> <div id="header">
@ -23,8 +22,6 @@
<div id="content"> <div id="content">
{% block content %} {% block content %}
{% endblock %} {% endblock %}
<div class="sidemenu">
Hop hey</div>
<div class="sidemenu"> <div class="sidemenu">
<div class="block"> <div class="block">
<h2>Меню</h2> <h2>Меню</h2>
@ -43,8 +40,6 @@ Hop hey</div>
</div> </div>
</div> </div>
</div> </div>
<ul class="menu_top paginator"> <ul class="menu_top paginator">
{% if posts.has_previous %} {% if posts.has_previous %}
<li> <a href="?page=1"><<</a> </li> <li> <a href="?page=1"><<</a> </li>
@ -56,8 +51,8 @@ Hop hey</div>
<li> <a href="?page={{ posts.next_page_number|add:1 }}">{{ posts.next_page_number|add:1 }}</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 %} <li><a href="?page={{ posts.paginator.num_pages }}"> >> </a></li> {% endif %}
</body> </body>
{% comment %} {% comment %}
<!--li> {% for i in posts.paginator.page_range %} </li--> <!--li> {% for i in posts.paginator.page_range %} </li-->
{% endcomment %} {% endcomment %}
</ul> </ul>
</html> </html>

View File

@ -10,7 +10,6 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</h3> </h3>
<p>{{ post.text|safe|linebreaksbr }}</p> <p>{{ post.text|safe|linebreaksbr }}</p>
<span> <span>
{% if post.published_date %} {% if post.published_date %}
@ -18,8 +17,8 @@
{% endif %} {% endif %}
</span> </span>
<span class="edit" style="position: absolute; right: 10px; bottom: 10px;"><a href="{% url 'post_edit' pk=post.pk %}">edit post</a></span> <span class="edit"><a href="{% url 'post_edit' pk=post.pk %}">edit post</a></span>
<span class="edit" style="position: absolute; right: 80px; bottom: 10px;"><a href='#deletionDialog';">delete</a></span> <span class="edit delete"><a href='#deletionDialog';">delete</a></span>
<div id="deletionDialog" class="dialog"> <div id="deletionDialog" class="dialog">
<div> <div>
<p align="right"><a href=""><img src="http://py.difrex.ru/media/images/x.PNG"></a></p> <p align="right"><a href=""><img src="http://py.difrex.ru/media/images/x.PNG"></a></p>

View File

@ -1,11 +1,11 @@
{% extends 'blog/base.html' %} {% extends 'blog/base.html' %}
{% block content %} {% block content %}
<div class="block"> <div class="block">
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<button type="submit" class="save btn btn-default">Save</button> <button type="submit" class="save btn btn-default">Save</button>
</form> </form>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% extends 'blog/base.html' %} {% extends 'blog/base.html' %}
{% load pagination_tags %} {% load pagination_tags %}
{% block content %}
{% block content %}
<div id="posts"> <div id="posts">
{% for post in posts %} {% for post in posts %}
<div class="post"> <div class="post">
@ -15,11 +15,10 @@
<a href="{% url 'search_by_tag' tag=tag%}">{{ tag }}</a> <a href="{% url 'search_by_tag' tag=tag%}">{{ tag }}</a>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
{{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p--><br> {{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p--><br>
</div>
{% endfor %}
</div> </div>
{% endfor %}
</div>
{% endblock content %} {% endblock content %}

View File

@ -1,24 +1,19 @@
{% extends 'blog/base.html' %} {% extends 'blog/base.html' %}
{% load pagination_tags %} {% load pagination_tags %}
{% block content %}
{% block content %}
{% for post in tagged_posts %} {% for post in tagged_posts %}
<div class="block post"> <div class="block post">
<h1><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h1> <h1><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h1>
{{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p--><br>
{{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p-->
<br>
<p style="float: left; color: #1abc9c; font-style: italic;"> Tags: <p style="float: left; color: #1abc9c; font-style: italic;"> Tags:
{% for tag in post.tags.names %} {% 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%}" style="color: #1abc9c; ">{{ tag }}</a>
{% endfor %} {% endfor %}
</p> </p>
<p align="right"> <p align="right">
{{ post.published_date}} {{ post.published_date}}
</p> </p>
</div> </div>
{% endfor %} {% endfor %}
{% endblock content %} {% endblock content %}