summaryrefslogtreecommitdiff
path: root/templates/stories.html
blob: 431453cc766cad861ed6bc78b9a3a255345459f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% extends "base.html" %}
{% block title %}Stories{% endblock title %}
{% block content %}
<div class="works-filter">
    <form>
        <label for="language">Language: </label>
        <select name="language" id="language-select">
            <option value="*">All</option>
            {% for work in works | unique(attribute="language") %}
            <option value="{{work.language}}">{{work.language}}</option>
            {% endfor %}
        </select>
        <label for="story-type">Story Type: </label>
        <select name="story-type" id="story-type-select">
            <option value="*">All</option>
            {% for work in works | unique(attribute="story_type") %}
            <option value="{{work.story_type}}">{{work.story_type}}</option>
            {% endfor %}
        </select>
    </form>
</div>
<div class="works">
    {% for work in works %}
        <a href="{{work.path_to_document}}" style="background-image: url('./images/workcardimages/{{work.path_to_image}}');" class="work-card" download>
                    <div class="title-and-description">
                        <h3>{{work.title}}</h3>
                        <p>{{work.description}}</p>
                    </div>
                    <div class="info">
                        <span>{{work.number_of_pages}} Pages</span>
                        <span class="story-language">{{work.language}}</span>
                        <span class="story-type">{{work.story_type}}</span>
                    </div>
        </a>
    {% endfor %}
</div>
{% endblock content %}
{% block jsfile %}<script src="./stories.js"></script>{% endblock jsfile %}