fix(breadcrumb): correct positioning of breadcrumb
This commit is contained in:
committed by
Benedikt Rötsch
parent
7e49f18db1
commit
1ca400234e
@@ -1,5 +1,6 @@
|
|||||||
@block breadcrumb {
|
@block breadcrumb {
|
||||||
margin-bottom: calc(var(--grid-gutter) / 2);
|
margin-bottom: calc(var(--grid-gutter) * 0.25);
|
||||||
|
|
||||||
& ul {
|
& ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ body {
|
|||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
@element footer {
|
@element footer {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
@import 'layout-centered';
|
@import 'layout-centered';
|
||||||
|
@import 'layout-no-sidebar';
|
||||||
@import 'layout-sidebar';
|
@import 'layout-sidebar';
|
||||||
@import 'grid-list';
|
@import 'grid-list';
|
||||||
|
|||||||
11
assets/stylesheets/layout/layout-no-sidebar.css
Normal file
11
assets/stylesheets/layout/layout-no-sidebar.css
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
@block layout-no-sidebar {
|
||||||
|
padding: 0 calc(var(--grid-gutter) / 2);
|
||||||
|
max-width: var(--content-max-width);
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
@media (--breakpoint-desktop) {
|
||||||
|
padding-left: calc(var(--layout-sidebar-sidebar-width) + var(--grid-gutter));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@block layout-sidebar {
|
@block layout-sidebar {
|
||||||
padding: 0 2vw;
|
padding: 0 calc(var(--grid-gutter) / 2);
|
||||||
max-width: var(--content-max-width);
|
max-width: var(--content-max-width);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
@@ -36,9 +36,8 @@
|
|||||||
|
|
||||||
@element content {
|
@element content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-self: stretch;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
padding-top: calc(var(--grid-gutter) / 4);
|
||||||
padding-top: calc(var(--grid-gutter) / 2);
|
|
||||||
|
|
||||||
@media (--breakpoint-desktop) {
|
@media (--breakpoint-desktop) {
|
||||||
flex: 0 1 auto;
|
flex: 0 1 auto;
|
||||||
|
|||||||
@@ -849,8 +849,24 @@ input[type="reset"]:focus,
|
|||||||
padding: 0 2vw;
|
padding: 0 2vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.layout-no-sidebar {
|
||||||
|
padding: 0 11px;
|
||||||
|
max-width: 980px;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 700px) {
|
||||||
|
|
||||||
|
.layout-no-sidebar {
|
||||||
|
padding-left: 250px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.layout-sidebar {
|
.layout-sidebar {
|
||||||
padding: 0 2vw;
|
padding: 0 11px;
|
||||||
max-width: 980px;
|
max-width: 980px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@@ -901,12 +917,11 @@ input[type="reset"]:focus,
|
|||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
display: flex;
|
display: flex;
|
||||||
-ms-flex-item-align: stretch;
|
-webkit-box-orient: vertical;
|
||||||
align-self: stretch;
|
-webkit-box-direction: normal;
|
||||||
-webkit-box-align: stretch;
|
-ms-flex-direction: column;
|
||||||
-ms-flex-align: stretch;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
padding-top: 5.5px;
|
||||||
padding-top: 11px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 700px) {
|
@media (min-width: 700px) {
|
||||||
@@ -1470,7 +1485,7 @@ display: flex;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
margin-bottom: 11px;
|
margin-bottom: 5.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb ul {
|
.breadcrumb ul {
|
||||||
@@ -1545,6 +1560,10 @@ body {
|
|||||||
-webkit-box-align: stretch;
|
-webkit-box-align: stretch;
|
||||||
-ms-flex-align: stretch;
|
-ms-flex-align: stretch;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-ms-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main__footer {
|
.main__footer {
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
|
include mixins/_breadcrumb
|
||||||
include mixins/_lesson
|
include mixins/_lesson
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
.layout-no-sidebar
|
||||||
|
+breadcrumb
|
||||||
.layout-sidebar
|
.layout-sidebar
|
||||||
section.layout-sidebar__sidebar
|
section.layout-sidebar__sidebar
|
||||||
.layout-sidebar__sidebar-header
|
.layout-sidebar__sidebar-header
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
|
include mixins/_breadcrumb
|
||||||
include mixins/_courseCard
|
include mixins/_courseCard
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
.layout-no-sidebar
|
||||||
|
+breadcrumb
|
||||||
.layout-sidebar
|
.layout-sidebar
|
||||||
section.layout-sidebar__sidebar
|
section.layout-sidebar__sidebar
|
||||||
.layout-sidebar__sidebar-header
|
.layout-sidebar__sidebar-header
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
|
include mixins/_breadcrumb
|
||||||
|
|
||||||
block content
|
block content
|
||||||
.layout-centered
|
.layout-centered
|
||||||
|
+breadcrumb
|
||||||
.error
|
.error
|
||||||
h1 Oops Something went wrong (#{error.status})
|
h1 Oops Something went wrong (#{error.status})
|
||||||
h2 Try:
|
h2 Try:
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
|
include mixins/_breadcrumb
|
||||||
include mixins/_moduleCopy
|
include mixins/_moduleCopy
|
||||||
include mixins/_moduleHeroImage
|
include mixins/_moduleHeroImage
|
||||||
include mixins/_moduleHighlightedCourse
|
include mixins/_moduleHighlightedCourse
|
||||||
|
|
||||||
block content
|
block content
|
||||||
.modules-container
|
.modules-container
|
||||||
|
if currentPath !== '/'
|
||||||
|
.layout-centered
|
||||||
|
+breadcrumb
|
||||||
each module in landingPage.fields.contentModules
|
each module in landingPage.fields.contentModules
|
||||||
case module.sys.contentType.sys.id
|
case module.sys.contentType.sys.id
|
||||||
when 'landingPageModuleCopy'
|
when 'landingPageModuleCopy'
|
||||||
|
|||||||
@@ -48,14 +48,6 @@ html
|
|||||||
a(href=`/about${queryString}` class=(currentPath.startsWith('/about') ? 'active' : '')) About
|
a(href=`/about${queryString}` class=(currentPath.startsWith('/about') ? 'active' : '')) About
|
||||||
li
|
li
|
||||||
a(href=`/settings${queryString}` class=(currentPath.startsWith('/settings') ? 'active' : '')) Settings
|
a(href=`/settings${queryString}` class=(currentPath.startsWith('/settings') ? 'active' : '')) Settings
|
||||||
if currentPath !== '/'
|
|
||||||
.main__breadcrumb
|
|
||||||
.layout-centered
|
|
||||||
nav.breadcrumb
|
|
||||||
ul
|
|
||||||
each item in breadcrumb
|
|
||||||
li
|
|
||||||
a(href=`${item.url}${queryString}`) #{item.label}
|
|
||||||
.main__content
|
.main__content
|
||||||
block content
|
block content
|
||||||
|
|
||||||
|
|||||||
6
views/mixins/_breadcrumb.pug
Normal file
6
views/mixins/_breadcrumb.pug
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
mixin breadcrumb
|
||||||
|
nav.breadcrumb
|
||||||
|
ul
|
||||||
|
each item in breadcrumb
|
||||||
|
li
|
||||||
|
a(href=`${item.url}${queryString}`) #{item.label}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
|
include mixins/_breadcrumb
|
||||||
|
|
||||||
block content
|
block content
|
||||||
.layout-centered-small
|
.layout-centered-small
|
||||||
|
+breadcrumb
|
||||||
h1= title
|
h1= title
|
||||||
p To query and get content using the APIs, client applications need to authenticate with both the Space ID and an access token.
|
p To query and get content using the APIs, client applications need to authenticate with both the Space ID and an access token.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user