AutorÃa | Ultima modificación | Ver Log |
{{!This file is part of Moodle - http://moodle.org/Moodle is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with Moodle. If not, see <http://www.gnu.org/licenses/>.}}{{!@template unilabeltype_imageboard/imageTemplate to show an image on the imagebord.Example context (json):{"title": "","url": "https://example.com","newwindow": 1,"xposition": "400","yposition": "200","targetwidth": "0","targetheight": "0","fontsize": "12","titlecolor": "#00ff00","titlebackgroundcolor": "#0000ff","imageurl": "http://localhost/image.png","nr": 1,"bordercolor": "#2D57FA","border": "4"}}}<div id="imageid_{{nr}}" style="position: absolute;{{!}}z-index: 5;{{!}}left: {{xposition}}px;{{!}}top: {{yposition}}px;{{!}}{{#targetwidth}}width: {{.}}px;{{/targetwidth}}{{!}}{{#targetheight}}height: {{.}}px;{{/targetheight}}{{!}}">{{#url}}<a href="{{{.}}}"{{#newwindow}} target="_blank"{{/newwindow}}>{{/url}}{{#title}}<div class="unilabel-imageboard-title rounded" style="position: absolute;{{!}}z-index: 5;{{!}}top: calc(-{{fontsize}}px - 10px);{{!}}color: {{titlecolor}}; background-color: {{titlebackgroundcolor}};{{!}}{{#fontsize}}font-size: {{.}}px;line-height: {{.}}px;padding: 5px;{{/fontsize}}{{!}}white-space: nowrap;">{{title}}</div>{{/title}}{{#imageurl}}<div class="unilabel-imageboard-image rounded" style="position: relative;{{!}}z-index: 5;{{!}}{{#targetwidth}}width: {{.}}px; {{/targetwidth}}{{!}}{{#targetheight}}height: {{.}}px; {{/targetheight}}{{!}}"><img class="rounded" src="{{{.}}}" title="{{title}}" alt="{{title}}" style="width: 100%;{{!}}height: 100%;{{!}}{{#border}}border: solid {{.}}px {{titlebackgroundcolor}};{{/border}}{{!}}"></div>{{/imageurl}}{{#url}}</a>{{/url}}</div>