2016-11-03 11:00:38 +00:00
|
|
|
{{!
|
2020-02-19 21:20:01 +11:00
|
|
|
@template core/block
|
2016-11-03 11:00:38 +00:00
|
|
|
|
|
|
|
Example context (json):
|
|
|
|
{
|
|
|
|
"id": "block0",
|
2019-05-02 17:17:22 +12:00
|
|
|
"class": "block block_html",
|
2016-11-03 11:00:38 +00:00
|
|
|
"showskiplink": true,
|
|
|
|
"type": "html",
|
|
|
|
"ariarole": "complementary",
|
|
|
|
"title": "Test block",
|
|
|
|
"blockinstanceid": 1,
|
|
|
|
"content": "<p>Hello block world!</p>"
|
|
|
|
}
|
|
|
|
|
|
|
|
}}
|
2016-07-21 15:40:13 +08:00
|
|
|
{{! Block Skip Link }}
|
|
|
|
{{#showskiplink}}
|
2021-04-09 17:10:19 -04:00
|
|
|
<a href="#sb-{{skipid}}" class="sr-only sr-only-focusable">{{#str}}skipa, access, {{{title}}}{{/str}}</a>
|
2016-07-21 15:40:13 +08:00
|
|
|
{{/showskiplink}}
|
|
|
|
|
|
|
|
{{! Start Block Container }}
|
2018-04-17 15:13:31 +02:00
|
|
|
<section id="{{id}}"
|
2019-05-02 17:17:22 +12:00
|
|
|
class="{{#hidden}}hidden{{/hidden}} {{class}} {{#hascontrols}}block_with_controls{{/hascontrols}} card mb-3"
|
2016-07-21 15:40:13 +08:00
|
|
|
role="{{ariarole}}"
|
2016-08-29 14:57:46 +08:00
|
|
|
data-block="{{type}}"
|
2021-02-25 10:41:25 +08:00
|
|
|
data-instance-id="{{blockinstanceid}}"
|
2016-07-21 15:40:13 +08:00
|
|
|
{{#arialabel}}
|
2021-08-09 21:40:20 +10:00
|
|
|
aria-label="{{arialabel}}"
|
2016-09-08 16:18:26 +08:00
|
|
|
{{/arialabel}}
|
|
|
|
{{^arialabel}}
|
|
|
|
{{#title}}
|
|
|
|
aria-labelledby="instance-{{blockinstanceid}}-header"
|
|
|
|
{{/title}}
|
|
|
|
{{/arialabel}}>
|
2016-07-21 15:40:13 +08:00
|
|
|
|
|
|
|
{{! Block contents }}
|
2018-10-29 14:07:35 +08:00
|
|
|
<div class="card-body p-3">
|
2018-04-17 15:13:31 +02:00
|
|
|
|
|
|
|
{{! Block header }}
|
|
|
|
{{#title}}
|
2023-05-04 15:36:13 +02:00
|
|
|
<h3 id="instance-{{blockinstanceid}}-header" class="h5 card-title d-inline">{{{title}}}</h3>
|
2018-04-17 15:13:31 +02:00
|
|
|
{{/title}}
|
2016-09-08 16:18:26 +08:00
|
|
|
|
|
|
|
{{#hascontrols}}
|
2019-03-29 12:16:36 +08:00
|
|
|
<div class="block-controls float-right header">
|
2016-09-08 16:18:26 +08:00
|
|
|
{{{controls}}}
|
|
|
|
</div>
|
|
|
|
{{/hascontrols}}
|
|
|
|
|
2018-04-17 15:13:31 +02:00
|
|
|
<div class="card-text content mt-3">
|
2016-07-21 15:40:13 +08:00
|
|
|
{{{content}}}
|
2016-11-07 09:51:39 +08:00
|
|
|
<div class="footer">{{{footer}}}</div>
|
2016-07-21 15:40:13 +08:00
|
|
|
{{{annotation}}}
|
|
|
|
</div>
|
2016-10-13 11:40:56 +08:00
|
|
|
|
2016-07-21 15:40:13 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{! End Block Container }}
|
2018-04-17 15:13:31 +02:00
|
|
|
</section>
|
2016-07-21 15:40:13 +08:00
|
|
|
|
|
|
|
{{! Block Skip Link Target }}
|
|
|
|
{{#showskiplink}}
|
|
|
|
<span id="sb-{{skipid}}"></span>
|
|
|
|
{{/showskiplink}}
|