{{!
    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 tiny_elements/previewall

    Template for the preview of all elements in the Tiny Elements plugin.

    Example context (json):
    {
        "results": [
            {
                "category": "Sketchpals",
                "elements": [
                    {
                        "name": "Horst",
                        "code": "<div>...</div>",
                        "show": true
                    },
                    {
                        "name": "Cloud",
                        "code": "<div>...</div>",
                        "show": false
                    }
                ]
            }
        ]
    }
}}
<div id="results_of_previewall">
    {{#results}}
    <h2>{{category}}</h2>
    {{#elements}}
        <div>
            {{#show}}
            <h3 class="pl-6">{{name}}</h3>
            {{/show}}
            {{{code}}}
        </div>
    {{/elements}}
    {{/results}}
</div>
