From 9825fd764722c5ae23e638948d28bdfb005dd930 Mon Sep 17 00:00:00 2001 From: Diego Hernandez Date: Thu, 14 Jan 2021 22:47:29 +0100 Subject: [PATCH] I add template to login --- layout/login.php | 36 +++++++++++++++++++ templates/login.mustache | 75 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 layout/login.php create mode 100644 templates/login.mustache diff --git a/layout/login.php b/layout/login.php new file mode 100644 index 0000000..999ebde --- /dev/null +++ b/layout/login.php @@ -0,0 +1,36 @@ +. + +defined('MOODLE_INTERNAL') || die(); + +/** + * A login page layout for the boost theme. + * + * @package theme_boost + * @copyright 2016 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$bodyattributes = $OUTPUT->body_attributes(); + +$templatecontext = [ + 'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]), + 'output' => $OUTPUT, + 'bodyattributes' => $bodyattributes +]; + +echo $OUTPUT->render_from_template('theme_space/login', $templatecontext); + diff --git a/templates/login.mustache b/templates/login.mustache new file mode 100644 index 0000000..63a0c07 --- /dev/null +++ b/templates/login.mustache @@ -0,0 +1,75 @@ +{{! + 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 . +}} +{{! + @template theme_boost/login + + Login page template + + Example context (json): + { + "output": { + "doctype": "", + "page_title": "Login page", + "favicon": "favicon.ico", + "main_content": "

Headers keep HTML validators happy

" + } + } +}} +{{> theme_boost/head }} + + +{{> core/local/toast/wrapper}} +HOLLLLLLLAAAAAA +
+ + {{{ output.standard_top_of_body_html }}} + +
+
+
+
+ {{{ output.course_content_header }}} + {{{ output.main_content }}} + {{{ output.course_content_footer }}} +
+
+
+
+ +
+ + + +{{#js}} +M.util.js_pending('theme_boost/loader'); +require(['theme_boost/loader'], function() { + M.util.js_complete('theme_boost/loader'); +}); +{{/js}}