From 631cc14020e4ef58e45bdfdf097027b95a69040e Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Fri, 11 Sep 2015 10:08:41 +0800 Subject: [PATCH] MDL-50981 templates: Create core template "columns-1to2" --- lib/templates/columns-1to2.mustache | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lib/templates/columns-1to2.mustache diff --git a/lib/templates/columns-1to2.mustache b/lib/templates/columns-1to2.mustache new file mode 100644 index 00000000000..d94a83d4f40 --- /dev/null +++ b/lib/templates/columns-1to2.mustache @@ -0,0 +1,45 @@ +{{! + 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 core/columns-1to2 + + Moodle columns-1to2 template. + + The purpose of this template is to render 2 columns where the second column has twice the width of the first one. + On mobile the second column collapses underneath the first. + + Classes required for JS: + * none + + Data attributes required for JS: + * none + + Context variables required for this template: + * col1content Column 1 contents. + * col2content Column 2 contents. + + Example context (json): + { + "col1content": "
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In porttitor vulputate turpis, quis tempor arcu.
", + "col2content": "
Vivamus ac orci in velit fringilla aliquam a a nisl. Cras luctus quam laoreet magna pulvinar aliquet.
" + } + +}} +
+
{{$ column1 }}{{{ col1content }}}{{/ column1 }}
+
{{$ column2 }}{{{ col2content }}}{{/ column2 }}
+