tab delete

This commit is contained in:
Anna Sudnitsina 2017-10-12 14:05:31 +03:00
parent 0ad5e4ae9d
commit 90e9a158cd
2 changed files with 74 additions and 74 deletions

View File

@ -18,10 +18,10 @@
var prev = []; var prev = [];
var total_w = 0; var total_w = 0;
imgs.each(function (i, e) { imgs.each(function (i, e) {
$(this).height(200); $(this).height(200);
prev[prev.length] = $(e); prev[prev.length] = $(e);
total_w += $(e).width(); total_w += $(e).width();
if (total_w > row_width) { if (total_w > row_width) {
prev = $(prev); prev = $(prev);
prev.each(function (indx, element) {$(element).height(row_width*200/total_w)}); prev.each(function (indx, element) {$(element).height(row_width*200/total_w)});
prev = []; prev = [];

View File

@ -1,106 +1,106 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans:600" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Josefin+Sans:600" rel="stylesheet">
<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-2.1.1.min.js"></script> <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<style> <style>
body { body {
margin: 0; margin: 0;
}
.images {
margin-top: 10px;
margin-left: 25px;
} }
.header { .images {
dispaly: block; margin-top: 10px;
color: black; margin-left: 25px;
background: linear-gradient(#f3f3f3, #e0e0e0); }
padding: 10px 25px;
font-size: 30px .header {
} dispaly: block;
color: black;
ul.menu-icon { background: linear-gradient(#f3f3f3, #e0e0e0);
display: none; padding: 10px 25px;
float: right; font-size: 30px
color: black; }
ul.menu-icon {
display: none;
float: right;
color: black;
padding: 7px 0 20px; padding: 7px 0 20px;
margin: 0; margin: 0;
} }
.logo { .logo {
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
color: #696969; color: #696969;
width: 50px; width: 50px;
text-decoration: none; text-decoration: none;
} }
li { li {
list-style-type: none list-style-type: none
} }
.menu { .menu {
position: absolute; position: absolute;
font-size: 20px; font-size: 20px;
right: 10px; right: 10px;
top: 60px; top: 60px;
display: none; display: none;
} }
.menu a { .menu a {
text-align: right; text-align: right;
display: inline-block; display: inline-block;
padding: 10px; padding: 10px;
background: #e0e0e0; background: #e0e0e0;
width: 90%; width: 90%;
text-decoration: none; text-decoration: none;
} }
.menu a:hover { .menu a:hover {
color:#181D2B; color:#181D2B;
} }
i { i {
float: right; float: right;
} }
.right-menu { .right-menu {
float: right; float: right;
padding: 12px; padding: 12px;
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
font-size: 20px; font-size: 20px;
display: inline; display: inline;
} }
a.right-menu { a.right-menu {
text-decoration: none; text-decoration: none;
color: #4368AD; color: #4368AD;
padding: 9px; padding: 9px;
} }
@media screen and (max-width: 450px) { @media screen and (max-width: 450px) {
ul.menu-icon {display: block} ul.menu-icon {display: block}
a.right-menu {display: none} a.right-menu {display: none}
} }
</style> </style>
</head> </head>
<body> <body>
<div class='header'> <a href="{% url 'all_posts' %}" class='logo'>LOGO </a> <div class='header'> <a href="{% url 'all_posts' %}" class='logo'>LOGO </a>
<a href="{% url 'image_new' %}" class='right-menu'>new image</a> <a href="{% url 'image_new' %}" class='right-menu'>new image</a>
<a href="{% url 'all_posts' %}" class='right-menu'>all images</a> <a href="{% url 'all_posts' %}" class='right-menu'>all images</a>
<ul class='menu-icon'> <ul class='menu-icon'>
<li><i class="fa fa-bars"></i></li> <li><i class="fa fa-bars"></i></li>
<ul class="menu"> <ul class="menu">
<li class="long"><a href="{% url 'image_new' %}">new image</a></li> <li class="long"><a href="{% url 'image_new' %}">new image</a></li>
<li class="long"><a href="{% url 'all_posts' %}">all images</a></li> <li class="long"><a href="{% url 'all_posts' %}">all images</a></li>
</ul> </ul>
</ul> </ul>
</div> </div>
{% block content %} {% block content %}
{% endblock%} {% endblock%}