2015-08-02 20:59:11 +02:00
|
|
|
<!DOCTYPE html>
|
2017-07-29 05:03:23 +02:00
|
|
|
<html lang="{{ g.user.locale }}">
|
2015-08-02 20:59:11 +02:00
|
|
|
<head>
|
2017-01-22 22:30:36 +02:00
|
|
|
<title>{{instance}} | {{title}}</title>
|
2015-08-02 20:59:11 +02:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
|
|
|
|
<!-- Bootstrap -->
|
2018-01-14 15:15:07 +02:00
|
|
|
<link rel="apple-touch-icon" sizes="140x140" href="{{ url_for('static', filename='favicon.ico') }}">
|
2016-03-27 23:36:51 +02:00
|
|
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
2017-02-07 20:11:18 +02:00
|
|
|
<link href="{{ url_for('static', filename='css/libs/bootstrap.min.css') }}" rel="stylesheet" media="screen">
|
2015-08-02 20:59:11 +02:00
|
|
|
<link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet" media="screen">
|
2018-04-02 10:09:19 +02:00
|
|
|
{% if g.user.get_theme == 1 %}
|
2018-04-03 17:59:06 +02:00
|
|
|
<link href="{{ url_for('static', filename='css/caliBlur-style.css') }}" rel="stylesheet" media="screen">
|
2018-04-02 10:09:19 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
|
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
|
|
<!--[if lt IE 9]>
|
|
|
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
|
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
|
|
|
<![endif]-->
|
2016-03-29 00:09:11 +02:00
|
|
|
|
2016-12-26 12:33:32 +02:00
|
|
|
{% block header %}{% endblock %}
|
2015-08-02 20:59:11 +02:00
|
|
|
</head>
|
2018-07-15 18:50:35 +02:00
|
|
|
<body class="{{ page }}">
|
2015-08-02 20:59:11 +02:00
|
|
|
<!-- Static navbar -->
|
|
|
|
<div class="navbar navbar-default navbar-static-top" role="navigation">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="navbar-header">
|
|
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
2016-11-09 20:24:33 +02:00
|
|
|
<span class="sr-only">{{_('Toggle navigation')}}</span>
|
2015-08-02 20:59:11 +02:00
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
</button>
|
2017-09-09 23:59:06 +02:00
|
|
|
<a class="navbar-brand" href="{{url_for('index')}}">{{instance}}</a>
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if g.user.is_authenticated or g.user.is_anonymous %}
|
2017-02-18 11:38:16 +02:00
|
|
|
<form class="navbar-form navbar-left" role="search" action="{{url_for('search')}}" method="GET">
|
|
|
|
<div class="form-group input-group input-group-sm">
|
2017-07-29 05:03:43 +02:00
|
|
|
<label for="query" class="sr-only">{{_('Search')}}</label>
|
|
|
|
<input type="text" class="form-control" id="query" name="query" placeholder="{{_('Search')}}">
|
2017-02-18 11:38:16 +02:00
|
|
|
<span class="input-group-btn">
|
|
|
|
<button type="submit" class="btn btn-default">{{_('Go!')}}</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="navbar-collapse collapse">
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if g.user.is_authenticated or g.user.is_anonymous %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<ul class="nav navbar-nav ">
|
2017-02-20 20:52:00 +02:00
|
|
|
<li><a href="{{url_for('advanced_search')}}"><span class="glyphicon glyphicon-search"></span><span class="hidden-sm"> {{_('Advanced Search')}}</span></a></li>
|
2015-08-02 20:59:11 +02:00
|
|
|
</ul>
|
2016-11-09 20:24:33 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<ul class="nav navbar-nav navbar-right" id="main-nav">
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if g.user.is_authenticated or g.user.is_anonymous %}
|
2016-04-27 10:35:23 +02:00
|
|
|
{% if g.user.role_upload() or g.user.role_admin()%}
|
2018-03-06 14:31:46 +02:00
|
|
|
{% if g.allow_upload %}
|
|
|
|
<li>
|
2018-03-26 20:50:04 +02:00
|
|
|
<form id="form-upload" class="navbar-form" action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
|
2018-03-06 14:31:46 +02:00
|
|
|
<div class="form-group">
|
2018-03-26 20:50:04 +02:00
|
|
|
<span class="btn btn-default btn-file">{{_('Upload')}}<input id="btn-upload" name="btn-upload" type="file" multiple></span>
|
2018-03-06 14:31:46 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2016-04-15 19:39:25 +02:00
|
|
|
{% endif %}
|
2018-07-30 20:12:41 +02:00
|
|
|
{% if g.user.role_admin() %}
|
|
|
|
<li><a id="top_tasks" href="{{url_for('get_tasks_status')}}"><span class="glyphicon glyphicon-tasks"></span><span class="hidden-sm"> {{_('Tasks')}}</span></a></li>
|
|
|
|
{% endif %}
|
2016-04-27 10:35:23 +02:00
|
|
|
{% if g.user.role_admin() %}
|
2017-02-18 11:38:16 +02:00
|
|
|
<li><a id="top_admin" href="{{url_for('admin')}}"><span class="glyphicon glyphicon-dashboard"></span><span class="hidden-sm"> {{_('Admin')}}</span></a></li>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% endif %}
|
2017-02-18 11:38:16 +02:00
|
|
|
<li><a id="top_user" href="{{url_for('profile')}}"><span class="glyphicon glyphicon-user"></span><span class="hidden-sm"> {{g.user.nickname}}</span></a></li>
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if not g.user.is_anonymous %}
|
2017-02-18 11:38:16 +02:00
|
|
|
<li><a id="logout" href="{{url_for('logout')}}"><span class="glyphicon glyphicon-log-out"></span><span class="hidden-sm"> {{_('Logout')}}</span></a></li>
|
2015-10-13 02:30:55 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
{% endif %}
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if g.allow_registration and not g.user.is_authenticated %}
|
2017-10-13 19:31:03 +02:00
|
|
|
<li><a id="login" href="{{url_for('login')}}"><span class="glyphicon glyphicon-log-in"></span> {{_('Login')}}</a></li>
|
2017-02-15 19:09:17 +02:00
|
|
|
<li><a id="register" href="{{url_for('register')}}"><span class="glyphicon glyphicon-user"></span> {{_('Register')}}</a></li>
|
2016-11-09 20:24:33 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
</ul>
|
|
|
|
</div><!--/.nav-collapse -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% for message in get_flashed_messages(with_categories=True) %}
|
|
|
|
{%if message[0] == "error" %}
|
2017-07-22 05:42:01 +02:00
|
|
|
<div class="row-fluid text-center" style="margin-top: -20px;">
|
2017-02-15 19:09:17 +02:00
|
|
|
<div id="flash_alert" class="alert alert-danger">{{ message[1] }}</div>
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
|
|
|
{%endif%}
|
|
|
|
{%if message[0] == "info" %}
|
2017-07-22 05:42:01 +02:00
|
|
|
<div class="row-fluid text-center" style="margin-top: -20px;">
|
2017-02-15 19:09:17 +02:00
|
|
|
<div id="flash_info" class="alert alert-info">{{ message[1] }}</div>
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
|
|
|
{%endif%}
|
|
|
|
{%if message[0] == "success" %}
|
2017-07-22 05:42:01 +02:00
|
|
|
<div class="row-fluid text-center" style="margin-top: -20px;">
|
2017-02-15 19:09:17 +02:00
|
|
|
<div id="flash_success" class="alert alert-success">{{ message[1] }}</div>
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
|
|
|
{%endif%}
|
|
|
|
{% endfor %}
|
2018-03-06 14:31:46 +02:00
|
|
|
<div id="loader" hidden="true">
|
|
|
|
<center>
|
2018-03-31 08:00:51 +02:00
|
|
|
<h3>{{_('Uploading...')}}</h3>
|
2018-03-31 13:30:22 +02:00
|
|
|
<span>{{_("please don't refresh the page")}}</span>.
|
2018-03-06 14:31:46 +02:00
|
|
|
<br />
|
|
|
|
<img src="{{ url_for('static', filename='img/loader.gif') }}">
|
|
|
|
</center>
|
|
|
|
</div>
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row-fluid">
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if g.user.is_authenticated or g.user.is_anonymous %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="col-sm-2">
|
|
|
|
<nav class="navigation">
|
|
|
|
<ul class="list-unstyled" id="scnd-nav" intent in-standard-append="nav.navigation" in-mobile-after="#main-nav" in-mobile-class="nav navbar-nav">
|
2016-11-09 20:24:33 +02:00
|
|
|
<li class="nav-head hidden-xs">{{_('Browse')}}</li>
|
2017-11-12 15:06:33 +02:00
|
|
|
{% if g.user.show_recent() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_new" {% if page == 'root' %}class="active"{% endif %}><a href="{{url_for('index')}}"><span class="glyphicon glyphicon-book"></span> {{_('Recently Added')}}</a></li>
|
2017-11-12 15:06:33 +02:00
|
|
|
{%endif%}
|
|
|
|
{% if g.user.show_sorted() %}
|
2017-07-06 04:09:01 +02:00
|
|
|
<li class="dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<span class="glyphicon glyphicon-sort-by-attributes"></span> {{_('Sorted Books')}}
|
|
|
|
<span class="caret"></span>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu">
|
2018-07-15 18:50:35 +02:00
|
|
|
<li {% if page == 'newest' %}class="active"{% endif %}><a href="{{url_for('newest_books')}}">{{_('Sort By')}} {{_('Newest')}}</a></li>
|
|
|
|
<li {% if page == 'oldest' %}class="active"{% endif %}><a href="{{url_for('oldest_books')}}">{{_('Sort By')}} {{_('Oldest')}}</a></li>
|
|
|
|
<li {% if page == 'a-z' %}class="active"{% endif %}><a href="{{url_for('titles_ascending')}}">{{_('Sort By')}} {{_('Title')}} ({{_('Ascending')}})</a></li>
|
|
|
|
<li {% if page == 'z-a' %}class="active"{% endif %}><a href="{{url_for('titles_descending')}}">{{_('Sort By')}} {{_('Title')}} ({{_('Descending')}})</a></li>
|
2017-07-06 04:09:01 +02:00
|
|
|
</ul>
|
|
|
|
</li>
|
2017-11-12 15:06:33 +02:00
|
|
|
{%endif%}
|
2016-11-09 20:24:33 +02:00
|
|
|
{% if g.user.show_hot_books() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_hot" {% if page == 'hot' %}class="active"{% endif %}><a href="{{url_for('hot_books')}}"><span class="glyphicon glyphicon-fire"></span> {{_('Hot Books')}}</a></li>
|
2016-11-09 20:24:33 +02:00
|
|
|
{%endif%}
|
2017-02-04 15:28:18 +02:00
|
|
|
{% if g.user.show_best_rated_books() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li {% if page == 'rated' %}class="active"{% endif %}><a href="{{url_for('best_rated_books')}}"><span class="glyphicon glyphicon-star"></span> {{_('Best rated Books')}}</a></li>
|
2017-02-04 15:28:18 +02:00
|
|
|
{%endif%}
|
2017-02-19 22:08:22 +02:00
|
|
|
{% if g.user.show_read_and_unread() %}
|
2017-11-17 19:29:29 +02:00
|
|
|
{% if not g.user.is_anonymous %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li {% if page == 'read' %}class="active"{% endif %}><a href="{{url_for('read_books')}}"><span class="glyphicon glyphicon-eye-open"></span> {{_('Read Books')}}</a></li>
|
2017-11-17 19:29:29 +02:00
|
|
|
{%endif%}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li {% if page == 'read' %}class="active"{% endif %}><a href="{{url_for('unread_books')}}"><span class="glyphicon glyphicon-eye-close"></span> {{_('Unread Books')}}</a></li>
|
2017-02-19 22:08:22 +02:00
|
|
|
{%endif%}
|
2016-11-09 20:24:33 +02:00
|
|
|
{% if g.user.show_random_books() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_rand" {% if page == 'discover' %}class="active"{% endif %}><a href="{{url_for('discover')}}"><span class="glyphicon glyphicon-random"></span> {{_('Discover')}}</a></li>
|
2016-11-09 20:24:33 +02:00
|
|
|
{%endif%}
|
|
|
|
{% if g.user.show_category() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_cat" {% if page == 'discover' %}class="category"{% endif %}><a href="{{url_for('category_list')}}"><span class="glyphicon glyphicon-inbox"></span> {{_('Categories')}}</a></li>
|
2016-11-09 20:24:33 +02:00
|
|
|
{%endif%}
|
|
|
|
{% if g.user.show_series() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_serie" {% if page == 'series' %}class="active"{% endif %}><a href="{{url_for('series_list')}}"><span class="glyphicon glyphicon-bookmark"></span> {{_('Series')}}</a></li>
|
2016-11-09 20:24:33 +02:00
|
|
|
{%endif%}
|
2017-10-13 19:31:03 +02:00
|
|
|
{% if g.user.show_author() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_author" {% if page == 'author' %}class="active"{% endif %}><a href="{{url_for('author_list')}}"><span class="glyphicon glyphicon-user"></span> {{_('Authors')}}</a></li>
|
2017-10-13 19:31:03 +02:00
|
|
|
{%endif%}
|
2016-11-09 20:24:33 +02:00
|
|
|
{% if g.user.filter_language() == 'all' and g.user.show_language() %}
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_lang" {% if page == 'language' %}class="active"{% endif %}><a href="{{url_for('language_overview')}}"><span class="glyphicon glyphicon-flag"></span> {{_('Languages')}} </a></li>
|
2016-11-09 20:24:33 +02:00
|
|
|
{%endif%}
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if g.user.is_authenticated or g.user.is_anonymous %}
|
2016-11-09 20:24:33 +02:00
|
|
|
<li class="nav-head hidden-xs">{{_('Public Shelves')}}</li>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% for shelf in g.public_shelfes %}
|
|
|
|
<li><a href="{{url_for('show_shelf', shelf_id=shelf.id)}}"><span class="glyphicon glyphicon-list"></span> {{shelf.name}}</a></li>
|
|
|
|
{% endfor %}
|
2016-11-09 20:24:33 +02:00
|
|
|
<li class="nav-head hidden-xs">{{_('Your Shelves')}}</li>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% for shelf in g.user.shelf %}
|
|
|
|
<li><a href="{{url_for('show_shelf', shelf_id=shelf.id)}}"><span class="glyphicon glyphicon-list"></span> {{shelf.name}}</a></li>
|
|
|
|
{% endfor %}
|
2017-10-10 16:18:28 +02:00
|
|
|
{% if not g.user.is_anonymous %}
|
2017-01-12 21:43:36 +02:00
|
|
|
<li id="nav_createshelf" class="create-shelf"><a href="{{url_for('create_shelf')}}">{{_('Create a Shelf')}}</a></li>
|
2018-07-15 18:50:35 +02:00
|
|
|
<li id="nav_about" {% if page == 'stat' %}class="active"{% endif %}><a href="{{url_for('stats')}}"><span class="glyphicon glyphicon-info-sign"></span> {{_('About')}}</a></li>
|
2016-11-09 20:24:33 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
{% endif %}
|
2017-01-12 21:43:36 +02:00
|
|
|
|
2015-08-02 20:59:11 +02:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
2016-11-09 20:24:33 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="col-sm-10">
|
|
|
|
{% block body %}{% endblock %}
|
2017-02-15 19:09:17 +02:00
|
|
|
{% if pagination and (pagination.has_next or pagination.has_prev) %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="pagination">
|
2017-07-28 16:37:25 +02:00
|
|
|
{% if pagination.has_prev %}
|
2018-08-16 21:17:26 +02:00
|
|
|
<a class="previous" href="{{ (pagination.page - 1)|url_for_other_page
|
2017-07-28 16:37:25 +02:00
|
|
|
}}">« {{_('Previous')}}</a>
|
|
|
|
{% endif %}
|
2017-02-15 19:09:17 +02:00
|
|
|
{% for page in pagination.iter_pages() %}
|
2015-08-02 20:59:11 +02:00
|
|
|
{% if page %}
|
|
|
|
{% if page != pagination.page %}
|
2018-08-16 21:17:26 +02:00
|
|
|
<a href="{{ (page)|url_for_other_page }}">{{ page }}</a>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% else %}
|
|
|
|
<strong>{{ page }}</strong>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
<span class="ellipsis">…</span>
|
|
|
|
{% endif %}
|
2017-02-15 19:09:17 +02:00
|
|
|
{% endfor %}
|
2015-08-02 20:59:11 +02:00
|
|
|
{% if pagination.has_next %}
|
2018-08-16 21:17:26 +02:00
|
|
|
<a class="next" href="{{ (pagination.page + 1)|url_for_other_page
|
2017-07-28 16:37:25 +02:00
|
|
|
}}">{{_('Next')}} »</a>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-06 18:21:35 +02:00
|
|
|
<div class="modal fade" id="bookDetailsModal" tabindex="-1" role="dialog" aria-labelledby="bookDetailsModalLabel">
|
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
<h4 class="modal-title" id="bookDetailsModalLabel">{{_('Book Details')}}</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">...</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{_('Close')}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-21 20:44:17 +02:00
|
|
|
{% block modal %}{% endblock %}
|
2017-07-29 05:07:10 +02:00
|
|
|
|
2018-07-30 20:12:41 +02:00
|
|
|
|
2017-07-29 05:07:10 +02:00
|
|
|
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
|
|
|
<!--script src="https://code.jquery.com/jquery.js"></script-->
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/jquery.min.js') }}"></script>
|
|
|
|
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/underscore-min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/intention.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/context.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/plugins.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/jquery.form.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
|
|
|
<script type="text/javascript">
|
2018-03-06 14:31:46 +02:00
|
|
|
$(function () {
|
|
|
|
$("#btn-upload").change(function () {
|
|
|
|
$("#loader").show();
|
|
|
|
$("#form-upload").submit();
|
|
|
|
});
|
|
|
|
});
|
2017-07-29 05:07:10 +02:00
|
|
|
</script>
|
|
|
|
|
2016-04-15 23:35:18 +02:00
|
|
|
{% block js %}{% endblock %}
|
2015-08-02 20:59:11 +02:00
|
|
|
</body>
|
2016-11-09 20:24:33 +02:00
|
|
|
</html>
|