{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template theme_boost_magnific/core/block

    Example context (json):
    {
        "id": "block0",
        "class": "block block_html",
        "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 }}
<section id="{{{id}}}"
     class="{{#hidden}}hidden{{/hidden}} {{{class}}} {{#hascontrols}}block_with_controls{{/hascontrols}} card mb-3"
     role="{{{ariarole}}}"
     data-block="{{{type}}}"
     data-instance-id="{{{blockinstanceid}}}"
     {{#arialabel}}
        aria-label="{{{arialabel}}}"
     {{/arialabel}}
     {{^arialabel}}
        {{#title}}
          aria-labelledby="instance-{{{blockinstanceid}}}-header"
        {{/title}}
     {{/arialabel}}>

    {{! Block header }}
    {{#title}}
        <div class="card-header">
            <h3 id="instance-{{{blockinstanceid}}}-header" class="h5 card-title d-inline">{{{title}}}</h3>
        </div>
    {{/title}}

    {{! Block contents }}
    <div class="card-body p-3">
        {{#hascontrols}}
            <div class="block-controls float-end header">
                {{{controls}}}
            </div>
        {{/hascontrols}}

        <div class="card-text content mt-3">
            {{{content}}}
            <div class="footer">{{{footer}}}</div>
            {{{annotation}}}
        </div>

    </div>

{{! End Block Container }}
</section>

{{! Block Skip Link Target }}
{{#showskiplink}}
  <span id="sb-{{{skipid}}}"></span>
{{/showskiplink}}
