Merge remote-tracking branch 'simple_view/master' into simple_view
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
{% extends "basic_layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div>
|
||||
|
||||
<h2 id="title">{{ entry.title }}</h2>
|
||||
<div>
|
||||
{% for author in entry.ordered_authors %}
|
||||
<p>{{ author.name.replace("|",",") }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="cover">
|
||||
<img title="{{ entry.title }}" src="{{ url_for('web.get_cover', book_id=entry.id, resolution='og', c=entry|last_modified) }}"/>
|
||||
</div>
|
||||
|
||||
{% if current_user.role_download() %}
|
||||
{% if entry.data|length %}
|
||||
<div>
|
||||
<h2>Download</h2>
|
||||
{% for format in entry.data %}
|
||||
<p>
|
||||
<a href="{{ url_for('web.download_link', book_id=entry.id, book_format=format.format|lower, anyname=entry.id|string+'.'+format.format|lower) }}">
|
||||
{{ format.format }} ({{ format.uncompressed_size|filesizeformat }})</a>
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
{% if entry.series|length > 0 %}
|
||||
<p>{{ _("Book %(index)s of %(range)s", index=entry.series_index | formatfloat(2), range=(entry.series[0].name)|safe) }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if entry.languages|length > 0 %}
|
||||
<div>
|
||||
<p>
|
||||
<span>
|
||||
{{_('Language')}}: {% for language in entry.languages %}{{language.language_name}}{% if not loop.last %}, {% endif %}{% endfor %}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if entry.identifiers|length > 0 %}
|
||||
<div>
|
||||
<p>
|
||||
<span></span>
|
||||
{% for identifier in entry.identifiers %}
|
||||
<p>{{ identifier.format_type() }}: {{ identifier|escape }}</p>
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if entry.publishers|length > 0 %}
|
||||
<div>
|
||||
<p>
|
||||
<span>{{ _('Publisher') }}:
|
||||
<span>{{ entry.publishers[0].name }}</span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if (entry.pubdate|string)[:10] != '0101-01-01' %}
|
||||
<div>
|
||||
<p>{{ _('Published') }}: {{ entry.pubdate|formatdate }} </p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if entry.comments|length > 0 and entry.comments[0].text|length > 0 %}
|
||||
<div>
|
||||
<h2 id="decription">{{ _('Description:') }}</h2>
|
||||
{{ entry.comments[0].text|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,32 @@
|
||||
{% extends "basic_layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<div class="pagination">
|
||||
<div>
|
||||
{% if pagination.has_prev %}
|
||||
<a href="{{ (pagination.page - 1)|url_for_other_page }}">« {{_('Previous')}}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{% if pagination.has_next %}
|
||||
<a href="{{ (pagination.page + 1)|url_for_other_page }}">{{_('Next')}} »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if entries|length < 1 %}
|
||||
<p>{{_('No Results Found')}}</p>
|
||||
{% endif %}
|
||||
|
||||
{% for entry in entries %}
|
||||
{% if entry.Books.authors %}
|
||||
{% set author = entry.Books.authors[0].name.replace('|',',')|shortentitle(30) %}
|
||||
{% else %}
|
||||
{% set author = '' %}
|
||||
{% endif %}
|
||||
<a href="{{ url_for('basic.show_book', book_id=entry.Books.id) }}">
|
||||
<p class="listing" title="{{entry.Books.title}}">{{ author }} - {{entry.Books.title|shortentitle}}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ current_user.locale }}">
|
||||
|
||||
<head>
|
||||
<title>{{instance}} | {{title}}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name='viewport' content='initial-scale=1,maximum-scale=5,user-scalable=no' />
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
nav {
|
||||
height: 75px;
|
||||
padding: 5px 20px;
|
||||
width: 100%;
|
||||
display: table;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
|
||||
nav > * {
|
||||
display: inline-block;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
float: none;
|
||||
text-align: center;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
nav > *:first-child {
|
||||
text-align: left;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
nav > *:last-child {
|
||||
text-align: right;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
nav > a {
|
||||
color: black;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.search {
|
||||
margin: auto auto;
|
||||
}
|
||||
|
||||
form > input {
|
||||
width: 18ch;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
form > * {
|
||||
height: 50px;
|
||||
background-color: white;
|
||||
border-radius: 0;
|
||||
border: 1px solid #ccc;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
form > span {
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
button {
|
||||
border: none;
|
||||
padding: 0 10px;
|
||||
margin: 0;
|
||||
width: 160px;
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.body {
|
||||
padding: 5px 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: black;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 150px;
|
||||
height: 250px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.listing {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.pagination > div {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.pagination > div:last-child {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<div>
|
||||
{% if current_user.is_authenticated or g.allow_anonymous %}
|
||||
<nav>
|
||||
<a href="/basic">
|
||||
<span><h1>{{_('Home')}}</h1></span>
|
||||
</a>
|
||||
<div class="search">
|
||||
<form role="search" action="{{url_for('basic.index')}}" method="GET">
|
||||
<input type="text" id="query" name="query" placeholder="{{_('Search Library')}}" value="{{searchterm}}">
|
||||
<span>
|
||||
<button type="submit" id="query_submit">{{_('Search')}}</button>
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
{% if not current_user.is_anonymous %}
|
||||
<a href="{{url_for('web.logout')}}">
|
||||
<span>{{_('Logout')}}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -37,7 +37,7 @@
|
||||
<a class="navbar-brand" href="{{url_for('web.index')}}">{{instance}}</a>
|
||||
</div>
|
||||
{% if g.current_theme == 1 %}
|
||||
<div class="home-btn"><a class="home-btn-tooltip" href="{{url_for("web.index",page=1)}}" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Home"></a></div>
|
||||
<div class="home-btn"><a class="home-btn-tooltip" href="{{url_for("web.index", page=1)}}" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Home"></a></div>
|
||||
<div class="plexBack"><a href="{{url_for('web.index')}}"></a></div>
|
||||
{% endif %}
|
||||
{% if current_user.is_authenticated or g.allow_anonymous %}
|
||||
|
||||
Reference in New Issue
Block a user