Skip to content

Commit 34b91a7

Browse files
authored
Merge pull request DSpace#2617 from DSpace/backport-2594-to-dspace-7_x
[Port dspace-7_x] Media viewer controls rendered behind DSpace header
2 parents 203dcbe + c6ade09 commit 34b91a7

16 files changed

Lines changed: 37 additions & 21 deletions

src/app/breadcrumbs/breadcrumbs.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ng-container *ngVar="(breadcrumbs$ | async) as breadcrumbs">
22
<nav *ngIf="(showBreadcrumbs$ | async)" aria-label="breadcrumb" class="nav-breadcrumb">
3-
<ol class="container breadcrumb">
3+
<ol class="container breadcrumb my-0">
44
<ng-container
55
*ngTemplateOutlet="breadcrumbs?.length > 0 ? breadcrumb : activeBreadcrumb; context: {text: 'home.breadcrumbs', url: '/'}"></ng-container>
66
<ng-container *ngFor="let bc of breadcrumbs; let last = last;">

src/app/breadcrumbs/breadcrumbs.component.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
.breadcrumb {
66
border-radius: 0;
7-
margin-top: calc(-1 * var(--ds-content-spacing));
8-
padding-bottom: calc(var(--ds-content-spacing) / 3);
9-
padding-top: calc(var(--ds-content-spacing) / 3);
7+
padding-bottom: calc(var(--ds-content-spacing) / 2);
8+
padding-top: calc(var(--ds-content-spacing) / 2);
109
background-color: var(--ds-breadcrumb-bg);
1110
}
1211

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}">
1+
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}" id="header-navbar-wrapper">
22
<ds-themed-header></ds-themed-header>
33
<ds-themed-navbar></ds-themed-navbar>
44
</div>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
:host {
22
position: relative;
3-
z-index: var(--ds-nav-z-index);
3+
div#header-navbar-wrapper {
4+
border-bottom: 1px var(--ds-header-navbar-border-bottom-color) solid;
5+
}
46
}

src/app/home-page/home-news/home-news.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="jumbotron jumbotron-fluid">
1+
<div class="jumbotron jumbotron-fluid mt-ncs">
22
<div class="container">
33
<div class="d-flex flex-wrap">
44
<div>

src/app/home-page/home-news/home-news.component.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:host {
22
display: block;
3-
margin-top: calc(-1 * var(--ds-content-spacing));
4-
margin-bottom: calc(-1 * var(--ds-content-spacing));
53
}
64

75
.display-3 {

src/app/navbar/navbar.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
nav.navbar {
22
background-color: var(--ds-navbar-bg);
3-
border-bottom: 1px var(--ds-header-navbar-border-bottom-color) solid;
43
align-items: baseline;
54
}
65

@@ -12,9 +11,11 @@ nav.navbar {
1211
position: absolute;
1312
overflow: hidden;
1413
height: 0;
14+
z-index: var(--ds-nav-z-index);
1515
&.open {
1616
height: auto;
1717
min-height: 100vh; //doesn't matter because wrapper is sticky
18+
border-bottom: 1px var(--ds-header-navbar-border-bottom-color) solid; // open navbar covers header-navbar-wrapper border
1819
}
1920
}
2021
}

src/app/root/root.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<div class="inner-wrapper">
77
<ds-system-wide-alert-banner></ds-system-wide-alert-banner>
88
<ds-themed-header-navbar-wrapper></ds-themed-header-navbar-wrapper>
9-
<main class="main-content">
10-
<ds-themed-breadcrumbs></ds-themed-breadcrumbs>
9+
<ds-themed-breadcrumbs></ds-themed-breadcrumbs>
10+
<main class="main-content my-cs">
1111

1212
<div class="container d-flex justify-content-center align-items-center h-100" *ngIf="shouldShowRouteLoader">
1313
<ds-themed-loading [showMessage]="false"></ds-themed-loading>

src/styles/_custom_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:root {
2-
--ds-content-spacing: #{$spacer * 1.5};
2+
--ds-content-spacing: #{$spacer}; // equivalent to Bootstrap spaces of size 3
33

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

src/styles/_global-styles.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ body {
2626
.main-content {
2727
z-index: var(--ds-main-z-index);
2828
flex: 1 1 100%;
29-
margin-top: var(--ds-content-spacing);
30-
margin-bottom: var(--ds-content-spacing);
3129
}
3230

3331
.alert.hide {
@@ -317,3 +315,11 @@ ul.dso-edit-menu-dropdown > li .nav-item.nav-link {
317315
padding-top: 0.125rem !important;
318316
padding-bottom: 0.125rem !important;
319317
}
318+
319+
// Margin utility classes based on DSpace content spacing
320+
.mt-cs { margin-top: var(--ds-content-spacing); }
321+
.mb-cs { margin-bottom: var(--ds-content-spacing); }
322+
.my-cs { margin-top: var(--ds-content-spacing); margin-bottom: var(--ds-content-spacing); }
323+
.mt-ncs { margin-top: calc(var(--ds-content-spacing) * -1); }
324+
.mb-ncs { margin-bottom: calc(var(--ds-content-spacing) * -1); }
325+
.my-ncs { margin-top: calc(var(--ds-content-spacing) * -1); margin-bottom: calc(var(--ds-content-spacing) * -1); }

0 commit comments

Comments
 (0)