mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
MDL-55416 theme_noname: Bootstrap alpha3 support
Part of MDL-55071
This commit is contained in:
parent
da92b73840
commit
13d07a01b0
8 changed files with 17 additions and 20 deletions
|
@ -68,20 +68,7 @@ class core_renderer extends \core_renderer {
|
||||||
* Uses bootstrap compatible html.
|
* Uses bootstrap compatible html.
|
||||||
*/
|
*/
|
||||||
public function navbar() {
|
public function navbar() {
|
||||||
$items = $this->page->navbar->get_items();
|
return $this->render_from_template('core/navbar', $this->page->navbar);
|
||||||
if (empty($items)) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$breadcrumbs = array();
|
|
||||||
foreach ($items as $item) {
|
|
||||||
$item->hideicon = true;
|
|
||||||
$breadcrumbs[] = $this->render($item);
|
|
||||||
}
|
|
||||||
$list_items = '<li>'.join(" </li><li>", $breadcrumbs).'</li>';
|
|
||||||
$title = '<span class="accesshide" id="navbar-label">'.get_string('pagepath').'</span>';
|
|
||||||
return $title . '<nav aria-labelledby="navbar-label"><ul class="breadcrumb">' .
|
|
||||||
$list_items . '</ul></nav>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
$templatecontext = [
|
$templatecontext = [
|
||||||
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
|
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
|
||||||
'output' => $OUTPUT,
|
'output' => $OUTPUT,
|
||||||
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-3 col-md-pull-9'),
|
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-3 pull-md-9'),
|
||||||
];
|
];
|
||||||
|
|
||||||
echo $OUTPUT->render_from_template('theme_noname/columns2', $templatecontext);
|
echo $OUTPUT->render_from_template('theme_noname/columns2', $templatecontext);
|
|
@ -24,7 +24,7 @@
|
||||||
$templatecontext = [
|
$templatecontext = [
|
||||||
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
|
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
|
||||||
'output' => $OUTPUT,
|
'output' => $OUTPUT,
|
||||||
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 col-md-pull-8'),
|
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 pull-md-8'),
|
||||||
'sidepostblocks' => $OUTPUT->blocks('side-post', 'col-md-3')
|
'sidepostblocks' => $OUTPUT->blocks('side-post', 'col-md-3')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
$templatecontext = [
|
$templatecontext = [
|
||||||
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
|
'sitename' => format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))),
|
||||||
'output' => $OUTPUT,
|
'output' => $OUTPUT,
|
||||||
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 col-md-pull-8 col-lg-3 col-lg-pull-9'),
|
'sidepreblocks' => $OUTPUT->blocks('side-pre', 'col-md-4 pull-md-8 col-lg-3 pull-lg-9'),
|
||||||
'sidepostblocks' => $OUTPUT->blocks('side-post', 'col-md-3')
|
'sidepostblocks' => $OUTPUT->blocks('side-post', 'col-md-3')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
{{{ output.full_header }}}
|
{{{ output.full_header }}}
|
||||||
|
|
||||||
<div id="page-content" class="row">
|
<div id="page-content" class="row">
|
||||||
<div id="region-main-box" class="col-md-9 col-md-push-3">
|
<div id="region-main-box" class="col-md-9 push-md-3">
|
||||||
<section id="region-main">
|
<section id="region-main">
|
||||||
{{{ output.course_content_header }}}
|
{{{ output.course_content_header }}}
|
||||||
{{{ output.main_content }}}
|
{{{ output.main_content }}}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<div id="page-content" class="row">
|
<div id="page-content" class="row">
|
||||||
<div id="region-main-box" class="col-md-9">
|
<div id="region-main-box" class="col-md-9">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<section id="region-main" class="col-md-8 col-md-push-4">
|
<section id="region-main" class="col-md-8 push-md-4">
|
||||||
{{{ output.course_content_header }}}
|
{{{ output.course_content_header }}}
|
||||||
{{{ output.main_content }}}
|
{{{ output.main_content }}}
|
||||||
{{{ output.course_content_footer }}}
|
{{{ output.course_content_footer }}}
|
||||||
|
|
10
theme/noname/templates/core/navbar.mustache
Normal file
10
theme/noname/templates/core/navbar.mustache
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<ol class="breadcrumb" role="navigation">
|
||||||
|
{{#get_items}}
|
||||||
|
{{#action}}
|
||||||
|
<li class="breadcrumb-item {{#is_active}}active{{/is_active}}"><a href="{{action}}" {{#get_title}}title="{{get_title}}"{{/get_title}}>{{text}}</a></li>
|
||||||
|
{{/action}}
|
||||||
|
{{^action}}
|
||||||
|
<li class="breadcrumb-item {{#is_active}}active{{/is_active}}">{{text}}</li>
|
||||||
|
{{/action}}
|
||||||
|
{{/get_items}}
|
||||||
|
</ol>
|
|
@ -37,7 +37,7 @@
|
||||||
<div id="page-content" class="row">
|
<div id="page-content" class="row">
|
||||||
<div id="region-main-box" class="col-md-9">
|
<div id="region-main-box" class="col-md-9">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<section id="region-main" class="col-md-8 col-md-push-4 col-lg-9 col-lg-push-3">
|
<section id="region-main" class="col-md-8 push-md-4 col-lg-9 push-lg-3">
|
||||||
{{{ output.main_content }}}
|
{{{ output.main_content }}}
|
||||||
</section>
|
</section>
|
||||||
{{{ sidepreblocks }}}
|
{{{ sidepreblocks }}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue