upd
This commit is contained in:
parent
925e62be0c
commit
446ac8e697
@ -1,4 +1,3 @@
|
||||
|
||||
a {
|
||||
color: #4a809a;
|
||||
}
|
||||
@ -10,17 +9,16 @@
|
||||
.block {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0.005em 0.01em 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
||||
//display: block;
|
||||
margin: 0 0 10px 0;
|
||||
padding: 15px;
|
||||
}
|
||||
.close {
|
||||
color: #FFFFFF;
|
||||
font-size: 30px;
|
||||
position: absolute;
|
||||
right: -25px;
|
||||
text-decoration: none;
|
||||
top: -25px;
|
||||
font-size: 30px;
|
||||
}
|
||||
#content {
|
||||
margin: 10px 0 0 0;
|
||||
@ -38,18 +36,18 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: rgba(0,0,0,0.8);
|
||||
z-index: 99999;
|
||||
-webkit-transition: opacity 400ms ease-in;
|
||||
-moz-transition: opacity 400ms ease-in;
|
||||
transition: opacity 400ms ease-in;
|
||||
-webkit-transition: opacity 400ms ease-in;
|
||||
background: rgba(0,0,0,0.8);
|
||||
bottom: 0;
|
||||
display: none;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transition: opacity 400ms ease-in;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.dialog:target {
|
||||
@ -58,18 +56,18 @@
|
||||
}
|
||||
|
||||
.dialog1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: rgba(0,0,0,0.8);
|
||||
z-index: 99999;
|
||||
-webkit-transition: opacity 400ms ease-in;
|
||||
-moz-transition: opacity 400ms ease-in;
|
||||
transition: opacity 400ms ease-in;
|
||||
-webkit-transition: opacity 400ms ease-in;
|
||||
background: rgba(0,0,0,0.8);
|
||||
bottom: 0;
|
||||
display: none;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transition: opacity 400ms ease-in;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.dialog1:target {
|
||||
@ -78,24 +76,19 @@
|
||||
}
|
||||
|
||||
.dialog > div {
|
||||
width: 17em;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
margin: 15% auto;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
//border-radius: 10px;
|
||||
background: #fff;
|
||||
width: 17em;
|
||||
}
|
||||
.dialog span {line-height: 50px}
|
||||
.dialog input {width: 100px; margin: 5px}
|
||||
input#button-search {
|
||||
background: url('https://touchit.com.ua/static/images/icons/search-25.png') no-repeat center center;
|
||||
border: none;
|
||||
|
||||
cursor: pointer;
|
||||
//margin-top: 10px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
.dialog span {
|
||||
line-height: 50px
|
||||
}
|
||||
.dialog input {
|
||||
margin: 5px
|
||||
width: 100px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 26.25px;
|
||||
@ -110,14 +103,21 @@
|
||||
height: 50px;
|
||||
}
|
||||
input[name="search"] {
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #CCCCCC;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
padding: 6px 12px;
|
||||
width: 200px;
|
||||
vertical-align: top;
|
||||
width: 200px;
|
||||
}
|
||||
input#button-search {
|
||||
background: url('https://touchit.com.ua/static/images/icons/search-25.png') no-repeat center center;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
#logo {
|
||||
color: #FFFFFF;
|
||||
@ -137,23 +137,26 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
#pagination {
|
||||
font-size: 16px;
|
||||
list-style: none;
|
||||
//text-align: center;
|
||||
font-size: 16px;
|
||||
list-style: none;
|
||||
}
|
||||
#pagination a {
|
||||
display: inline-block;
|
||||
padding: 2 1; text-decoration:none;
|
||||
//text-align: center;
|
||||
display: inline-block;
|
||||
padding: 2 1; text-decoration:none;
|
||||
}
|
||||
#plus {
|
||||
display: none;
|
||||
}
|
||||
div.post {
|
||||
font-size: 16px;
|
||||
}
|
||||
div.post { font-size: 16px;}
|
||||
.post {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0.005em 0.01em 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF;
|
||||
color: #1a1a1a;
|
||||
display: block;
|
||||
font-family: 'Open Sans'
|
||||
font-family: 'Open Sans';
|
||||
font-weight: 300;
|
||||
line-height: 26px;
|
||||
margin: 0 0 10px 0;
|
||||
@ -165,15 +168,13 @@
|
||||
margin: 5px 0 10px 0;
|
||||
}
|
||||
.post-header a {
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
.post-header a:hover {
|
||||
color: #4a809a;
|
||||
}
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#posts {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
@ -181,16 +182,17 @@
|
||||
padding-right: 250px;
|
||||
width: 100%;
|
||||
}
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
#search {
|
||||
display: block;
|
||||
float: right;
|
||||
font-size: 100%;
|
||||
display: block;
|
||||
height: 50px;
|
||||
}
|
||||
#search-form {
|
||||
margin: 10px 10px 0 10px;
|
||||
//vertical-align: top;
|
||||
|
||||
}
|
||||
.sidemenu {
|
||||
box-sizing: border-box;
|
||||
@ -199,8 +201,8 @@
|
||||
width: 240px;
|
||||
}
|
||||
.sidemenu h2 {
|
||||
font-size: 16px;
|
||||
color: #666666;
|
||||
font-size: 16px;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
.sidemenu ul {
|
||||
@ -211,8 +213,8 @@
|
||||
margin: 5px 0 10px;
|
||||
}
|
||||
textarea{
|
||||
width: 90%;
|
||||
margin:5px 10px;
|
||||
width: 90%;
|
||||
}
|
||||
//button[name="action"] {display: block; float: right; margin: 1px;}
|
||||
//table {
|
||||
@ -220,19 +222,17 @@
|
||||
//border-collapse: collapse;}
|
||||
//td {padding: 2 10;}
|
||||
tr:hover td {
|
||||
background-color: rgba(41, 128, 185, 0.1);
|
||||
}
|
||||
|
||||
#plus {display: none;}
|
||||
@media screen and (max-width: 900px) {
|
||||
#posts {padding: 0}
|
||||
#header {width: 100%;}
|
||||
//.sidemenu {background: #F7F7F8;}
|
||||
#search, .sidemenu {display: none}
|
||||
#plus {color: #FFF; float: right;
|
||||
font-size: 25px;
|
||||
display: block;
|
||||
//height: 30px;
|
||||
margin: 12px;
|
||||
background-color: rgba(41, 128, 185, 0.1);
|
||||
}
|
||||
@media screen and (max-width: 900px) {
|
||||
#posts {padding: 0}
|
||||
#header {width: 100%;}
|
||||
#search, .sidemenu {display: none}
|
||||
#plus {
|
||||
color: #FFF;
|
||||
float: right;
|
||||
font-size: 25px;
|
||||
display: block;
|
||||
margin: 12px;
|
||||
}
|
||||
}
|
||||
|
@ -37,28 +37,29 @@
|
||||
</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" style="text-align: center">
|
||||
<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" style="text-align: center">
|
||||
<h2> Теги </h2>
|
||||
{% for tag in cloud %}
|
||||
<a href="{% url 'post_list' tag=tag %}" style="font-size: {{tag.f}}px; margin: 2px ">{{ tag.name }}</a>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
<a href="{% url 'post_list' tag=tag %}" style="font-size: {{tag.f}}px; margin: 2px ">{{ tag.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pagination">
|
||||
<p>
|
||||
{% if posts.has_previous %} <a href="?page={{ posts.previous_page_number }}{% if search_query != '' %}&search={{ search_query }} {% endif %}"><-предыдущая</a>{% endif %}
|
||||
{% if posts.has_next %}<a href="?page={{ posts.next_page_number }}{% if search_query != '' %}&search={{ search_query }} {% endif %}">следующая-></a> {% endif %}
|
||||
{% if posts.has_previous %}
|
||||
<a href="?page={{ posts.previous_page_number }}{% if search_query != '' %}&search={{ search_query }} {% endif %}"><-предыдущая</a>
|
||||
{% endif %}
|
||||
{% if posts.has_next %}
|
||||
<a href="?page={{ posts.next_page_number }}{% if search_query != '' %}&search={{ search_query }} {% endif %}">следующая-></a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if posts.has_other_pages %}
|
||||
<a href="?page=1{% if search_query != '' %}&search={{ search_query }} {% endif %}">|<<</a>
|
||||
@ -66,26 +67,21 @@
|
||||
{% if page == posts.number %} {{page}}
|
||||
{% else %} <a href="?page={{page}}{% if search_query != '' %}&search={{ search_query }} {% endif %}">{{page}}</a> {% endif %} {% endfor %}
|
||||
<a href="?page={{ posts.paginator.num_pages }}{% if search_query != '' %}&search={{ search_query }} {% endif %}"> >>| </a>
|
||||
|
||||
{% endif %}
|
||||
{% comment %}
|
||||
{% comment %}
|
||||
<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 %}
|
||||
{% if posts.has_other_pages %}<li> <a style="color: #000000" href="">{{ posts.number }}</a></li> {% endif %}
|
||||
{% if posts.has_next %}
|
||||
{% endif %}
|
||||
{% if posts.has_other_pages %}<li> <a style="color: #000000" href="">{{ posts.number }}</a></li> {% endif %}
|
||||
{% 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 %}
|
||||
{% endcomment %}
|
||||
{% comment %}
|
||||
<!--li> {% for i in posts.paginator.page_range %} </li-->
|
||||
{% endcomment %}
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
{% endcomment %}
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -4,31 +4,29 @@
|
||||
<div class="post">
|
||||
<span class="delete"><a href='#deletionDialog';"><i class="fa fa-trash"></i></a></span>
|
||||
<span class="edit"><a href="{% url 'post_edit' pk=post.pk %}"><i class="fa fa-pencil"></i></a></span>
|
||||
<h1>{{ post.title }}</h1>
|
||||
|
||||
{% if post.published_date %}
|
||||
<div class="date"><i class="fa fa-calendar"></i> {{ post.published_date}}</div>
|
||||
{% endif %}
|
||||
{% if post.tags.names %}
|
||||
<h1>{{ post.title }}</h1>
|
||||
{% if post.published_date %}
|
||||
<div class="date"><i class="fa fa-calendar"></i> {{ post.published_date}}</div>
|
||||
{% endif %}
|
||||
{% if post.tags.names %}
|
||||
<div class="tag">
|
||||
<i class="fa fa-tags"></i>
|
||||
{% for tag in post.tags.names %}
|
||||
<a href="{% url 'post_list' tag=tag%}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<p>{{ post.text|safe|linebreaksbr }}</p>
|
||||
|
||||
<div id="deletionDialog" class="dialog">
|
||||
<div>
|
||||
<a class="close" href="">x</a>
|
||||
<span style="margin: auto">Удалить пост "{{ post.title }}"? </span>
|
||||
<form method="POST" >{% csrf_token %}
|
||||
<input type=hidden name="id" value="{{ post.pk }}">
|
||||
<input type="submit" name="action" value="delete" onclick="location.href = '#'">
|
||||
<input type="button" value="cancel" onclick="location.href='#'">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ post.text|safe|linebreaksbr }}</p>
|
||||
<div id="deletionDialog" class="dialog">
|
||||
<div>
|
||||
<a class="close" href="">x</a>
|
||||
<span style="margin: auto">Удалить пост "{{ post.title }}"? </span>
|
||||
<form method="POST" >{% csrf_token %}
|
||||
<input type=hidden name="id" value="{{ post.pk }}">
|
||||
<input type="submit" name="action" value="delete" onclick="location.href = '#'">
|
||||
<input type="button" value="cancel" onclick="location.href='#'">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user