{{!
    This file is part of Moodle - https://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 local_kopere_dashboard/index_webpages

    Example context (json):
    {
        "menus": [
            {
                "menulink": true,
                "title": "Menu Principal",
                "link": "mainmenu",
                "webpages": [
                    {
                        "link": "https://example.com/course-detail",
                        "imagem": "https://example.com/images/course-thumbnail.jpg",
                        "title": "Curso de Desenvolvimento Web",
                        "text": "Aprenda a desenvolver aplicações web modernas com tecnologias avançadas.",
                        "cursopreco": "R$ 199,90",
                        "offprice": "R$ 299,90",
                        "access": "Acessar Curso"
                    }
                ]
            }
        ]
    }
}}

<div class="container">
    {{#menus}}
        {{#menulink}}
            <h3><a href="{{{config.wwwroot}}}/local/kopere_dashboard/?menu={{{link}}}">{{{title}}}</a></h3>
        {{/menulink}}
        <div class="row">
            {{#webpages}}
                {{> local_kopere_dashboard/index_webpage_block }}
            {{/webpages}}
        </div>
    {{/menus}}
</div>
