index.html 3.31 KB
Newer Older
Dennis Appel's avatar
Dennis Appel committed
1
{% extends "base.html" %}
Dennis Appel's avatar
Dennis Appel committed
2

Dennis Appel's avatar
Dennis Appel committed
3 4
{% load staticfiles %}

5
{% block title %}
6
{% with title="Wiki" %}
7 8 9 10
{{ block.super }}
{% endwith %}
{% endblock %}

Dennis Appel's avatar
Dennis Appel committed
11
{% block content %}
12
<section>
Dennis Appel's avatar
Dennis Appel committed
13

14
    {% if wiki_list %}
Dennis Appel's avatar
Dennis Appel committed
15

Dennis Appel's avatar
Dennis Appel committed
16
    <div class="grid-x">
Dennis Appel's avatar
Dennis Appel committed
17 18


19 20
        <div class="cell large-6 large-offset-3 content">
            <div class="grid-x grid-padding-x">
Dennis Appel's avatar
Dennis Appel committed
21

22
                {% for entry in wiki_list %}
23
                <div class="cell cell-background-lg vertical-space" id="item_{{entry.id}}" name="item_{{entry.id}}">
24 25 26 27
                    <section>
                        <h2>{{entry.wikiTitle}}</h2>
                        <p>{{entry.wikiText|safe}}</p>
                    </section>
Dennis Appel's avatar
Dennis Appel committed
28

29
                    {% if entry.wikiexample_set.all %}
Dennis Appel's avatar
Dennis Appel committed
30

31 32
                    <div class="grid-x grid-margin-x grid-padding-x vertical-space-bottom-small">
                        <div class="cell">
Dennis Appel's avatar
Dennis Appel committed
33 34 35
                            <div class="grid-x">
                                {% for example in entry.getPositiveExamples %}
                                <div class="cell vertical-space-small">
36
                                    <div class="callout primary example-callout">
Dennis Appel's avatar
Dennis Appel committed
37
                                        <h3>{{example.exampleTitle}}</h3>
38
                                        <img class="example-image" src="{% static 'images/examples/' %}{{example.exampleImage}}" alt="{{example.exampleImageAlt}}">
39
                                        <p>{{example.exampleText|safe}}</p>
Dennis Appel's avatar
Dennis Appel committed
40 41 42 43 44
                                    </div>
                                </div>
                                {% endfor %}
                            </div>
                        </div>
45
                        <div class="cell">
Dennis Appel's avatar
Dennis Appel committed
46 47 48
                            <div class="grid-x">
                                {% for example in entry.getNegativeExamples %}
                                <div class="cell vertical-space-small">
49
                                    <div class="callout primary example-callout">
Dennis Appel's avatar
Dennis Appel committed
50
                                        <h3>{{example.exampleTitle}}</h3>
51
                                        <img class="example-image" src="{% static 'images/examples/' %}{{example.exampleImage}}" alt="{{example.exampleImageAlt}}">
Dennis Appel's avatar
Dennis Appel committed
52 53 54 55 56 57
                                        <p>{{example.exampleText}}</p>
                                    </div>
                                </div>
                                {% endfor %}
                            </div>
                        </div>
58 59
                    </div>
                    {% endif %}
60
                    <a class="link" href="#wiki-navigation"><button class="button hollow">nach oben</button></a>
61
                </div>
Dennis Appel's avatar
Dennis Appel committed
62

63 64 65
                {% endfor %}
            </div>
        </div>
Dennis Appel's avatar
Dennis Appel committed
66

67 68 69 70 71 72 73 74 75 76 77 78 79
        <div class="cell large-2 large-offset-1 cell-background-wiki-mg wiki-navigation">
            <section>
                <div name="wiki-navigation" id="wiki-navigation" class="text-center">
                    <h4>Inhalt</h4>
                </div>
                <ul class="vertical menu">
                    {% for entry in wiki_list %}
                    <li>
                        <a class="wiki-navigation-link" href="#item_{{entry.id}}">{{entry.wikiTitle}}</a>
                    </li>
                    {% endfor %}
                </ul>
            </section>
80
        </div>
Dennis Appel's avatar
Dennis Appel committed
81

82
    </div>
83 84
    {% endif %}
</section>
Dennis Appel's avatar
Dennis Appel committed
85
{% endblock %}