MDL-63102 core_block: Reduced spacing between blocks
[moodle.git] / theme / boost / templates / core / block.mustache
CommitLineData
fb420717
DP
1{{!
2 @template theme_boost/block
3
4 Example context (json):
5 {
6 "id": "block0",
7 "showskiplink": true,
8 "type": "html",
9 "ariarole": "complementary",
10 "title": "Test block",
11 "blockinstanceid": 1,
12 "content": "<p>Hello block world!</p>"
13 }
14
15}}
d7fbf722
DW
16{{! Block Skip Link }}
17{{#showskiplink}}
18 <a href="#sb-{{skipid}}" class="sr-only sr-only-focusable">{{#str}}skipa, access, {{title}}{{/str}}</a>
19{{/showskiplink}}
20
21{{! Start Block Container }}
3ec69c2e 22<section id="{{id}}"
970bb713 23 class="{{#hidden}}hidden{{/hidden}} block block_{{type}} {{#hascontrols}}block_with_controls{{/hascontrols}} card mb-2"
d7fbf722 24 role="{{ariarole}}"
63e4df60 25 data-block="{{type}}"
d7fbf722 26 {{#arialabel}}
137c289a
FM
27 aria-label={{#quote}}{{{arialabel}}}{{/quote}}
28 {{/arialabel}}
29 {{^arialabel}}
30 {{#title}}
31 aria-labelledby="instance-{{blockinstanceid}}-header"
32 {{/title}}
33 {{/arialabel}}>
d7fbf722 34
d7fbf722 35 {{! Block contents }}
3ec69c2e
BB
36 <div class="card-body">
37
38 {{! Block header }}
39 {{#title}}
40 <h5 id="instance-{{blockinstanceid}}-header" class="card-title d-inline">{{{title}}}</h5>
41 {{/title}}
137c289a
FM
42
43 {{#hascontrols}}
3ec69c2e 44 <div class="block-controls pull-right header">
137c289a
FM
45 {{{controls}}}
46 </div>
47 {{/hascontrols}}
48
3ec69c2e 49 <div class="card-text content mt-3">
d7fbf722 50 {{{content}}}
1d492800 51 <div class="footer">{{{footer}}}</div>
d7fbf722
DW
52 {{{annotation}}}
53 </div>
0a58ec24 54
d7fbf722
DW
55 </div>
56
57{{! End Block Container }}
3ec69c2e 58</section>
d7fbf722
DW
59
60{{! Block Skip Link Target }}
61{{#showskiplink}}
62 <span id="sb-{{skipid}}"></span>
63{{/showskiplink}}