Skip to content
Snippets Groups Projects
Select Git revision
  • f2ee435634ee72fef0d72a844df954d8eb6447e7
  • master default protected
  • hsh_v3.11
  • hsh_v3.10-r6
  • hsh_v3.10-r3
  • v3.9-r9
  • v3.10-r6
  • v3.9-r8
  • v3.10-r5
  • v3.9-r7
  • v3.10-r4
  • v3.9-r6
  • v3.10-r3
  • v3.9-r5
  • v3.10-r2
  • v3.9-r4
  • v3.10-r1
  • v3.9-r3
  • v3.9-r2
  • v3.9-r1
  • v3.8-r5
  • v3.8-r4
  • v3.8-r3
  • v3.8-r2
  • v3.8-r1
25 results

imagearea.mustache

Blame
  • user avatar
    Alexander Bias authored
    196b465f
    History
    imagearea.mustache 1.71 KiB
    {{!
        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_campus/imagearea
    
        Boost_campus imagearea layout template.
    
        Context variables required for this template:
        * hasimagearea - true if images have been uploaded.
        * imageareafiles - array of uploaded images.
        * linkpath - true if image has a link defined in setting imageareaitemslink.
        * filepath - the path where the uploaded image is stored.
        * alttext - the text that will be set for the alt attribute of an image, if set
    
        Example context (json):
        {
            "hasimagearea": true,
            "imageareafiles": {
                "filepath": "/pix/moodlelogo.png",
                "linkpath": "http://moodle.org",
                "alttext": "Moodle logo"
             }
        }
    }}
    
    {{#hasimagearea}}
    <div class="imagearea d-flex justify-content-center flex-wrap pb-3 bg-dark">
        {{#imageareafiles}}
            {{#linkpath}}<a href="{{linkpath}}">{{/linkpath}}<img src="{{filepath}}" class="mt-3" {{#alttext}} alt="{{alttext}}"{{/alttext}}>{{#linkpath}}</a>{{/linkpath}}
        {{/imageareafiles}}
    </div>
    {{/hasimagearea}}