[DURACOM-195] Simplify vertical spacing in header and breadcrumbs

This commit is contained in:
Davide Negretti
2023-10-30 18:27:00 +01:00
parent 3cb623de72
commit a3e6d9b09a
9 changed files with 16 additions and 14 deletions

View File

@@ -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;">

View File

@@ -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);
}

View File

@@ -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>

View File

@@ -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 {

View File

@@ -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>

View File

@@ -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)};

View File

@@ -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 {
@@ -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); }

View File

@@ -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">

View File

@@ -1,6 +1,5 @@
:host {
display: block;
margin-top: calc(var(--ds-content-spacing) * -1);
div.background-image-container {
color: white;