new color, better submit buttons, book detail img title overlay fix, permission denied screen beautified
This commit is contained in:
commit
ee7a0bfc32
Binary file not shown.
@ -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">
|
||||
|
||||
@ -17,21 +18,27 @@
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.author {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.rating {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.tags {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.added {
|
||||
width: 20%;
|
||||
}
|
||||
@ -42,7 +49,7 @@
|
||||
|
||||
<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 %}
|
||||
@ -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 %}
|
||||
@ -82,10 +92,36 @@
|
||||
</nav>
|
||||
</div>
|
||||
<script>
|
||||
$(".dropdown-trigger").dropdown({hover: true, constrainWidth: false, coverTrigger: false});
|
||||
$(".dropdown-trigger").dropdown({
|
||||
hover: true,
|
||||
constrainWidth: false,
|
||||
coverTrigger: false
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
{% 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) {
|
||||
|
@ -1,6 +1,22 @@
|
||||
{% if user.is_authenticated %}
|
||||
|
||||
{% else %}
|
||||
<h1>You don't have permission to view this.</h1>
|
||||
<li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
|
||||
<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 %}
|
@ -1,10 +1,15 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% load static %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col s4"><a href="{{download}}"><img src="{{imgpath}}" alt="download" srcset=""></a></div>
|
||||
<div class="col s8">
|
||||
<div class="col s12 m7">
|
||||
<div class="card z-depth-0 horizontal">
|
||||
<div class="card-image">
|
||||
<a style="padding-top:15%" href="{{download}}"><img src=" {% static "" %}{{imgpath}}" alt="download" srcset=""></a>
|
||||
</div>
|
||||
<div class="card-stacked">
|
||||
<div class="card-content">
|
||||
<h1> {{book.title}}</h1>
|
||||
<h4> by
|
||||
{% if book.authors %}
|
||||
@ -44,6 +49,8 @@
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
{% autoescape off %}
|
||||
|
@ -30,7 +30,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<input type="submit" value="login" />
|
||||
<button class="waves-effect waves-light btn green accent-4" type="submit">login</button>
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</form>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% block content %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %} {{form.as_p}} <input type="submit" value="Sign up"></form>
|
||||
{% csrf_token %} {{form.as_p}} <button class="waves-effect waves-light btn green accent-4" type="submit">sign up</button></form>
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<input id="title" type="text" name="title" value="">
|
||||
<label for="author">Author: </label>
|
||||
<input id="author" type="text" name="author" value="">
|
||||
<input type="submit" value="search">
|
||||
<button class="waves-effect waves-light btn green accent-4" type="submit">search</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
<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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user