AutorÃa | Ultima modificación | Ver Log |
{{!
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 block_multiblock/columns-2equal
This template shows the multiple blocks in a two-column layout (equal width)
Example context (json):
{
"multiblockid": 28,
"multiblock": [
{
"id": 1,
"title": "Block 1",
"content": "<p>Block 1</p>",
"footer": "My footer",
"active": true
},
{
"id": 2,
"title": "Block 2",
"content": "<p>Block 2</p>",
"footer": "",
"active": false
}
]
}
}}
<div class="multiblock multiblock-columns-2 multiblock-columns-2equal mt-5">
<div class="container">
<div class="row">
{{#multiblock}}
<div class="col-md-6">
<section id="inst{{id}}" class="block block_{{type}} card mx-3 mb-3 h-100">
<div class="card-body p-0">
{{#title}}
<h5 id="instance-{{id}}-header" class="card-title d-inline">{{{title}}}</h5>
{{/title}}
<div class="card-text content{{#title}} mt-3{{/title}}">
{{{content}}}
<div class="footer">{{{footer}}}</div>
{{{annotation}}}
</div>
</div>
</section>
</div>
{{/multiblock}}
</div>
</div>
</div>
{{#js}}
require(['jquery'], function($) {
$('#inst{{multiblockid}}').addClass('multiblock-columns-2-parent');
});
{{/js}}