{{!
    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/vvveb/course

    Example context (json):
    {
        "courses": [
            {
                "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_course": "Acessar Curso"
            }
        ]
    }
}}

{{#courses}}
    <div class="{{#col}}{{col}}{{/col}} {{^col}}col-lg-4 col-md-6 col-sm-12 mb-3{{/col}}">
        <div class="box-page">
            <div class="thumbnail">
                <a href="{{{link}}}">
                    <span style="background-image:url({{{courseimage}}})"></span>
                </a>
            </div>
            <div class="content">
                <h5 class="title"><a href="{{{link}}}">{{{title}}}</a></h5>
                {{#text}}
                    <p>{{{text}}}</p>
                {{/text}}

                {{#cursopreco}}
                    <div class="price">
                        <span class="current-price">{{{cursopreco}}}</span>
                        {{#offprice}}
                            <span class="off-price">{{{offprice}}}</span>
                        {{/offprice}}
                    </div>
                {{/cursopreco}}
                <a href="{{{link}}}" class="btn btn-primary">{{{access}}}</a>
            </div>
        </div>
    </div>
{{/courses}}