You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.2 KiB

6 years ago
{% extends "layout.html" %}
{% block content %}
6 years ago
<div class="description">
<!--passing files
<p>{{ datafromjson }}</p>-->
6 years ago
<div class="allcontent">
6 years ago
<div class="item column">
{% set count=[0] %}
{% for item in datafromjson %}
{% if item.lower().endswith(('.png', '.jpg', '.jpeg')) %}
<img class="img-responsive" src=" ../{{ item }}">
{% elif item.lower().endswith(('.mp4')) %}
<video width="320" height="240" controls><source src="../{{ item }}" type="video/mp4">Your browser does not support the video tag.</video>
6 years ago
{% elif item.lower().endswith(('.mp3')) %}
<audio controls><source src="../{{ item }}" type="audio/mpeg">Your browser does not support the audio tag.</audio>
6 years ago
6 years ago
{% endif %}
{% endfor %}
</div>
<div class="text column">
6 years ago
<h2>{{ itemid }}. {{index_dict[itemid]}}</h2>
6 years ago
{% set count=[0] %}
{% for item in datafromjson %}
{% if item.lower().endswith(('.html')) %}
{{ textfiles[count[0]] }}
{% if count.append(count.pop() + 1) %}{% endif %}
<br/><br/><br/>
{% endif %}
{% endfor %}
</div>
6 years ago
</div>
</div>
{% set int_itemid = itemid|int %}
{% if itemid != "31" %}
{% set countplus = int_itemid + 1 %}
6 years ago
{% if int_itemid in range(1,9) %}
6 years ago
{% set addressplus = "/description?id=" + "0" + countplus|string %}
{% else %}
{% set addressplus = "/description?id=" + countplus|string %}
{% endif %}
{% else %}
{% set addressplus = "/description?id=" + itemid %}
{% endif %}
{% if itemid != "01" %}
{% set countminus = int_itemid - 1 %}
{% if int_itemid in range(1,11) %}
6 years ago
{% set addressminus = "/description?id=" + "0" + countminus|string %}
{% else %}
{% set addressminus = "/description?id=" + countminus|string %}
{% endif %}
{% else %}
{% set addressminus = "/description?id=" + itemid %}
{% endif %}
<nav class="nav_bottom">
<div id="bottom_descrip_left">
6 years ago
<li class="index"><a href="/index">index</a></li>
<li class="about"><a href="/about">about</a></li>
</div>
<div id="bottom_descrip_right">
<li class="next_item"><a href={{addressplus}}>next item</a></li>
<li class="prev_item"><a href={{addressminus}}>previous item</a></li>
<li class="no_here">{{itemid}}/31</li>
</div>
6 years ago
</nav>
{% endblock %}