Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
4
    Moodle is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
7
    (at your option) any later version.
8
 
9
    Moodle is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
    GNU General Public License for more details.
13
 
14
    You should have received a copy of the GNU General Public License
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
    @template unilabeltype_imageboard/imagegrid
19
    Template to show the grid of the imageboard.
20
 
21
    Example context (json):
22
    {
23
        "helpergrids": [
24
            {
25
                "x": 10,
26
                "y": 10
27
            },
28
            {
29
                "x": 20,
30
                "y": 10
31
            },
32
            {
33
                "x": 30,
34
                "y": 10
35
            },
36
            {
37
                "x": 10,
38
                "y": 20
39
            }
40
        ],
41
        "gridcolor": "#000000",
42
        "cmid": "140"
43
    }
44
}}
45
<div id="unilabeltype-imageboard-helpergrid-{{cmid}}" class="hidden">
46
    {{#helpergrids}}
47
        <div style="position: absolute;
48
                left: {{x}}px;
49
                top: {{y}}px;
50
                width: 50px;
51
                height: 50px;
52
                border-right: solid 1px {{gridcolor}};
53
                border-bottom: solid 1px {{gridcolor}};
54
                z-index: 1;">
55
        </div>
56
 
57
        <!-- xAxis -->
58
        {{^y}}
59
            <div style="position: absolute;
60
                    left: calc({{x}}px - 10px);
61
                    top: -12px;
62
                    color: #fff;
63
                    text-shadow: 2px 2px #02023f;
64
                    z-index: 1;">
65
                {{x}}
66
            </div>
67
        {{/y}}
68
 
69
        <!-- yAxis -->
70
        {{^x}}
71
            <div style="position: absolute;
72
                    left: 0;
73
                    top: calc({{y}}px - 12px);
74
                    color: #fff;
75
                    text-shadow: 2px 2px #02023f;
76
                    z-index: 1;">
77
                {{y}}
78
            </div>
79
        {{/x}}
80
 
81
    {{/helpergrids}}
82
 
83
</div>