index.html 3.1 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 6 7 8 9 10
{% block title %}
{% with title="Startseite" %}
{{ 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
        <div class="cell large-2 cell-background-wiki-mg wiki-navigation">
19
            <section>
20
            <div name="wiki-navigation" id="wiki-navigation" class="text-center">
Dennis Appel's avatar
Dennis Appel committed
21
                <h4>Inhalt</h4>
22 23 24 25 26 27 28 29
            </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>
30
            </section>
31
        </div>
Dennis Appel's avatar
Dennis Appel committed
32

Dennis Appel's avatar
Dennis Appel committed
33
        <div class="cell large-6 large-offset-1 content">
Dennis Appel's avatar
Dennis Appel committed
34

35 36 37 38
            {% for entry in wiki_list %}
            <section>
                <div class="cell cell-background-lg vertical-space" id="item_{{entry.id}}" name="item_{{entry.id}}">
                    <h2>{{entry.wikiTitle}}</h2>
39
                    <p>{{entry.wikiText|safe}}</p>
40
                    <a class="link" href="#wiki-navigation">nach oben</a>
Dennis Appel's avatar
Dennis Appel committed
41

42
                    {% if entry.wikiexample_set.all %}
Dennis Appel's avatar
Dennis Appel committed
43

Dennis Appel's avatar
Dennis Appel committed
44 45 46 47 48 49 50 51

                    <div class="grid-x grid-margin-x">
                        <div class="cell large-6">
                            <div class="grid-x">
                                {% for example in entry.getPositiveExamples %}
                                <div class="cell vertical-space-small">
                                    <div class="callout success example-callout">
                                        <h3>{{example.exampleTitle}}</h3>
52
                                        <img class="example-image" src="{% static 'images/examples/' %}{{example.exampleImage}}" alt="{{example.exampleImageAlt}}">
53
                                        <p>{{example.exampleText|safe}}</p>
Dennis Appel's avatar
Dennis Appel committed
54 55 56 57 58 59 60 61 62 63 64
                                    </div>
                                </div>
                                {% endfor %}
                            </div>
                        </div>
                        <div class="cell large-6">
                            <div class="grid-x">
                                {% for example in entry.getNegativeExamples %}
                                <div class="cell vertical-space-small">
                                    <div class="callout alert example-callout">
                                        <h3>{{example.exampleTitle}}</h3>
65
                                        <img class="example-image" src="{% static 'images/examples/' %}{{example.exampleImage}}" alt="{{example.exampleImageAlt}}">
Dennis Appel's avatar
Dennis Appel committed
66 67 68 69 70 71
                                        <p>{{example.exampleText}}</p>
                                    </div>
                                </div>
                                {% endfor %}
                            </div>
                        </div>
72 73 74
                    </div>
                    {% endif %}
                </div>
Dennis Appel's avatar
Dennis Appel committed
75

76 77
            </section>
            {% endfor %}
Dennis Appel's avatar
Dennis Appel committed
78

79 80
        </div>
    </div>
Dennis Appel's avatar
Dennis Appel committed
81

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