From d0fe8d4c21b720ec4dfd2e3fc46197165a0754f4 Mon Sep 17 00:00:00 2001 From: Michael Hawkins Date: Wed, 26 Jul 2023 19:38:31 +0800 Subject: [PATCH] MDL-78619 theme: Communication button fixes The footer button was missing some CSS to factor in the blocks drawer. Also added noreferrer to the window.open call made when clicking the communication button, to avoid the risks associated with opening in _blank without removing access to the referrer and opener (noopener is implicitly defined in modern browsers when noreferrer is set). --- theme/boost/scss/moodle/drawer.scss | 3 ++- theme/boost/scss/moodle/layout.scss | 3 ++- theme/boost/style/moodle.css | 8 +++++--- theme/boost/templates/footer.mustache | 2 +- theme/classic/style/moodle.css | 8 +++++--- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/theme/boost/scss/moodle/drawer.scss b/theme/boost/scss/moodle/drawer.scss index cc1606bda7b..b66185540ee 100644 --- a/theme/boost/scss/moodle/drawer.scss +++ b/theme/boost/scss/moodle/drawer.scss @@ -47,7 +47,8 @@ $drawer-bg: darken($body-bg, 5%) !default; [data-region="drawer"] { padding: $drawer-padding-x $drawer-padding-y; } - .jsenabled .btn-footer-popover { + .jsenabled .btn-footer-popover, + .jsenabled .btn-footer-communication { @include transition(0.2s); } } diff --git a/theme/boost/scss/moodle/layout.scss b/theme/boost/scss/moodle/layout.scss index 13435722a4c..3be9b6b4bff 100644 --- a/theme/boost/scss/moodle/layout.scss +++ b/theme/boost/scss/moodle/layout.scss @@ -228,7 +228,8 @@ margin-left: 0; margin-right: $drawer-right-width; padding-right: 1rem; - .jsenabled & .btn-footer-popover { + .jsenabled & .btn-footer-popover, + .jsenabled & .btn-footer-communication { right: calc(#{$drawer-right-width} + 2rem); } } diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 9c365f31e7d..d33c354a356 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -29610,12 +29610,14 @@ span.editinstructions .alert-link { [data-region=drawer] { padding: 20px 20px; } - .jsenabled .btn-footer-popover { + .jsenabled .btn-footer-popover, + .jsenabled .btn-footer-communication { transition: 0.2s; } } @media (min-width: 576px) and (prefers-reduced-motion: reduce) { - .jsenabled .btn-footer-popover { + .jsenabled .btn-footer-popover, + .jsenabled .btn-footer-communication { transition: none; } } @@ -36666,7 +36668,7 @@ span[data-flexitour=container][x-placement=right] div[data-role=arrow]:after, sp margin-right: 315px; padding-right: 1rem; } - .jsenabled #page.drawers.show-drawer-right .btn-footer-popover { + .jsenabled #page.drawers.show-drawer-right .btn-footer-popover, .jsenabled #page.drawers.show-drawer-right .btn-footer-communication { right: calc(315px + 2rem); } } diff --git a/theme/boost/templates/footer.mustache b/theme/boost/templates/footer.mustache index 1bd8d6af3d4..e5f15bfa9b1 100644 --- a/theme/boost/templates/footer.mustache +++ b/theme/boost/templates/footer.mustache @@ -38,7 +38,7 @@