Skip to content

Commit

Permalink
Break home page template down into block templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimisgold committed Apr 16, 2024
1 parent 93ab15c commit 1d301dc
Show file tree
Hide file tree
Showing 12 changed files with 205 additions and 222 deletions.
1 change: 0 additions & 1 deletion asset/css/home.css

This file was deleted.

2 changes: 1 addition & 1 deletion asset/css/style.css

Large diffs are not rendered by default.

121 changes: 121 additions & 0 deletions asset/sass/_screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ body {
line-height: $base-line-height;
margin: 0;
word-wrap: break-word;
overflow-x: none;
}

a:link {
Expand Down Expand Up @@ -548,6 +549,126 @@ footer {
}
}

.spotlight {
padding: $spacing-l;
padding-right: calc(50% + #{$spacing-l});
background-position: right center;
background-repeat: no-repeat;
background-size: 50%;
margin: (2 * $spacing-l) 0;

&.left-image {
background-position: left center;
padding-left: calc(50% + #{$spacing-l});
padding-right: 0;
}

&.dark-accent {
color: #fff;
position: relative;

&:after {
content: "";
background-color: $bold;
z-index: -1;
position: absolute;
left: -9999px;
right: -9999px;
top: 0;
bottom: 0;
}
}

&.light-accent {
position: relative;

&:after {
content: "";
background-color: #fff;
z-index: -1;
position: absolute;
left: -9999px;
right: -9999px;
top: 0;
bottom: 0;
border: 1px solid $light;
}
}
}

@media screen and (max-width:799px) {
.spotlight {
padding-right: 0 !important;
padding-left: 0 !important;
padding-top: 33rem;
background-position: center #{$spacing-l} !important;
background-size: auto 30rem;
}
}

.template-3-grid.assets {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
grid-gap: $spacing-l;
}

@media screen and (max-width:799px) {
.template-3-grid.assets {
grid-template-columns: 1fr 1fr;
}
}

@media screen and (max-width:399px) {
.template-3-grid.assets {
grid-template-columns: 1fr;
}
}

.template-3-grid .asset-container {
aspect-ratio: 4/3;
width: 100%;
height: auto;
overflow: hidden;
margin-bottom: $spacing-s;
}

.template-3-grid.assets .asset img {
object-fit: cover;
width: 100%;
height: 100%;
max-width: none;
}

.media-card.media-embed.layout-horizontal.multiple-attachments {
--grid-column-count: 2;
margin: $spacing-l 0;

.resource {
display: flex;
background-color: #fff;
padding: $spacing-l;
align-items: center;
border: 1px solid $light;
}

.resource-meta {
width: 50%;
padding-left: $spacing-l;
}

.media-render {
max-width: 50%;
}
}

@media screen and (max-width:799px) {
.media-card.media-embed.layout-horizontal.multiple-attachments {
--grid-column-count: 1;
}
}


/* @end */

/* @group ----- Resource List ----- */
Expand Down
130 changes: 0 additions & 130 deletions asset/sass/home.scss

This file was deleted.

3 changes: 2 additions & 1 deletion config/theme.ini
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ resource_page_blocks.item_sets.main[] = "values"
resource_page_blocks.media.main[] = "mediaRender"
resource_page_blocks.media.main[] = "values"

page_templates.homepage = "Homepage"
block_templates.asset.asset-3-grid = "3 column grid"
block_templates.media.media-card = "2 column cards"
34 changes: 0 additions & 34 deletions view/common/block-layout/home-asset.phtml

This file was deleted.

1 change: 0 additions & 1 deletion view/common/block-layout/home-block-group.phtml

This file was deleted.

54 changes: 0 additions & 54 deletions view/common/block-layout/home-media.phtml

This file was deleted.

Loading

0 comments on commit 1d301dc

Please sign in to comment.