Skip to content

Commit

Permalink
Merge pull request #734 from City-of-Helsinki/UHF-9132
Browse files Browse the repository at this point in the history
UHF-9132: Add max-width limitation to all content types without sidebar except landing page
  • Loading branch information
teroelonen authored Dec 1, 2023
2 parents 1b29a54 + ef103d8 commit 8afe424
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 62 deletions.
2 changes: 1 addition & 1 deletion public/themes/custom/hdbt_subtheme/dist/css/styles.min.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions public/themes/custom/hdbt_subtheme/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
.project__image-container {
img {
height: auto;
width: 100%;
}
}

.page-type--project.no-sidebar {
.page-type--project {
.project__image-container,
.content-tags,
.project__metadata-wrapper {
Expand All @@ -14,11 +7,22 @@
margin-left: auto;
margin-right: auto;
}
}

.project__image-container picture {
display: block;
max-width: $content-width-max;

.node--type-project {
img {
display: block;
height: auto;
max-width: 100%;
overflow: hidden;
box-shadow: inset 0 0 0 1px #e6e6e6;
}
}
}

.node--type-project {
.content-tags {
margin-top: $spacing-double;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
padding-bottom: 55px; // Leave enough room between the last card and footer.
}

.component--district-listing .component__container {
padding-bottom: $spacing-double;
padding-top: $spacing-double;

@include breakpoint($breakpoint-m) {
padding-bottom: $spacing-quadruple;
padding-top: $spacing-quadruple;
}
}

.district-listing .views-infinite-scroll-content-wrapper {
margin-top: $spacing;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
.component--list-of-plans {
@include component-side-padding;
background-color: $color-silver-light;
}

// Since the component is not "full width" next to a sidebar, we should uniform padding around
.has-sidebar .components--upper .component--list-of-plans .component__container {
padding-bottom: $spacing-double;
padding-left: $spacing-double;
padding-right: $spacing-double;
padding-top: $spacing-double;
}

// If the unit-search is just before footer.
.layout-main-wrapper > *:last-child .component--list-of-plans:last-child {
margin-bottom: -115px; // Enough to get the block under the footer.
padding-bottom: 55px; // Leave enough room between the last card and footer.
}

.component--list-of-plans .component__container {
padding-bottom: $spacing-double;
padding-top: $spacing-double;

@include breakpoint($breakpoint-m) {
padding-bottom: $spacing-quadruple;
padding-top: $spacing-quadruple;
}
}

.list-of-plans__count-container {
@include font('lead');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
.component--project-list {
background-color: $color-black-5;

.component__container {
padding-bottom: $spacing-quadruple;
padding-top: $spacing-quadruple;

// Since the component is not "full width" next to a sidebar, we should uniform padding around
.has-sidebar .components--upper & {
padding-bottom: $spacing-double;
padding-left: $spacing-double;
padding-right: $spacing-double;
padding-top: $spacing-double;
}
}
@include component-side-padding;
background-color: $color-silver-light;
}

.project-list_count {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{% block paragraph %}
{% embed "@hdbt/misc/component.twig" with
{
component_classes: [ 'component--district-listing' ],
component_classes: [
'component--full-width',
'component--district-listing'
],
component_title: content.field_district_list_title,
component_description: content.field_district_list_description,
component_content_class: 'district-listing',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{% block paragraph %}
{% embed "@hdbt/misc/component.twig" with
{
component_classes: [ 'component--list-of-plans' ],
component_classes: [
'component--full-width',
'component--list-of-plans'
],
component_title: title,
component_description: description,
component_content_class: 'list-of-plans',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{% block paragraph %}
{% embed "@hdbt/misc/component.twig" with
{
component_classes: [ 'component--project-list' ],
component_classes: [
'component--full-width',
'component--project-list'
],
component_title: content.field_project_list_title,
component_description: content.field_project_list_description,
component_content_class: 'project-list',
Expand Down

0 comments on commit 8afe424

Please sign in to comment.