Skip to content
Snippets Groups Projects
Select Git revision
  • f753e11739169e3b4dae0bad07200abcc0b7b183
  • master default
  • fix-remote-url_v4.10.0
  • fix-remote-url_v4.9.1
  • fix-remote-url_v4.8.3
  • fix-remote-url_v4.8.x
  • fix-remote-url_v4.7.x
  • fix-remote-url_v4.6.0
  • fix-remote-urls
9 results

Readme.md

Blame
  • To learn more about this project, read the wiki.
    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}}