new color, better submit buttons, book detail img title overlay fix, permission denied screen beautified
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
<head>
|
||||
{% block title %}<title>Local Library</title>{% endblock %}
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -13,28 +14,34 @@
|
||||
<!-- Compiled and minified JavaScript -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
|
||||
<style>
|
||||
table {
|
||||
width:100%;
|
||||
table-layout:fixed;
|
||||
}
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
.title {
|
||||
width: 40%;
|
||||
}
|
||||
.author {
|
||||
width: 20%;
|
||||
}
|
||||
.rating {
|
||||
width: 5%;
|
||||
}
|
||||
.tags {
|
||||
width: 15%;
|
||||
}
|
||||
.added {
|
||||
width: 20%;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.author {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.rating {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.tags {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.added {
|
||||
width: 20%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -42,10 +49,10 @@
|
||||
|
||||
<div class="navbar-fixed">
|
||||
<nav>
|
||||
<div class="nav-wrapper row green darken-4">
|
||||
<div class="nav-wrapper row green darken-1">
|
||||
|
||||
<ul class="right">
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="active"><a href="{{user.get_absolute_url}}"> {{ user.get_username }}</a></li>
|
||||
<li><a href="{% url 'logout'%}?next={{request.path}}">Logout</a></li>
|
||||
</ul>
|
||||
@@ -53,9 +60,12 @@
|
||||
<ul class="left">
|
||||
<li><a href="{% url 'search' %}">Search</a></li>
|
||||
<li><a href="{% url 'books' %}">Books</a></li>
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="dropdown-authors">Authors<i class="material-icons right">arrow_drop_down</i></a></li>
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="dropdown-ratings">Ratings<i class="material-icons right">arrow_drop_down</i></a></li>
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="dropdown-tags">Tags<i class="material-icons right">arrow_drop_down</i></a></li>
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="dropdown-authors">Authors<i
|
||||
class="material-icons right">arrow_drop_down</i></a></li>
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="dropdown-ratings">Ratings<i
|
||||
class="material-icons right">arrow_drop_down</i></a></li>
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="dropdown-tags">Tags<i
|
||||
class="material-icons right">arrow_drop_down</i></a></li>
|
||||
</ul>
|
||||
<ul id="dropdown-authors" class="dropdown-content">
|
||||
{% for author in unique_authors %}
|
||||
@@ -74,18 +84,44 @@
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
<li><a href="{% url 'sign-up'%}?next={{request.path}}">Sign up</a></li>
|
||||
<li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
|
||||
<li><a href="{% url 'sign-up'%}?next={{request.path}}">Sign up</a></li>
|
||||
<li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<script>
|
||||
$(".dropdown-trigger").dropdown({hover: true, constrainWidth: false, coverTrigger: false});
|
||||
$(".dropdown-trigger").dropdown({
|
||||
hover: true,
|
||||
constrainWidth: false,
|
||||
coverTrigger: false
|
||||
});
|
||||
</script>
|
||||
|
||||
{% block content %} {% endblock %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
{% block content %} {% endblock %}
|
||||
{% else %}
|
||||
<div class="valign-wrapper" style="width:100%;height:100%;position: absolute;">
|
||||
<div class="valign" style="width:100%;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12 m6 offset-m3">
|
||||
<div class="card">
|
||||
<div class="card-content center">
|
||||
<p>You don't have permission to view this.</p>
|
||||
</div>
|
||||
<div class="card-action center">
|
||||
<a class="waves-effect waves-light btn-large green accent-4" href="{% url 'login'%}?next={{request.path}}">Login</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
function sortTable(n) {
|
||||
|
||||
Reference in New Issue
Block a user