diff --git a/mod/data/classes/output/view_footer.php b/mod/data/classes/output/view_footer.php index 8113ab09d72..9a929715a89 100644 --- a/mod/data/classes/output/view_footer.php +++ b/mod/data/classes/output/view_footer.php @@ -124,12 +124,12 @@ class view_footer extends sticky_footer { 'name' => $selectallid, 'value' => 1, 'label' => get_string('selectall'), - 'classes' => 'btn-secondary mr-1', + 'classes' => 'btn-secondary mx-1', ], true); $data['selectall'] = $output->render($mastercheckbox); $data['deleteselected'] = html_writer::empty_tag('input', [ - 'class' => 'btn btn-secondary', + 'class' => 'btn btn-secondary mx-1', 'type' => 'submit', 'value' => get_string('deleteselected'), 'disabled' => true, @@ -147,7 +147,7 @@ class view_footer extends sticky_footer { $addentrylink, get_string('add', 'mod_data'), null, - ['class' => 'btn btn-primary', 'role' => 'button'] + ['class' => 'btn btn-primary mx-1', 'role' => 'button'] ); $data['addentrybutton'] = $addentrybutton->export_for_template($output); } diff --git a/mod/data/edit.php b/mod/data/edit.php index eae105c5512..73dfaad3c22 100644 --- a/mod/data/edit.php +++ b/mod/data/edit.php @@ -200,13 +200,13 @@ if (empty($redirectbackto)) { $actionbuttons = html_writer::link( $redirectbackto, get_string('cancel'), - ['class' => 'btn btn-secondary', 'role' => 'button'] + ['class' => 'btn btn-secondary mx-1', 'role' => 'button'] ); $actionbuttons .= html_writer::empty_tag('input', [ 'type' => 'submit', 'name' => 'saveandview', 'value' => get_string('save'), - 'class' => 'btn btn-primary ml-2' + 'class' => 'btn btn-primary mx-1' ]); if (!$rid && ((!$data->maxentries) || @@ -214,7 +214,7 @@ if (!$rid && ((!$data->maxentries) || (data_numentries($data) < ($data->maxentries - 1)))) { $actionbuttons .= html_writer::empty_tag('input', [ 'type' => 'submit', 'name' => 'saveandadd', - 'value' => get_string('saveandadd', 'data'), 'class' => 'btn btn-primary ml-2' + 'value' => get_string('saveandadd', 'data'), 'class' => 'btn btn-primary mx-1' ]); } diff --git a/mod/data/lib.php b/mod/data/lib.php index 9ab3f3c45a8..bab9e5620bf 100644 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -434,12 +434,12 @@ class data_field_base { // Base class for Database Field Types (see field/*/ 'type' => 'submit', 'name' => 'cancel', 'value' => get_string('cancel'), - 'class' => 'btn btn-secondary mr-2' + 'class' => 'btn btn-secondary mx-1' ]); $actionbuttons .= html_writer::tag('input', null, [ 'type' => 'submit', 'value' => get_string('save'), - 'class' => 'btn btn-primary' + 'class' => 'btn btn-primary mx-1' ]); $actionbuttons .= html_writer::end_div(); diff --git a/mod/data/renderer.php b/mod/data/renderer.php index aad4bbf20ad..ae1d910b46f 100644 --- a/mod/data/renderer.php +++ b/mod/data/renderer.php @@ -131,12 +131,12 @@ class mod_data_renderer extends plugin_renderer_base { $cancelurl = new moodle_url('/mod/data/field.php', ['d' => $datamodule->id]); $actionbuttons .= html_writer::tag('a', get_string('cancel') , [ 'href' => $cancelurl->out(false), - 'class' => 'btn btn-secondary mr-2', + 'class' => 'btn btn-secondary mx-1', 'role' => 'button', ]); $actionbuttons .= html_writer::empty_tag('input', [ 'type' => 'submit', - 'class' => 'btn btn-primary', + 'class' => 'btn btn-primary mx-1', 'value' => get_string('continue'), ]); $actionbuttons .= html_writer::end_div(); diff --git a/mod/data/templates/template_editor.mustache b/mod/data/templates/template_editor.mustache index a92429bd0d8..3b5bd7ea183 100644 --- a/mod/data/templates/template_editor.mustache +++ b/mod/data/templates/template_editor.mustache @@ -114,13 +114,13 @@ {{$ stickycontent }}
diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 74b1be396d6..69311602aa6 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -2327,7 +2327,7 @@ $footer-link-color: $bg-inverse-link-color !default; } .hasstickyfooter .btn-footer-popover { - bottom: calc(2rem + #{$navbar-height}); + bottom: calc(1rem + #{$stickyfooter-height}); } .popover.footer { diff --git a/theme/boost/scss/moodle/layout.scss b/theme/boost/scss/moodle/layout.scss index a00f325fe8b..ace92b1a6b0 100644 --- a/theme/boost/scss/moodle/layout.scss +++ b/theme/boost/scss/moodle/layout.scss @@ -209,7 +209,7 @@ .drawer-left, .drawer-right { top: $navbar-height; - height: calc(100vh - #{$navbar-height} - #{$navbar-height}); + height: calc(100vh - #{$navbar-height} - #{$stickyfooter-height}); } } @@ -238,7 +238,7 @@ margin-right: $drawer-right-width; } &.hasstickyfooter { - height: calc(100vh - #{$navbar-height} - #{$navbar-height}); + height: calc(100vh - #{$navbar-height} - #{$stickyfooter-height}); } } } diff --git a/theme/boost/scss/moodle/sticky-footer.scss b/theme/boost/scss/moodle/sticky-footer.scss index 36a96c2b6f8..30e887516ff 100644 --- a/theme/boost/scss/moodle/sticky-footer.scss +++ b/theme/boost/scss/moodle/sticky-footer.scss @@ -11,12 +11,13 @@ body { position: fixed; right: 0; left: 0; - height: $navbar-height + 1px; - bottom: -$navbar-height; + height: $stickyfooter-height; + bottom: calc(#{$stickyfooter-height} * -1); transition: bottom .5s; z-index: $zindex-dropdown; overflow: hidden; box-shadow: 0 0 1rem rgba($black, .15); + font-size: calc(#{$font-size-base} * 1.10); } .hasstickyfooter .stickyfooter { @@ -29,6 +30,9 @@ body { margin-bottom: map-get($spacers, 1); } +.stickyfooter .btn { + font-size: calc(#{$font-size-base} * 1.10); +} /* Breakpoints fixes. */ diff --git a/theme/boost/scss/moodle/variables.scss b/theme/boost/scss/moodle/variables.scss index 81a33cb572e..052a3eeb517 100644 --- a/theme/boost/scss/moodle/variables.scss +++ b/theme/boost/scss/moodle/variables.scss @@ -23,6 +23,7 @@ $primary-nav-padding-y: ($spacer / 4) !default; $primary-nav-padding-x: ($spacer / 2) !default; $navbar-height: 60px !default; +$stickyfooter-height: clamp(96px, calc(#{$font-size-base} * 3), calc(#{$font-size-base} * 3)) !default; $course-content-maxwidth: 830px !default; $medium-content-maxwidth: 1120px !default; $h5p-content-maxwidth: 960px !default; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 5ca024422e1..e7ba43bef0c 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -11732,7 +11732,7 @@ ul { right: 2rem; } .hasstickyfooter .btn-footer-popover { - bottom: calc(2rem + 60px); } + bottom: calc(1rem + clamp(96px, calc(0.9375rem * 3), calc(0.9375rem * 3))); } .popover.footer .popover-body { padding: 0; } @@ -20136,12 +20136,13 @@ body { position: fixed; right: 0; left: 0; - height: 61px; - bottom: -60px; + height: clamp(96px, calc(0.9375rem * 3), calc(0.9375rem * 3)); + bottom: calc(clamp(96px, calc(0.9375rem * 3), calc(0.9375rem * 3)) * -1); transition: bottom .5s; z-index: 1000; overflow: hidden; - box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15); } + box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15); + font-size: calc(0.9375rem * 1.10); } .hasstickyfooter .stickyfooter { bottom: 0; } @@ -20150,6 +20151,9 @@ body { .stickyfooter ul.pagination { margin-bottom: 0.25rem; } +.stickyfooter .btn { + font-size: calc(0.9375rem * 1.10); } + /* Breakpoints fixes. */ @media (min-width: 576px) { #page-wrapper { @@ -20784,7 +20788,7 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont .hasstickyfooter .drawer-left, .hasstickyfooter .drawer-right { top: 60px; - height: calc(100vh - 60px - 60px); } + height: calc(100vh - 60px - clamp(96px, calc(0.9375rem * 3), calc(0.9375rem * 3))); } #page.drawers { position: relative; overflow-y: auto; @@ -20811,7 +20815,7 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont margin-left: 285px; margin-right: 315px; } #page.drawers.hasstickyfooter { - height: calc(100vh - 60px - 60px); } } + height: calc(100vh - 60px - clamp(96px, calc(0.9375rem * 3), calc(0.9375rem * 3))); } } .drawercontrolbuttons { margin-top: 92px; } diff --git a/theme/boost/templates/core/sticky_footer.mustache b/theme/boost/templates/core/sticky_footer.mustache index ef6b9a7bf0e..2c4abef68af 100644 --- a/theme/boost/templates/core/sticky_footer.mustache +++ b/theme/boost/templates/core/sticky_footer.mustache @@ -33,7 +33,7 @@ }}