{{!
    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-stacked

    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 "Stacked" course header layout option.
}}
<div id="bucourseheader" class="stacked mb-3">
    <div class="d-flex align-items-center pb-2">
        {{> theme_boost_union/full_header-chunk-headeractions }}
    </div>
    {{#showiconsbar}}
        {{> theme_boost_union/full_header-chunk-iconsbar }}
    {{/showiconsbar}}
    <div id="courseheaderimage" class="d-flex flex-column p-3 {{#showiconsbar}}pt-5{{/showiconsbar}} 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="bucoursetitle {{#courseheaderimageurl}}{{textonimagestyle}}{{/courseheaderimageurl}}">
            {{#showshortname}}
                {{> 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}}
            </div>
            {{#showcoursecategory}}
                {{> theme_boost_union/full_header-chunk-coursecategory }}
            {{/showcoursecategory}}
        </div>
        <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>
