Update template

pull/6/head
beucismis 1 year ago
parent a2efd74e40
commit 8ee6dc1e18
  1. 14
      ozgursozluk/templates/index.html
  2. 40
      ozgursozluk/templates/topic.html

@ -30,5 +30,19 @@
</div>
</div>
{% endfor %}
<div class="info" style="padding-top: 0;">
<div></div>
<div>
{% if p > 1 %}
<a href="{{ url_for('index', p=p-1) }}">previous</a>
{% if p < 3 %}/{% endif %}
{% endif %}
{% if p < 3 %}<a href="{{ url_for('index', p=p+1) }}">next</a>{% endif %}
{% if 3 > 1 %}
-
<a href="{{ url_for('index', p=3) }}">last page</a>
{% endif %}
</div>
</div>
</div>
{% endblock %}

@ -8,41 +8,19 @@
<p>
{{ topic.title }} - şükela:
{% if topic.nice %}
<a href="{{ url_for('topic', title=topic.title_id()) }}">
<a href="{{ url_for('topic', title=topic.path) }}">
<b>nice</b>
</a>
{% else %}
<a href="{{ url_for('topic', title=topic.title_id(), p=p, a='nice') }}">nice</a>
<a href="{{ url_for('topic', title=topic.path, a='nice') }}">nice</a>
{% endif %}
</p>
</div>
<div>
{% if a %}
{% if p > 1 %}
<a href="{{ url_for('topic', title=topic.title_id(), p=p-1) }}">previous</a>
{% if p < topic.pagecount %}/{% endif %}
{% endif %}
{% if p < topic.pagecount %}
<a href="{{ url_for('topic', title=topic.title_id(), p=p+1) }}">next</a>
{% endif %}
{% if topic.pagecount > 1 %}
-
<a href="{{ url_for('topic', title=topic.title_id(), p=topic.pagecount) }}">last page</a>
{% if not topic.pagecount %}
|
<a href="{{ url_for('topic', title=topic.path) }}">all</a>
{% endif %}
{% else %}
{% if p > 1 %}
<a href="{{ url_for('topic', title=topic.title_id(), p=p-1, a=a) }}">previous</a>
{% if p < topic.pagecount %}/{% endif %}
{% endif %}
{% if p < topic.pagecount %}
<a href="{{ url_for('topic', title=topic.title_id(), p=p+1, a=a) }}">next</a>
{% endif %}
{% if topic.pagecount > 1 %}
-
<a href="{{ url_for('topic', title=topic.title_id(), p=topic.pagecount, a=a) }}">last page</a>
{% endif %}
{% endif %}
</p>
</div>
{% include "paginate.html" %}
</div>
{% for entry in topic.entrys %}
<div class="entry">
@ -61,5 +39,9 @@
</div>
</div>
{% endfor %}
<div class="info" style="padding-top: 0;">
<div></div>
{% include "paginate.html" %}
</div>
</div>
{% endblock %}

Loading…
Cancel
Save