new css framework, changed book detail and search, reworked tables
This commit is contained in:
@ -4,14 +4,14 @@
|
||||
{% load static %}
|
||||
<h1>{{author}}</h1>
|
||||
|
||||
<table id="books">
|
||||
<table id="books" class="highlight centered">
|
||||
<tr>
|
||||
<!--When a header is clicked, run the sortTable function, with a parameter, 0 for sorting by names, 1 for sorting by country:-->
|
||||
<th onclick="sortTable(0)">Title</th>
|
||||
<th onclick="sortTable(1)">Author</th>
|
||||
<th onclick="sortTable(2)">Rating</th>
|
||||
<th onclick="sortTable(3)">Tags</th>
|
||||
<th onclick="sortTable(4)">Added</th>
|
||||
<th class="title" onclick="sortTable(0)">Title</th>
|
||||
<th class="author" onclick="sortTable(1)">Author</th>
|
||||
<th class="rating" onclick="sortTable(2)">Rating</th>
|
||||
<th class="tags" onclick="sortTable(3)">Tags</th>
|
||||
<th class="added" onclick="sortTable(4)">Added</th>
|
||||
</tr>
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
|
@ -2,16 +2,20 @@
|
||||
|
||||
{% block content %}
|
||||
{% load static %}
|
||||
<h1>{{book.title}} by
|
||||
|
||||
<div class="row">
|
||||
<div class="col s4"><a href="{% static "" %}{{download}}"><img src="{% static "" %}{{imgpath}}" alt="download" srcset=""></a></div>
|
||||
<div class="col s8">
|
||||
<h1> {{book.title}}</h1>
|
||||
<h4> by
|
||||
{% if book.authors %}
|
||||
{% for author in book.authors.all %}
|
||||
<a href="{{author.get_absolute_url}}">{{author.name}}</a>
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
|
||||
{{book.author_sort}}
|
||||
{%endif%}
|
||||
|
||||
<br>
|
||||
Published by
|
||||
{% if book.publishers %}
|
||||
{% for pub in book.publishers.all %}
|
||||
@ -19,9 +23,8 @@
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
Unknown
|
||||
|
||||
{%endif%}
|
||||
|
||||
<br>
|
||||
Tags:
|
||||
{% if book.tags %}
|
||||
{% for tag in book.tags.all %}
|
||||
@ -29,7 +32,7 @@
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{%endif%}
|
||||
|
||||
<br>
|
||||
Rating:
|
||||
{% if book.ratings %}
|
||||
{% for rating in book.ratings.all %}
|
||||
@ -37,14 +40,16 @@
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{%endif%}
|
||||
|
||||
<br>
|
||||
<a href="{{book.publisher.get_absolute_url}}">{{book.publisher}}</a>
|
||||
</h1>
|
||||
|
||||
<a href="{% static "" %}{{download}}"><img src="{% static "" %}{{imgpath}}" alt="download" srcset=""></a>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
{% autoescape off %}
|
||||
{{comment}}
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@ -1,17 +1,21 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% load static %}
|
||||
<h1>Book List</h1>
|
||||
|
||||
<table id="books">
|
||||
<h1 class="center">Book List</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s1 m0">
|
||||
</div>
|
||||
<div class="col s10 m12">
|
||||
<table id="books" class="highlight centered">
|
||||
<tr>
|
||||
<!--When a header is clicked, run the sortTable function, with a parameter, 0 for sorting by names, 1 for sorting by country:-->
|
||||
<th onclick="sortTable(0)">Title</th>
|
||||
<th onclick="sortTable(1)">Author</th>
|
||||
<th onclick="sortTable(2)">Rating</th>
|
||||
<th onclick="sortTable(3)">Tags</th>
|
||||
<th onclick="sortTable(4)">Added</th>
|
||||
<th class="title" onclick="sortTable(0)">Title</th>
|
||||
<th class="author" onclick="sortTable(1)">Author</th>
|
||||
<th class="rating" onclick="sortTable(2)">Rating</th>
|
||||
<th class="tags" onclick="sortTable(3)">Tags</th>
|
||||
<th class="added" onclick="sortTable(4)">Added</th>
|
||||
</tr>
|
||||
{% for book in book_list %}
|
||||
<tr>
|
||||
@ -30,11 +34,8 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col s1 m0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@ -5,14 +5,14 @@
|
||||
<h1>{{publisher}} </h1>
|
||||
|
||||
{% if publisher.released %}
|
||||
<table id="books">
|
||||
<table id="books" class="highlight centered">
|
||||
<tr>
|
||||
<!--When a header is clicked, run the sortTable function, with a parameter, 0 for sorting by names, 1 for sorting by country:-->
|
||||
<th onclick="sortTable(0)">Title</th>
|
||||
<th onclick="sortTable(1)">Author</th>
|
||||
<th onclick="sortTable(2)">Rating</th>
|
||||
<th onclick="sortTable(3)">Tags</th>
|
||||
<th onclick="sortTable(4)">Added</th>
|
||||
<th class="title" onclick="sortTable(0)">Title</th>
|
||||
<th class="author" onclick="sortTable(1)">Author</th>
|
||||
<th class="rating" onclick="sortTable(2)">Rating</th>
|
||||
<th class="tags" onclick="sortTable(3)">Tags</th>
|
||||
<th class="added" onclick="sortTable(4)">Added</th>
|
||||
</tr>
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
|
@ -3,16 +3,16 @@
|
||||
{% block content %}
|
||||
{% load static %}
|
||||
|
||||
<h1>{{rating}}</h1>
|
||||
<h1 class="left">⭐ {{rating}}</h1>
|
||||
{% if books %}
|
||||
<table id="books">
|
||||
<table id="books" class="highlight centered">
|
||||
<tr>
|
||||
<!--When a header is clicked, run the sortTable function, with a parameter, 0 for sorting by names, 1 for sorting by country:-->
|
||||
<th onclick="sortTable(0)">Title</th>
|
||||
<th onclick="sortTable(1)">Author</th>
|
||||
<th onclick="sortTable(2)">Rating</th>
|
||||
<th onclick="sortTable(3)">Tags</th>
|
||||
<th onclick="sortTable(4)">Added</th>
|
||||
<th class="title" onclick="sortTable(0)">Title</th>
|
||||
<th class="author" onclick="sortTable(1)">Author</th>
|
||||
<th class="rating" onclick="sortTable(2)">Rating</th>
|
||||
<th class="tags" onclick="sortTable(3)">Tags</th>
|
||||
<th class="added" onclick="sortTable(4)">Added</th>
|
||||
</tr>
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
<h1>{{tag}}</h1>
|
||||
{% if books %}
|
||||
<table id="books">
|
||||
<table id="books" class="highlight centered">
|
||||
<tr>
|
||||
<!--When a header is clicked, run the sortTable function, with a parameter, 0 for sorting by names, 1 for sorting by country:-->
|
||||
<th onclick="sortTable(0)">Title</th>
|
||||
<th onclick="sortTable(1)">Author</th>
|
||||
<th onclick="sortTable(2)">Rating</th>
|
||||
<th onclick="sortTable(3)">Tags</th>
|
||||
<th onclick="sortTable(4)">Added</th>
|
||||
<th class="title" onclick="sortTable(0)">Title</th>
|
||||
<th class="author" onclick="sortTable(1)">Author</th>
|
||||
<th class="rating" onclick="sortTable(2)">Rating</th>
|
||||
<th class="tags" onclick="sortTable(3)">Tags</th>
|
||||
<th class="added" onclick="sortTable(4)">Added</th>
|
||||
</tr>
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
|
Reference in New Issue
Block a user