fixed read_comic

This commit is contained in:
ajurna
2020-05-14 13:57:36 +01:00
parent 3b623c3f8b
commit 5e24ebd9d0
3 changed files with 41 additions and 42 deletions

1
.gitignore vendored
View File

@@ -49,6 +49,7 @@ var/
.installed.cfg .installed.cfg
*.egg *.egg
.idea/ .idea/
UnRAR.exe
# PyInstaller # PyInstaller
# Usually these files are written by a python script from a template # Usually these files are written by a python script from a template

View File

@@ -2,49 +2,47 @@
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
{% block content %} {% block content %}
<div class="container comic_box"> <div class="container comic_box justify-content-center">
<center> <div class="row justify-content-center">
<br/>
{% if nav.q_next_to_directory %} {% if nav.q_next_to_directory %}
<a href="/comic/{{ nav.next_path }}/"> <a href="/comic/{{ nav.next_path }}/">
{% else %} {% else %}
<a href="/comic/read/{{ nav.next_path }}/{{ nav.next_index }}/"> <a href="/comic/read/{{ nav.next_path }}/{{ nav.next_index }}/">
{% endif %} {% endif %}
<img src="/comic/read/{{ nav.cur_path }}/{{ nav.cur_index }}/img" class="img-responsive"> <img src="/comic/read/{{ nav.cur_path }}/{{ nav.cur_index }}/img" class="img-fluid">
</a> </a>
<br/> </div>
<div class="btn-group"> <div class="row justify-content-center mt-1 mb-1">
<div class="btn-group" role="group" aria-label="Navigation">
{% if nav.q_prev_to_directory %} {% if nav.q_prev_to_directory %}
{% if nav.prev_path %} {% if nav.prev_path %}
<a href="/comic/{{ nav.prev_path }}/" class="btn btn-default">Next</a> <a href="/comic/{{ nav.prev_path }}/" class="btn btn-secondary">Prev</a>
{% else %} {% else %}
<a href="/comic/" class="btn btn-default">Next</a> <a href="/comic/" class="btn btn-secondary">Prev</a>
{% endif %} {% endif %}
{% else %} {% else %}
<a href="/comic/read/{{ nav.prev_path }}/{{ nav.prev_index }}/" class="btn btn-default">Prev</a> <a href="/comic/read/{{ nav.prev_path }}/{{ nav.prev_index }}/" class="btn btn-secondary">Prev</a>
{% endif %} {% endif %}
{% if book.pages %} <div class="btn-group" role="group">
<div class="btn-group dropup"> <button id="page_list" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" data-toggle="dropdown" class="btn btn-default dropdown-toggle ">{{ orig_file_name }}<span class="caret"></span></button> {{ orig_file_name }}
<ul class="dropdown-menu" id="dropdown-list"> </button>
<div class="dropdown-menu" aria-labelledby="page_list">
{% for file in book.pages %} {% for file in book.pages %}
<li><a href="/comic/read/{{ nav.cur_path }}/{{ file.index }}/">{{ file.page_file_name }}</a></li> <a class="dropdown-item" href="/comic/read/{{ nav.cur_path }}/{{ file.index }}/">{{ file.page_file_name }}</a>
{% endfor %} {% endfor %}
</ul>
</div> </div>
{% else %} </div>
<button class="btn btn-default">No Pages</button>
{% endif %}
{% if nav.q_next_to_directory %} {% if nav.q_next_to_directory %}
{% if nav.next_path %} {% if nav.next_path %}
<a href="/comic/{{ nav.next_path }}/" class="btn btn-default">Next</a> <a href="/comic/{{ nav.next_path }}/" class="btn btn-secondary">Next</a>
{% else %} {% else %}
<a href="/comic/" class="btn btn-default">Next</a> <a href="/comic/" class="btn btn-secondary">Next</a>
{% endif %} {% endif %}
{% else %} {% else %}
<a href="/comic/read/{{ nav.next_path }}/{{ nav.next_index }}/" class="btn btn-default">Next</a> <a href="/comic/read/{{ nav.next_path }}/{{ nav.next_index }}/" class="btn btn-secondary">Next</a>
{% endif %} {% endif %}
</div> </div>
</center> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -24,7 +24,7 @@
/* background-color: #f5f5f5;*/ /* background-color: #f5f5f5;*/
/*}*/ /*}*/
/*.comic_box {*/ /*.comic_box {*/
/* width: auto;*/ /* width: 100%;*/
/*}*/ /*}*/
/*#dropdown-list{*/ /*#dropdown-list{*/