mirrored from git://git.moodle.org/moodle.git
/
block.mustache
63 lines (53 loc) · 1.56 KB
/
block.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
53
54
55
56
57
58
59
60
61
62
63
{{!
@template theme_boost/block
Example context (json):
{
"id": "block0",
"showskiplink": true,
"type": "html",
"ariarole": "complementary",
"title": "Test block",
"blockinstanceid": 1,
"content": "<p>Hello block world!</p>"
}
}}
{{! Block Skip Link }}
{{#showskiplink}}
<a href="#sb-{{skipid}}" class="sr-only sr-only-focusable">{{#str}}skipa, access, {{title}}{{/str}}</a>
{{/showskiplink}}
{{! Start Block Container }}
<aside id="{{id}}"
class="{{#hidden}}hidden{{/hidden}} block block_{{type}} {{#hascontrols}}block_with_controls{{/hascontrols}} card m-b-1"
role="{{ariarole}}"
data-block="{{type}}"
{{#arialabel}}
aria-label={{#quote}}{{{arialabel}}}{{/quote}}
{{/arialabel}}
{{^arialabel}}
{{#title}}
aria-labelledby="instance-{{blockinstanceid}}-header"
{{/title}}
{{/arialabel}}>
{{! Block contents }}
<div class="card-block content">
{{#hascontrols}}
<div class="block-controls pull-xs-right">
{{{controls}}}
</div>
{{/hascontrols}}
{{! Block header }}
{{#title}}
<h3 id="instance-{{blockinstanceid}}-header" class="card-title">{{{title}}}</h3>
{{/title}}
<div class="card-text">
{{{content}}}
{{{footer}}}
{{{annotation}}}
</div>
</div>
{{! End Block Container }}
</aside>
{{! Block Skip Link Target }}
{{#showskiplink}}
<span id="sb-{{skipid}}"></span>
{{/showskiplink}}