From 8f6e9a3f46f97abd4b3cae80b56308a576a71361 Mon Sep 17 00:00:00 2001 From: Ron Lucke Date: Thu, 23 May 2024 14:24:06 +0200 Subject: enhance first to third nav layer layout --- app/controllers/institute/overview.php | 4 ++- resources/assets/stylesheets/highcontrast.scss | 2 ++ resources/assets/stylesheets/scss/header.scss | 2 +- resources/assets/stylesheets/scss/layouts.scss | 38 +++++++++++------------ resources/assets/stylesheets/scss/navigation.scss | 3 +- resources/assets/stylesheets/scss/responsive.scss | 2 +- templates/header.php | 4 +-- 7 files changed, 30 insertions(+), 25 deletions(-) diff --git a/app/controllers/institute/overview.php b/app/controllers/institute/overview.php index 3713dcc..d564e54 100644 --- a/app/controllers/institute/overview.php +++ b/app/controllers/institute/overview.php @@ -89,13 +89,15 @@ class Institute_OverviewController extends AuthenticatedController 'follow_inst' => 'on' ]); $widget->addLink(_('Einrichtung abonnieren'), $url); + $this->sidebar->addWidget($widget); } elseif (! $GLOBALS['perm']->have_studip_perm('autor', $this->institute_id)) { $url = URLHelper::getURL('dispatch.php/institute/overview', [ 'follow_inst' => 'off' ]); $widget->addLink(_('Austragen aus der Einrichtung'), $url); + $this->sidebar->addWidget($widget); } - $this->sidebar->addWidget($widget); + if (! $GLOBALS['perm']->have_studip_perm('user', $this->institute_id) AND (Request::option('follow_inst') == 'on')) { $query = "INSERT IGNORE INTO user_inst diff --git a/resources/assets/stylesheets/highcontrast.scss b/resources/assets/stylesheets/highcontrast.scss index 4e1e4ef..2aafa2d 100644 --- a/resources/assets/stylesheets/highcontrast.scss +++ b/resources/assets/stylesheets/highcontrast.scss @@ -115,6 +115,8 @@ body:not(.fixed) #navigation-level-1-items > li.active:after, #tabs li, #navigation-level-2, +#navigation-level-3, +#current-page-structure #navigation-level-3 .tabs_wrapper, #current-page-structure #navigation-level-2 .tabs_wrapper { background-color: $white; } diff --git a/resources/assets/stylesheets/scss/header.scss b/resources/assets/stylesheets/scss/header.scss index 5c95b4d..9b7b476 100644 --- a/resources/assets/stylesheets/scss/header.scss +++ b/resources/assets/stylesheets/scss/header.scss @@ -176,7 +176,7 @@ html { } #navigation-level-1 { - background-color: var(--dark-gray-color-5); + background-color: var(--content-color-20); height: $header-height; z-index: 3; } diff --git a/resources/assets/stylesheets/scss/layouts.scss b/resources/assets/stylesheets/scss/layouts.scss index 2e26e37..07ec2ec 100644 --- a/resources/assets/stylesheets/scss/layouts.scss +++ b/resources/assets/stylesheets/scss/layouts.scss @@ -81,30 +81,30 @@ body { #navigation-level-2, #navigation-level-3 { #context-title { - font-size: 1.1em; - height: 30px; - padding-left: $page-margin; - max-height: 30px; + font-size: 1.4em; + height: 25px; + padding: 20px 15px; + max-height: 25px; overflow: hidden; - background: linear-gradient(to bottom, var(--dark-gray-color-5), var(--dark-gray-color-10)); + background-color: var(--dark-gray-color-5); - > .context_icon { - margin: 7px 1px 0 9px; + > .context-avatar { + margin: 0 5px 0 12px; vertical-align: text-bottom; } } .tabs_wrapper { align-items: stretch; - background-color: var(--dark-gray-color-10); - border-bottom: 1px solid var(--dark-gray-color-40); + background-color: var(--dark-gray-color-5); + border-bottom: 1px solid var(--dark-gray-color-20); display: flex; flex-direction: row; flex-wrap: nowrap; font-size: 0.9em; justify-content: space-between; - padding-left: 27px; + padding-left: 5px; } .contextless & { @@ -191,16 +191,16 @@ body { } #context-title { - font-size: 1.1em; - height: 30px; - padding-left: $page-margin; - max-height: 30px; + font-size: 1.4em; + height: 25px; + padding: 20px 15px; + max-height: 25px; overflow: hidden; - background: linear-gradient(to bottom, var(--dark-gray-color-5), var(--dark-gray-color-10)); + background:var(--dark-gray-color-5); - > .context_icon { - margin: 7px 1px 0 9px; + > .context-avatar { + margin: 0 5px 0 12px; vertical-align: text-bottom; } } @@ -291,10 +291,10 @@ body { flex-direction: row; align-items: stretch; justify-content: space-between; - background-color: var(--dark-gray-color-10); + background-color: var(--dark-gray-color-5); font-size: 0.9em; min-height: 2.3em; - border-bottom: 1px solid var(--dark-gray-color-40); + border-bottom: 1px solid var(--dark-gray-color-20); } #tabs { // row 1 of layout_page diff --git a/resources/assets/stylesheets/scss/navigation.scss b/resources/assets/stylesheets/scss/navigation.scss index d51c76d..6669e69 100644 --- a/resources/assets/stylesheets/scss/navigation.scss +++ b/resources/assets/stylesheets/scss/navigation.scss @@ -78,7 +78,8 @@ body:not(.fixed) #navigation-level-1-items { } img { - filter: hue-rotate(350deg) saturate(8.7%) brightness(177.3%) !important; + // filter: hue-rotate(350deg) saturate(8.7%) brightness(177.3%) !important; + filter: hue-rotate(350deg) saturate(8.7%) brightness(155%) !important; } // Hide all navigation item title on hover and display only the currently diff --git a/resources/assets/stylesheets/scss/responsive.scss b/resources/assets/stylesheets/scss/responsive.scss index c4317e9..6a8d610 100644 --- a/resources/assets/stylesheets/scss/responsive.scss +++ b/resources/assets/stylesheets/scss/responsive.scss @@ -716,7 +716,7 @@ html:not(.responsive-display):not(.fullscreen-mode) { .colorblock, #context-title, - .context_icon, + .context-avatar, .tabs_wrapper { transition: unset; } diff --git a/templates/header.php b/templates/header.php index 0a652f7..1be669c 100644 --- a/templates/header.php +++ b/templates/header.php @@ -255,13 +255,13 @@ if ($navigation) {
- asImg(20, ['class' => 'context_icon']) ?> + id)->getImageTag(Avatar::SMALL, ['class' => 'context-avatar']) ?> getFullName()) ?> config->SHOWSEM_ENABLE && !Context::get()->isOpenEnded()): ?> (getTextualSemester()) ?>) - asImg(20, ['class' => 'context_icon']) ?> + id)->getImageTag(Avatar::SMALL, ['class' => 'context-avatar']) ?> name) ?>
-- cgit v1.0