~openteachermaintainers/openteacher/3.x

« back to all changes in this revision

Viewing changes to node_modules/ot-html-generator-words/template.html

  • Committer: Marten de Vries
  • Date: 2017-06-28 18:05:48 UTC
  • Revision ID: git-v1:b4c406307aa345c58b9904b76580f15c5bff2a4e
Move JS into npm modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{% /*
 
2
        Copyright 2011-2013, Marten de Vries
 
3
 
 
4
        This file is part of OpenTeacher.
 
5
 
 
6
        OpenTeacher is free software: you can redistribute it and/or modify
 
7
        it under the terms of the GNU General Public License as published by
 
8
        the Free Software Foundation, either version 3 of the License, or
 
9
        (at your option) any later version.
 
10
 
 
11
        OpenTeacher is distributed in the hope that it will be useful,
 
12
        but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
        GNU General Public License for more details.
 
15
 
 
16
        You should have received a copy of the GNU General Public License
 
17
        along with OpenTeacher.  If not, see <http://www.gnu.org/licenses/>.
 
18
*/ %}
 
19
<!DOCTYPE html>
 
20
<html>
 
21
        <head>
 
22
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
23
                <title>{%= o.list.title || "" %}</title>
 
24
                <style type='text/css'>
 
25
                        body {
 
26
                                font-family:Verdana, Helvetica, Arial, sans-serif;
 
27
                                margin:{%= o.margin %};
 
28
                        }
 
29
 
 
30
                        h1 {
 
31
                                font-size:x-large;
 
32
                        }
 
33
 
 
34
                        table {
 
35
                                border-collapse:collapse;
 
36
                                width:100%;
 
37
                        }
 
38
 
 
39
                        th {
 
40
                                text-align:left;
 
41
                                border-bottom:1px solid #000;
 
42
                        }
 
43
 
 
44
                        .number {
 
45
                                text-align:right;
 
46
                                color:#888;
 
47
                                padding-left:0;
 
48
                        }
 
49
 
 
50
                        .question, #question-header {
 
51
                                padding-left:1em;
 
52
                        }
 
53
 
 
54
                        .answer, #answer-header {
 
55
                                padding-left:2em;
 
56
                                padding-right:0;
 
57
                        }
 
58
 
 
59
                        {% if (o.coloredRows) { %}
 
60
                        .even {
 
61
                                background-color:#ddd;
 
62
                        }
 
63
                        {% } %}
 
64
 
 
65
                        th, td {
 
66
                                padding: 0.25em;
 
67
                        }
 
68
                </style>
 
69
        </head>
 
70
        <body>
 
71
                <h1>{%= o.list.title || "" %}</h1>
 
72
                <table>
 
73
                        <thead>
 
74
                                <tr>
 
75
                                        <th id='number-header'></th>
 
76
                                        <th id='question-header'>{%= o.list.questionLanguage || "" %}</th>
 
77
                                        <th id='answer-header'>{%= o.list.answerLanguage || "" %}</th>
 
78
                                </tr>
 
79
                        </thead>
 
80
                        <tbody>
 
81
                        {% for (var i = 0; i < (o.list.items || []).length; i += 1) { %}
 
82
                                {% if (i % 2) { %}
 
83
                                <tr class='even'>
 
84
                                {% } else { %}
 
85
                                <tr class='odd'>
 
86
                                {% } %}
 
87
                                        <td class='number'>{%= i + 1 %}</td>
 
88
                                        <td class='question'>{%= o.compose(o.list.items[i].questions || []) %}</td>
 
89
                                        <td class='answer'>{%= o.compose(o.list.items[i].answers || []) %}</td>
 
90
                                </tr>
 
91
                        {% } %}
 
92
                        </tbody>
 
93
                </table>
 
94
        </body>
 
95
</html>