MDL-63102 core_block: Reduced spacing between blocks
[moodle.git] / theme / boost / templates / core / block.mustache
1 {{!
2     @template theme_boost/block
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     }
15 }}
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}}
21 {{! Start Block Container }}
22 <section id="{{id}}"
23      class="{{#hidden}}hidden{{/hidden}} block block_{{type}} {{#hascontrols}}block_with_controls{{/hascontrols}} card mb-2"
24      role="{{ariarole}}"
25      data-block="{{type}}"
26      {{#arialabel}}
27         aria-label={{#quote}}{{{arialabel}}}{{/quote}}
28      {{/arialabel}}
29      {{^arialabel}}
30         {{#title}}
31           aria-labelledby="instance-{{blockinstanceid}}-header"
32         {{/title}}
33      {{/arialabel}}>
35     {{! Block contents }}
36     <div class="card-body">
38         {{! Block header }}
39         {{#title}}
40             <h5 id="instance-{{blockinstanceid}}-header" class="card-title d-inline">{{{title}}}</h5>
41         {{/title}}
43         {{#hascontrols}}
44             <div class="block-controls pull-right header">
45                 {{{controls}}}
46             </div>
47         {{/hascontrols}}
49         <div class="card-text content mt-3">
50             {{{content}}}
51             <div class="footer">{{{footer}}}</div>
52             {{{annotation}}}
53         </div>
55     </div>
57 {{! End Block Container }}
58 </section>
60 {{! Block Skip Link Target }}
61 {{#showskiplink}}
62   <span id="sb-{{skipid}}"></span>
63 {{/showskiplink}}