contest.hbs 4.52 KB
Newer Older
1
2
3
4
5
6
7
<!DOCTYPE html>
<html lang="en" style="background-color: #fafafa;">
  <head>
    <meta charset="utf-8">
    <title>Jugendwettbewerb Informatik: Programmieren – einfacher als du denkst!</title>
    <link rel="stylesheet" href="/static/lib/bulma/bulma-0.7.5.css">
    <link rel="icon" href="/static/images/favicon.png" type="image/png">
8
9
10
11
12
13
14
    <style>
      ul {
      list-style-type: none;
      font-size:x-large;
      margin-left:20px;
      }
    </style>
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  </head>
  <body style="background-color: white;">
    <div class="container">
      <div class="columns">
        <div class="column is-two-thirds">
          <p>&nbsp;<p>
          <a href="/">
            <img style="float:left; margin: 0px 10px;" src="/static/images/klein.png">
          </a>
          <h1 class="title">Jugendwettbewerb Informatik</h1>
          <h2 class="subtitle">Programmieren – einfacher als du denkst!</h2>
        </div>
        <div class="column is-one-third">
          &nbsp;
          {{#if logged_in}}
            <!--div class="columns alogin">
              <div class="column is-four-fifths">
                Eingeloggt als <em>{{ username }}</em>
                {{#if firstname}}{{#if lastname}}
                  ({{firstname}} {{lastname}})
                {{/if}}{{/if}}
                {{#if teacher}}
                  [Lehrer]
                {{/if}}
                <br>
                <a href="/profile" class="button is-info is-small">👤 &nbsp; Profil</a>
                {{#if teacher}}
                  <a href="/group/" class="button is-info is-small">⚙ &nbsp; Gruppenverwaltung</a>
                {{/if}}
              </div>
              <div class="column"><a href="/logout" class="button is-small is-danger" type="submit">⨯ &nbsp; Logout</a></div>
            </div>
            <div class="columns alogin">
              <div class="column"></div>
            </div-->
          {{/if}}
        </div>
      </div>
53

54
55
56
57
58
59
60
61
62
63
      {{#if teacher}}
        <div class="columns alogin">
          <div class="column is-8 is-offset-2">
            <div class="notification is-warning">
              <h3 class="title is-5">Gruppenverwaltung</h3>
              <a href="/group/">Gruppen für die Wettbewerbsteilnahme anlegen und verwalten</a>
            </div>
          </div>
        </div>
      {{/if}}
64

65
66
67
68
69
      <div class="columns">
        <div class="column is-8 is-offset-2">
          <div style="min-height: 400px; margin-bottom:100px;">
            <h3 class="title is-4">{{ contest.name }}</h3>
            {{#if contest.duration}}<h4 class="subtitle is-5">Dauer: {{contest.duration}} Minuten</h4>{{/if}}
70

71
            {{#if participation_start_date}}
72
73
74
75
76
              <p>
                {{#if time_left}}
                  Verbleibenden Zeit: {{time_left}}
                {{/if}}
              </p>
77

78
79
80
              {{#each contest.tasks}}
                <div style="margin: 10px;">
                  {{name}}
81
   
82
83
                  <ul>
                    {{#each subtasks}}
84
                    <li><a href="/task/{{id}}" class="button is-link is-outlined">{{linktext}}</a></li>
85
86
87
88
                    {{/each}}
                  </ul>
                </div>
              {{/each}}
89

90
91
92
93
94
95
            <hr>
            <p>
              Punktestand: {{ total_points }} ★ / {{ max_total_points }}&nbsp; ({{ relative_points }} %)
            </p>
                
            {{else}}
96

97
98
99
              {{#if can_start}}
                <p>
                  <form action="" method="post">
100
                    <input type="hidden" name="csrf_token" value="{{csrf_token}}">
101
102
103
                    <input class="button is-warning" type="submit" value="⏱ &nbsp; Jetzt starten!">
                  </form>
                </p>
104

105
                <p>Der Wettbewerb kann nach dem Starten nicht mehr pausiert werden.</p>
106
              {{/if}}
107
            {{/if}}
108
109
110
111
112
113
114
115
116
117
118
119
          </div>
        </div>
      </div>
    </div>
    &nbsp;
    <footer class="footer">
      <div class="content has-text-centered">
        <p>
          Der <strong>Jugendwettbewerb Informatik</strong> ist ein Angebot der <a href="https://bwinf.de">Bundesweiten Informatikwettbewerbe</a>.
          </p>
      </div>
    </footer>
120
121
122
123
124
125
126
127
128
129
130
131
132
133

    <script>
      // Reload page as soon as you come back from another task via the back button in order to show the newly achieved stars

      window.onpageshow = function(event) {
        if (window.history.state == 1) {
          window.history.pushState(0, "title");
          location.reload();
        } else {
          window.history.pushState(1, "title");
        }
      }

    </script>
134
135
  </body>
</html>