Changed the way it handles paths to urlencode.

now supports subdirectories
added breadcrumbs
This commit is contained in:
2015-06-16 23:05:48 +01:00
parent 32680d1d01
commit fb3e8eae5b
5 changed files with 98 additions and 22 deletions

View File

@@ -1,11 +1,22 @@
{% extends "base.html" %}
{% block title %}My amazing blog{% endblock %}
{% block breadcrumb %}
{% for crumb in breadcrumbs %}
<li><a href="{{ crumb.url }}"{% if forloop.last %} class="active"{% endif %}>{{ crumb.name }}</a></li>
{% endfor %}
{% endblock %}
{% block content %}
<h2 class="center">Comics</h2>
<div class="list-group">
{% if file_list %}
{% for file in file_list %}
<a href="/comic/file/0/{{ file }}/" class="list-group-item">{{ file }}</a>
{% if file.isdir %}
<a href="/comic/{{ file.location }}/" class="glyphicon {{ file.icon }} list-group-item"> {{ file }}</a>
{% endif %}
{% if file.iscb %}
<a href="/comic/read/{{ file.location }}/0/" class="glyphicon {{ file.icon }} list-group-item"> {{ file }}</a>
{% endif %}
{% endfor %}
{% else %}
<p class="list-group-item">No comics.</p>

View File

@@ -2,12 +2,12 @@
{% block content %}
<center>
<br/>
<a href="/comic/file/{{ nav.next }}/{{ file_name }}/">
<img src="/comic/file/{{ nav.cur }}/{{ file_name }}/img" height="900"></img>
<a href="/comic/read/{{ file_name }}/{{ nav.next }}/">
<img src="/comic/read/{{ file_name }}/{{ nav.cur }}/img" height="900" class="img-rounded"></img>
</a>
<br/>
<a href="/comic/file/{{ nav.prev }}/{{ file_name }}/">Prev</a>
<a href="/comic/read/{{ file_name }}/{{ nav.prev }}/">Prev</a>
{% if pages %}
<select>
{% for file in pages %}
@@ -17,6 +17,6 @@
{% else %}
<p>No comics.</p>
{% endif %}
<a href="/comic/file/{{ nav.next }}/{{ file_name }}/">Next</a>
<a href="/comic/read/{{ file_name }}/{{ nav.next }}/">Next</a>
</center>
{% endblock %}