mirror of
https://github.com/moodle/moodle.git
synced 2025-01-16 21:18:33 +01:00
MDL-80244 theme_boost: Refactor navbar for Bootstrap 5
This commit is contained in:
parent
580c009cac
commit
a8b5044920
@ -58,9 +58,11 @@
|
||||
<body>
|
||||
<div class="d-flex flex-column h-100">
|
||||
<nav class="navbar navbar-light bg-white border-bottom">
|
||||
<a class="navbar-brand" href="{{{global.siteurl}}}" title="{{{global.sitename}}}">
|
||||
{{{global.sitename}}}
|
||||
</a>
|
||||
<div class="container-fluid p-0">
|
||||
<a class="navbar-brand" href="{{{global.siteurl}}}" title="{{{global.sitename}}}">
|
||||
{{{global.sitename}}}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<main class="container-fluid mt-2 flex-grow-1 flex-shrink-1">
|
||||
<div>
|
||||
|
@ -78,15 +78,17 @@
|
||||
}
|
||||
}}
|
||||
<div class="navbar">
|
||||
<a target="_blank" href="{{{ courselink }}}">{{{ coursename }}}</a>
|
||||
»
|
||||
<a target="_blank" href="{{{ forumindexlink }}}">{{# str }} forums, forum {{/ str }}</a>
|
||||
»
|
||||
<a target="_blank" href="{{{ forumviewlink }}}">{{{ forumname }}}</a>
|
||||
{{# showdiscussionname }}
|
||||
»
|
||||
<a target="_blank" href="{{{ discussionlink }}}">{{{ discussionname }}}</a>
|
||||
{{/ showdiscussionname }}
|
||||
<div class="container-fluid p-0">
|
||||
<a target="_blank" href="{{{ courselink }}}">{{{ coursename }}}</a>
|
||||
»
|
||||
<a target="_blank" href="{{{ forumindexlink }}}">{{# str }} forums, forum {{/ str }}</a>
|
||||
»
|
||||
<a target="_blank" href="{{{ forumviewlink }}}">{{{ forumname }}}</a>
|
||||
{{# showdiscussionname }}
|
||||
»
|
||||
<a target="_blank" href="{{{ discussionlink }}}">{{{ discussionname }}}</a>
|
||||
{{/ showdiscussionname }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{> mod_forum/forum_post_email_htmlemail_body }}
|
||||
|
@ -35,76 +35,78 @@
|
||||
}
|
||||
}}
|
||||
<nav id="nav-container-{{uniqid}}" class="grader-grading_navigation navbar px-0 px-sm-3" aria-label="{{#str}} forumgradingnavigation, mod_forum {{/str}}">
|
||||
<div class="d-none d-sm-flex align-items-center">
|
||||
<a href="{{{courseUrl}}}" class="btn btn-link px-2 colour-inherit">
|
||||
<h5 class="d-inline px-0 mb-0">{{courseName}}</h5>
|
||||
</a>
|
||||
<span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
|
||||
<button class="btn btn-link px-2 colour-inherit" data-action="closegrader">
|
||||
<h5 class="d-inline px-0 mb-0">{{moduleName}}</h5>
|
||||
</button>
|
||||
<span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
|
||||
<h5 class="d-inline px-2 mb-0 font-weight-bold">{{#str}}grading, forum{{/str}}</h5>
|
||||
</div>
|
||||
|
||||
<div class="ml-1 ml-sm-auto">
|
||||
<button
|
||||
class="btn btn-icon icon-no-margin drawer-button mr-1 active"
|
||||
data-action="expand-grading-drawer"
|
||||
aria-controls="grading-drawer-{{uniqid}}"
|
||||
aria-expanded="true"
|
||||
type="button"
|
||||
title="{{#str}} showgraderpanel, mod_forum {{/str}}"
|
||||
>
|
||||
<span class="dir-ltr-hide" aria-hidden="true">{{#pix}} show-grader-panel-rtl, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
<span class="dir-rtl-hide" aria-hidden="true">{{#pix}} show-grader-panel, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-icon icon-no-margin drawer-button mr-1 d-none d-sm-inline-block"
|
||||
aria-label="{{#str}} hidegraderpanel, mod_forum {{/str}}"
|
||||
data-action="collapse-grading-drawer"
|
||||
aria-controls="grading-drawer-{{uniqid}}"
|
||||
aria-expanded="true"
|
||||
type="button"
|
||||
title="{{#str}} hidegraderpanel, mod_forum {{/str}}"
|
||||
>
|
||||
<span aria-hidden="true">{{#pix}} hide-grader-panel, mod_forum, {{#str}} hidegraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary font-weight-bold ml-sm-2 px-4"
|
||||
data-action="savegrade"
|
||||
>
|
||||
{{#str}} save {{/str}}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-secondary font-weight-bold ml-1 ml-sm-2 px-4"
|
||||
aria-label="{{#str}} closegrader, mod_forum {{/str}}"
|
||||
data-action="closegrader"
|
||||
type="button"
|
||||
>
|
||||
{{#str}} close, mod_forum {{/str}}
|
||||
</button>
|
||||
<div class="btn-group d-none d-sm-inline-block">
|
||||
<button
|
||||
class="btn btn-icon text-muted icon-no-margin icon-size-3 ml-2"
|
||||
type="button"
|
||||
id="grader-actions-menu-{{uniqid}}"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
aria-label="{{#str}} actionsforgraderinterface, mod_forum {{/str}}"
|
||||
>
|
||||
{{#pix}} i/menu, core {{/pix}}
|
||||
<div class="container-fluid p-0">
|
||||
<div class="d-none d-sm-flex align-items-center">
|
||||
<a href="{{{courseUrl}}}" class="btn btn-link px-2 colour-inherit">
|
||||
<h5 class="d-inline px-0 mb-0">{{courseName}}</h5>
|
||||
</a>
|
||||
<span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
|
||||
<button class="btn btn-link px-2 colour-inherit" data-action="closegrader">
|
||||
<h5 class="d-inline px-0 mb-0">{{moduleName}}</h5>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="grader-actions-menu-{{uniqid}}">
|
||||
<span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
|
||||
<h5 class="d-inline px-2 mb-0 font-weight-bold">{{#str}}grading, forum{{/str}}</h5>
|
||||
</div>
|
||||
|
||||
<div class="ml-1 ml-sm-auto">
|
||||
<button
|
||||
class="btn btn-icon icon-no-margin drawer-button mr-1 active"
|
||||
data-action="expand-grading-drawer"
|
||||
aria-controls="grading-drawer-{{uniqid}}"
|
||||
aria-expanded="true"
|
||||
type="button"
|
||||
title="{{#str}} showgraderpanel, mod_forum {{/str}}"
|
||||
>
|
||||
<span class="dir-ltr-hide" aria-hidden="true">{{#pix}} show-grader-panel-rtl, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
<span class="dir-rtl-hide" aria-hidden="true">{{#pix}} show-grader-panel, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-icon icon-no-margin drawer-button mr-1 d-none d-sm-inline-block"
|
||||
aria-label="{{#str}} hidegraderpanel, mod_forum {{/str}}"
|
||||
data-action="collapse-grading-drawer"
|
||||
aria-controls="grading-drawer-{{uniqid}}"
|
||||
aria-expanded="true"
|
||||
type="button"
|
||||
title="{{#str}} hidegraderpanel, mod_forum {{/str}}"
|
||||
>
|
||||
<span aria-hidden="true">{{#pix}} hide-grader-panel, mod_forum, {{#str}} hidegraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary font-weight-bold ml-sm-2 px-4"
|
||||
data-action="savegrade"
|
||||
>
|
||||
{{#str}} save {{/str}}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-secondary font-weight-bold ml-1 ml-sm-2 px-4"
|
||||
aria-label="{{#str}} closegrader, mod_forum {{/str}}"
|
||||
data-action="closegrader"
|
||||
type="button"
|
||||
>
|
||||
{{#str}} close, mod_forum {{/str}}
|
||||
</button>
|
||||
<div class="btn-group d-none d-sm-inline-block">
|
||||
<button
|
||||
class="dropdown-item"
|
||||
type="button"
|
||||
data-action="togglefullscreen"
|
||||
class="btn btn-icon text-muted icon-no-margin icon-size-3 ml-2"
|
||||
type="button"
|
||||
id="grader-actions-menu-{{uniqid}}"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
aria-label="{{#str}} actionsforgraderinterface, mod_forum {{/str}}"
|
||||
>
|
||||
{{#str}} togglefullscreen, mod_forum {{/str}}
|
||||
{{#pix}} i/menu, core {{/pix}}
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="grader-actions-menu-{{uniqid}}">
|
||||
<button
|
||||
class="dropdown-item"
|
||||
type="button"
|
||||
data-action="togglefullscreen"
|
||||
type="button"
|
||||
>
|
||||
{{#str}} togglefullscreen, mod_forum {{/str}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,10 +54,12 @@
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-light bg-light border-bottom">
|
||||
<a class="navbar-brand" href="https://moodle.org" title="Moodle">
|
||||
<img class="moodle-logo" src="pix/moodlelogo.svg" alt="Moodle logo" />
|
||||
</a>
|
||||
<span class="navbar-brand">{{#str}}broughtbymoodle, core_privacy{{/str}}</span>
|
||||
<div class="container-fluid p-0">
|
||||
<a class="navbar-brand" href="https://moodle.org" title="Moodle">
|
||||
<img class="moodle-logo" src="pix/moodlelogo.svg" alt="Moodle logo" />
|
||||
</a>
|
||||
<span class="navbar-brand">{{#str}}broughtbymoodle, core_privacy{{/str}}</span>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="page" class="container-fluid mt-2">
|
||||
|
||||
|
@ -26,8 +26,10 @@
|
||||
}
|
||||
}}
|
||||
<nav class="navbar fixed-top navbar-light bg-white navbar-expand align-items-center" aria-label="{{#str}}sitemenubar, admin{{/str}}">
|
||||
<h1 class="h3 m-0 p-0">{{{title}}}</h1>
|
||||
<div class="ml-auto d-flex">
|
||||
{{{buttons}}}
|
||||
<div class="container-fluid">
|
||||
<h1 class="h3 m-0 p-0">{{{title}}}</h1>
|
||||
<div class="ml-auto d-flex">
|
||||
{{{buttons}}}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -29,22 +29,24 @@
|
||||
}
|
||||
}}
|
||||
<nav class="navbar fixed-top navbar-light bg-white navbar-expand" aria-label="{{#str}}sitemenubar, admin{{/str}}">
|
||||
<div class="navbar-brand d-flex align-items-center m-0 p-0 aabtn">
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<img src="{{output.get_compact_logo_url}}" class="logo mr-1" alt="{{sitename}}">
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
{{{ sitename }}}
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-brand d-flex align-items-center m-0 p-0 aabtn">
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<img src="{{output.get_compact_logo_url}}" class="logo mr-1" alt="{{sitename}}">
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
{{{ sitename }}}
|
||||
</div>
|
||||
|
||||
{{# output.secure_layout_language_menu }}
|
||||
<ul class="nav navbar-nav language-menu my-1">
|
||||
{{{ . }}}
|
||||
</ul>
|
||||
{{/ output.secure_layout_language_menu }}
|
||||
{{# output.secure_layout_language_menu }}
|
||||
<ul class="nav navbar-nav language-menu my-1">
|
||||
{{{ . }}}
|
||||
</ul>
|
||||
{{/ output.secure_layout_language_menu }}
|
||||
|
||||
{{# output.secure_layout_login_info }}
|
||||
<div class="ml-auto nav-link">
|
||||
{{{ . }}}
|
||||
{{# output.secure_layout_login_info }}
|
||||
<div class="ml-auto nav-link">
|
||||
{{{ . }}}
|
||||
</div>
|
||||
{{/ output.secure_layout_login_info }}
|
||||
</div>
|
||||
{{/ output.secure_layout_login_info }}
|
||||
</nav>
|
||||
|
@ -56,48 +56,49 @@
|
||||
}
|
||||
}}
|
||||
<nav class="navbar fixed-top navbar-light bg-white navbar-expand" aria-label="{{#str}}sitemenubar, admin{{/str}}">
|
||||
<div class="container-fluid">
|
||||
<button class="navbar-toggler aabtn d-block d-md-none px-1 my-1 border-0" data-toggler="drawers" data-action="toggle" data-target="theme_boost-drawers-primary">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
<span class="sr-only">{{#str}}sidepanel, core{{/str}}</span>
|
||||
</button>
|
||||
|
||||
<button class="navbar-toggler aabtn d-block d-md-none px-1 my-1 border-0" data-toggler="drawers" data-action="toggle" data-target="theme_boost-drawers-primary">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
<span class="sr-only">{{#str}}sidepanel, core{{/str}}</span>
|
||||
</button>
|
||||
<a href="{{{ config.homeurl }}}" class="navbar-brand d-none d-md-flex align-items-center m-0 mr-4 p-0 aabtn">
|
||||
|
||||
<a href="{{{ config.homeurl }}}" class="navbar-brand d-none d-md-flex align-items-center m-0 mr-4 p-0 aabtn">
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<img src="{{output.get_compact_logo_url}}" class="logo mr-1" alt="{{sitename}}">
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
{{^ output.should_display_navbar_logo }}
|
||||
{{{ sitename }}}
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
</a>
|
||||
{{#primarymoremenu}}
|
||||
<div class="primary-navigation">
|
||||
{{> core/moremenu}}
|
||||
</div>
|
||||
{{/primarymoremenu}}
|
||||
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<img src="{{output.get_compact_logo_url}}" class="logo mr-1" alt="{{sitename}}">
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
{{^ output.should_display_navbar_logo }}
|
||||
{{{ sitename }}}
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
</a>
|
||||
{{#primarymoremenu}}
|
||||
<div class="primary-navigation">
|
||||
{{> core/moremenu}}
|
||||
<ul class="navbar-nav d-none d-md-flex my-1 px-1">
|
||||
<!-- page_heading_menu -->
|
||||
{{{ output.page_heading_menu }}}
|
||||
</ul>
|
||||
|
||||
<div id="usernavigation" class="navbar-nav ml-auto">
|
||||
{{# output.search_box }}
|
||||
{{{ output.search_box }}}
|
||||
<div class="divider border-left h-75 align-self-center mx-1"></div>
|
||||
{{/output.search_box}}
|
||||
{{#langmenu}}
|
||||
{{> theme_boost/language_menu }}
|
||||
<div class="divider border-left h-75 align-self-center mx-1"></div>
|
||||
{{/langmenu}}
|
||||
{{{ output.navbar_plugin_output }}}
|
||||
<div class="d-flex align-items-stretch usermenu-container" data-region="usermenu">
|
||||
{{#usermenu}}
|
||||
{{> core/user_menu }}
|
||||
{{/usermenu}}
|
||||
</div>
|
||||
{{{ output.edit_switch }}}
|
||||
</div>
|
||||
{{/primarymoremenu}}
|
||||
|
||||
<ul class="navbar-nav d-none d-md-flex my-1 px-1">
|
||||
<!-- page_heading_menu -->
|
||||
{{{ output.page_heading_menu }}}
|
||||
</ul>
|
||||
|
||||
<div id="usernavigation" class="navbar-nav ml-auto">
|
||||
{{# output.search_box }}
|
||||
{{{ output.search_box }}}
|
||||
<div class="divider border-left h-75 align-self-center mx-1"></div>
|
||||
{{/output.search_box}}
|
||||
{{#langmenu}}
|
||||
{{> theme_boost/language_menu }}
|
||||
<div class="divider border-left h-75 align-self-center mx-1"></div>
|
||||
{{/langmenu}}
|
||||
{{{ output.navbar_plugin_output }}}
|
||||
<div class="d-flex align-items-stretch usermenu-container" data-region="usermenu">
|
||||
{{#usermenu}}
|
||||
{{> core/user_menu }}
|
||||
{{/usermenu}}
|
||||
</div>
|
||||
{{{ output.edit_switch }}}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
@ -29,22 +29,24 @@
|
||||
}
|
||||
}}
|
||||
<nav class="fixed-top navbar navbar-bootswatch navbar-expand moodle-has-zindex">
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<span class="logo d-none d-sm-inline">
|
||||
<img src="{{output.get_compact_logo_url}}" alt="{{sitename}}">
|
||||
</span>
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
<span class="site-name d-none d-md-inline">{{{ sitename }}}</span>
|
||||
<div class="container-fluid">
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<span class="logo d-none d-sm-inline">
|
||||
<img src="{{output.get_compact_logo_url}}" alt="{{sitename}}">
|
||||
</span>
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
<span class="site-name d-none d-md-inline">{{{ sitename }}}</span>
|
||||
|
||||
{{# output.secure_layout_language_menu }}
|
||||
<ul class="navbar-nav d-none d-md-flex">
|
||||
<!-- language_menu -->
|
||||
{{{ . }}}
|
||||
</ul>
|
||||
{{/ output.secure_layout_language_menu }}
|
||||
{{# output.secure_layout_login_info }}
|
||||
<div class="ml-auto">
|
||||
{{{ . }}}
|
||||
{{# output.secure_layout_language_menu }}
|
||||
<ul class="navbar-nav d-none d-md-flex">
|
||||
<!-- language_menu -->
|
||||
{{{ . }}}
|
||||
</ul>
|
||||
{{/ output.secure_layout_language_menu }}
|
||||
{{# output.secure_layout_login_info }}
|
||||
<div class="ml-auto">
|
||||
{{{ . }}}
|
||||
</div>
|
||||
{{/ output.secure_layout_login_info }}
|
||||
</div>
|
||||
{{/ output.secure_layout_login_info }}
|
||||
</nav>
|
||||
|
@ -38,28 +38,29 @@
|
||||
}
|
||||
}}
|
||||
<nav class="fixed-top navbar navbar-bootswatch navbar-expand moodle-has-zindex">
|
||||
<div class="container-fluid">
|
||||
<a href="{{{ config.homeurl }}}" class="navbar-brand d-flex align-items-center m-1 p-0 aabtn">
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<img src="{{output.get_compact_logo_url}}" class="logo mr-1" alt="{{sitename}}">
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
{{^ output.should_display_navbar_logo }}
|
||||
<span class="sitename">{{{ sitename }}}</span>
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
</a>
|
||||
|
||||
<a href="{{{ config.homeurl }}}" class="navbar-brand d-flex align-items-center m-1 p-0 aabtn">
|
||||
{{# output.should_display_navbar_logo }}
|
||||
<img src="{{output.get_compact_logo_url}}" class="logo mr-1" alt="{{sitename}}">
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
{{^ output.should_display_navbar_logo }}
|
||||
<span class="sitename">{{{ sitename }}}</span>
|
||||
{{/ output.should_display_navbar_logo }}
|
||||
</a>
|
||||
|
||||
<ul class="navbar-nav d-none d-md-flex">
|
||||
<!-- custom_menu -->
|
||||
{{{ output.custom_menu }}}
|
||||
<!-- page_heading_menu -->
|
||||
{{{ output.page_heading_menu }}}
|
||||
</ul>
|
||||
<div id="usernavigation" class="navbar-nav my-1 ml-auto">
|
||||
<div class="divider border-left h-50 align-self-center mx-1"></div>
|
||||
{{{ output.search_box }}}
|
||||
{{{ output.navbar_plugin_output }}}
|
||||
<div class="d-flex align-items-stretch usermenu-container" data-region="usermenu">
|
||||
{{{ output.user_menu }}}
|
||||
<ul class="navbar-nav d-none d-md-flex">
|
||||
<!-- custom_menu -->
|
||||
{{{ output.custom_menu }}}
|
||||
<!-- page_heading_menu -->
|
||||
{{{ output.page_heading_menu }}}
|
||||
</ul>
|
||||
<div id="usernavigation" class="navbar-nav my-1 ml-auto">
|
||||
<div class="divider border-left h-50 align-self-center mx-1"></div>
|
||||
{{{ output.search_box }}}
|
||||
{{{ output.navbar_plugin_output }}}
|
||||
<div class="d-flex align-items-stretch usermenu-container" data-region="usermenu">
|
||||
{{{ output.user_menu }}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
Loading…
x
Reference in New Issue
Block a user