{{!
    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_union/full_header-partial-headingabove

    This template renders a Boost Union course header.

    Example context (json):
    {
        "contextheader": "context_header_html",
        "courseheaderimageurl": "http://localhost/boostunionmoodle/pluginfile.php/14/course/overviewfiles/ex.png",
        "courseheaderheight": "300px",
        "courseheaderimageposition": "center center"
    }
}}
{{!
    This template is a partial version of core/full_header

    Modifications compared to the original template:
    * Provide the layout for the "Heading above" course header layout option.
}}
<div id="bucourseheader" class="headingabove mb-3">
    <div class="bucoursetitle">
        {{#showshortname}}
            {{< theme_boost_union/full_header-chunk-shortname}}{{$cssclass}}text-muted muted{{/cssclass}}{{/ theme_boost_union/full_header-chunk-shortname}}
        {{/showshortname}}
        <div class="d-flex align-items-center">
            {{#contextheader}}
                <div class="me-auto d-flex flex-column">
                    {{{contextheader}}}
                </div>
            {{/contextheader}}
            {{> theme_boost_union/full_header-chunk-headeractions }}
        </div>
        {{#showcoursecategory}}
            {{< theme_boost_union/full_header-chunk-coursecategory}}{{$cssclass}}text-muted muted {{/cssclass}}{{/ theme_boost_union/full_header-chunk-coursecategory}}
        {{/showcoursecategory}}
    </div>
    {{#showiconsbar}}
        {{> theme_boost_union/full_header-chunk-iconsbar }}
    {{/showiconsbar}}
    <div id="courseheaderimage" class="d-flex flex-column p-3 rounded{{#showcourseprogress}}{{#hasprogress}}{{#progressstyleasbar}}-top border-bottom-0{{/progressstyleasbar}}{{/hasprogress}}{{/showcourseprogress}} {{{courseheadercanvasclasses}}} {{{courseheaderborderclasses}}}"
            style="{{#courseheaderimageurl}}background-image: url('{{{courseheaderimageurl}}}');{{/courseheaderimageurl}}
                {{#courseheaderheight}}min-height: {{{.}}};{{/courseheaderheight}}
                {{#courseheaderimageposition}}background-position: {{{.}}};{{/courseheaderimageposition}}">
        <div class="mt-auto d-flex justify-content-between w-100">
            {{#showcoursefields}}
                {{> theme_boost_union/full_header-chunk-coursefields }}
            {{/showcoursefields}}
            {{#showcourseprogress}}
                {{#hasprogress}}
                    {{^progressstyleasbar}}
                        {{> theme_boost_union/full_header-chunk-progresstext}}
                    {{/progressstyleasbar}}
                {{/hasprogress}}
            {{/showcourseprogress}}
        </div>
    </div>
    {{#showcourseprogress}}
        {{#hasprogress}}
            {{#progressstyleasbar}}
                {{> theme_boost_union/full_header-chunk-progressbottombar}}
            {{/progressstyleasbar}}
        {{/hasprogress}}
    {{/showcourseprogress}}
</div>
