Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media viewer controls rendered behind DSpace header #2594

Merged
merged 3 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/breadcrumbs/breadcrumbs.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ng-container *ngVar="(breadcrumbs$ | async) as breadcrumbs">
<nav *ngIf="(showBreadcrumbs$ | async)" aria-label="breadcrumb" class="nav-breadcrumb">
<ol class="container breadcrumb">
<ol class="container breadcrumb my-0">
<ng-container
*ngTemplateOutlet="breadcrumbs?.length > 0 ? breadcrumb : activeBreadcrumb; context: {text: 'home.breadcrumbs', url: '/'}"></ng-container>
<ng-container *ngFor="let bc of breadcrumbs; let last = last;">
Expand Down
5 changes: 2 additions & 3 deletions src/app/breadcrumbs/breadcrumbs.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

.breadcrumb {
border-radius: 0;
margin-top: calc(-1 * var(--ds-content-spacing));
padding-bottom: calc(var(--ds-content-spacing) / 3);
padding-top: calc(var(--ds-content-spacing) / 3);
padding-bottom: calc(var(--ds-content-spacing) / 2);
padding-top: calc(var(--ds-content-spacing) / 2);
background-color: var(--ds-breadcrumb-bg);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}">
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}" id="header-navbar-wrapper">
<ds-themed-header></ds-themed-header>
<ds-themed-navbar></ds-themed-navbar>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
:host {
position: relative;
z-index: var(--ds-nav-z-index);
div#header-navbar-wrapper {
border-bottom: 1px var(--ds-header-navbar-border-bottom-color) solid;
}
}
2 changes: 1 addition & 1 deletion src/app/home-page/home-news/home-news.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="jumbotron jumbotron-fluid">
<div class="jumbotron jumbotron-fluid mt-ncs">
<div class="container">
<div class="d-flex flex-wrap">
<div>
Expand Down
2 changes: 0 additions & 2 deletions src/app/home-page/home-news/home-news.component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
:host {
display: block;
margin-top: calc(-1 * var(--ds-content-spacing));
margin-bottom: calc(-1 * var(--ds-content-spacing));
}

.display-3 {
Expand Down
3 changes: 2 additions & 1 deletion src/app/navbar/navbar.component.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
nav.navbar {
background-color: var(--ds-navbar-bg);
border-bottom: 1px var(--ds-header-navbar-border-bottom-color) solid;
align-items: baseline;
}

Expand All @@ -12,9 +11,11 @@ nav.navbar {
position: absolute;
overflow: hidden;
height: 0;
z-index: var(--ds-nav-z-index);
&.open {
height: auto;
min-height: 100vh; //doesn't matter because wrapper is sticky
border-bottom: 1px var(--ds-header-navbar-border-bottom-color) solid; // open navbar covers header-navbar-wrapper border
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/root/root.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="inner-wrapper">
<ds-system-wide-alert-banner></ds-system-wide-alert-banner>
<ds-themed-header-navbar-wrapper></ds-themed-header-navbar-wrapper>
<main class="main-content">
<ds-themed-breadcrumbs></ds-themed-breadcrumbs>
<ds-themed-breadcrumbs></ds-themed-breadcrumbs>
<main class="main-content my-cs">

<div class="container d-flex justify-content-center align-items-center h-100" *ngIf="shouldShowRouteLoader">
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_custom_variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:root {
--ds-content-spacing: #{$spacer * 1.5};
--ds-content-spacing: #{$spacer}; // equivalent to Bootstrap spaces of size 3

--ds-button-height: #{$input-btn-padding-y * 2 + $input-btn-line-height + calculateRem($input-btn-border-width*2)};

Expand Down
10 changes: 8 additions & 2 deletions src/styles/_global-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ body {
.main-content {
z-index: var(--ds-main-z-index);
flex: 1 1 100%;
margin-top: var(--ds-content-spacing);
margin-bottom: var(--ds-content-spacing);
}

.alert.hide {
Expand Down Expand Up @@ -317,3 +315,11 @@ ul.dso-edit-menu-dropdown > li .nav-item.nav-link {
padding-top: 0.125rem !important;
padding-bottom: 0.125rem !important;
}

// Margin utility classes based on DSpace content spacing
.mt-cs { margin-top: var(--ds-content-spacing); }
.mb-cs { margin-bottom: var(--ds-content-spacing); }
.my-cs { margin-top: var(--ds-content-spacing); margin-bottom: var(--ds-content-spacing); }
.mt-ncs { margin-top: calc(var(--ds-content-spacing) * -1); }
.mb-ncs { margin-bottom: calc(var(--ds-content-spacing) * -1); }
.my-ncs { margin-top: calc(var(--ds-content-spacing) * -1); margin-bottom: calc(var(--ds-content-spacing) * -1); }
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}">
<div [class.open]="!(isNavBarCollapsed | async)" id="header-navbar-wrapper">
<ds-themed-header></ds-themed-header>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:host {
// The header-navbar-wrapper should not have a z-index, otherwise it would cover the media viewer despite its higher z-index
position: relative;
div#header-navbar-wrapper {
border-bottom: 5px var(--ds-header-navbar-border-bottom-color) solid;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { HeaderNavbarWrapperComponent as BaseComponent } from '../../../../app/h
*/
@Component({
selector: 'ds-header-navbar-wrapper',
styleUrls: ['../../../../app/header-nav-wrapper/header-navbar-wrapper.component.scss'],
styleUrls: ['header-navbar-wrapper.component.scss'],
templateUrl: 'header-navbar-wrapper.component.html',
})
export class HeaderNavbarWrapperComponent extends BaseComponent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="background-image-container">
<div class="background-image-container mt-ncs">
<div class="container">
<div class="jumbotron jumbotron-fluid">
<div class="d-flex flex-wrap">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:host {
display: block;
margin-top: calc(var(--ds-content-spacing) * -1);

div.background-image-container {
color: white;
Expand Down
8 changes: 6 additions & 2 deletions src/themes/dspace/app/navbar/navbar.component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
nav.navbar {
border-top: 1px var(--ds-header-navbar-border-top-color) solid;
border-bottom: 5px var(--ds-header-navbar-border-bottom-color) solid;
align-items: baseline;

.navbar-inner-container {
border-top: 1px var(--ds-header-navbar-border-top-color) solid;
}
}

.navbar-nav {
Expand All @@ -16,8 +18,10 @@ nav.navbar {
position: absolute;
overflow: hidden;
height: 0;
z-index: var(--ds-nav-z-index);
&.open {
height: 100vh; //doesn't matter because wrapper is sticky
border-bottom: 5px var(--ds-header-navbar-border-bottom-color) solid; // open navbar covers header-navbar-wrapper border
}
}
}
Expand Down