Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ecci 566 #53

Merged
merged 3 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions ecc_theme/css/ecc-shared/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
display: none;
}

.layout--threecol-33-34-33,
.layout--twocol {
.layout--threecol-33-34-33 {
/*
@todo:
Once we have the subsite landing pages converted to use the new
Expand All @@ -51,29 +50,23 @@
}

.layout--twocol {
display: flex;
flex-flow: wrap;
display: block;
}

@media screen and (min-width: 40em) {
@media screen and (min-width: 1025px) {
.layout--twocol {
grid-template-columns: repeat(2, 1fr);
display: flex;
flex-wrap: wrap;
}
}


@media only screen and (min-width: 641px) {

.layout__region--second .call-out-box {
margin-top: 0;
}

.layout.layout--twocol {
display: grid;
flex-direction: row;
justify-content: space-between;
column-gap: var(--grid-gap);
}

.layout.layout--twocol > .layout__region--first,
.layout.layout--twocol > .layout__region--second {
flex: 0 1 calc(50% - calc(var(--grid-gap-smaller)));
Expand Down Expand Up @@ -116,7 +109,7 @@
}

.paragraph--type--news-1-4 .news-card article > .card-content::before,
.paragraph--type--news-1-4 .featured-news__card article>.card-content:before,
.paragraph--type--news-1-4 .featured-news__card article > .card-content:before,
.paragraph--type--localgov-newsroom-teaser2 .news-card article > .card-content::before {
position: absolute;
right: 0;
Expand All @@ -127,6 +120,19 @@
background: var(--color-accent);
}

.featured-news__card article > .card-content:before,
.news-card article > .card-content:before,
.newsroom-teaser:before,
.newsroom-teaser > .newsroom-teaser__content .newsroom-teaser__summary:before {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 3px;
background: var(--color-accent);
}

.paragraph--type--localgov-featured-teasers.featured-teasers {
display: flex;
flex-direction: column;
Expand Down
133 changes: 128 additions & 5 deletions ecc_theme/css/ecc-shared/news.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,45 @@ This CSS file, news.css, is used to style a news article component.
gap: initial;
}

.news-card .card-image img,
.featured-news__card img {
object-fit: cover;
width: 100%;
height: 100%
}

.featured-news__card .card-image div, .news-card .card-image div {
height: 100%;
}

.featured-news__card .card-image, .news-card .card-image {
position: relative;
}

.featured-news__card article .card-content,
.news-card article .card-content {
grid-column: 2 / span 2;
padding: 0.5rem 1rem;
display: flex;
flex-direction: column;
}

.featured-news__card article .card-content,
.news-card article .card-content {
position: relative;
font-size: calc(var(--spacing) * 1.125);
}

.featured-news__card article .card-content,
.news-card article .card-content {
padding: calc(var(--spacing) * 1.25);
}

.featured-news__card:first-of-type,
.news-card article {
margin-bottom: var(--spacing);
}

/* Related news heading */
.news-article__related-title {
margin-top: var(--spacing-larger);
Expand All @@ -43,9 +82,7 @@ This CSS file, news.css, is used to style a news article component.
.news-article__related-title {
margin-top: var(--spacing-mega);
}
}

@media only screen and (min-width: 768px) {
.news-row {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -76,17 +113,48 @@ This CSS file, news.css, is used to style a news article component.

.paragraph--type--newsroom-component > .featured-news__card,
.paragraph--type--news-1-4 > .featured-news__card {
margin-bottom: var(--spacing);
margin-bottom: var(--spacing-large);
}

.lgd-teaser__content--localgov-news-article h3 {
margin-bottom: var(--spacing-smaller);
}
/*
.paragraph--type--newsroom-component .news-card > * + * {
margin-top: var(--spacing-largest);
} */

.paragraph--type--newsroom-component .news-card > * + * {
margin-top: var(--spacing-largest);
@media (min-width: 641px) {
.featured-news__card .card-image {
grid-column: 1 / span 2;
}

.featured-news__card article .card-content {
grid-column: 3 / span 2;
padding: 0.5rem 1rem;
display: flex;
flex-direction: column;
}

.news-card {
display: grid;
grid-template-columns: 1fr 1fr;
grid-auto-rows: 1fr;
grid-gap: 1em;
margin: 0;
width: 50%;
}

.field.news-card {
width: auto;
}

.news-card article .card-image,
.news-card article .card-content {
grid-column: 1 / span 3;
}
}

@media (max-width: 640px) {
.paragraph--type--news-1-4 .news-card > * + * {
margin-top: var(--spacing-largest);
Expand All @@ -101,4 +169,59 @@ This CSS file, news.css, is used to style a news article component.
.paragraph--type--news-1-4 .featured-news__card:first-of-type {
margin-bottom: 0;
}

.news-card {
display: grid;
grid-template-columns: 1fr 1fr;
grid-auto-rows: 1fr;
grid-gap: 1em;
margin: 0;
}

.featured-news__card article,
.news-card article {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
}

.featured-news__card article {
grid-template-columns: 1fr 1fr 1fr 1fr;
}

.featured-news__card article .card-content {
grid-column: 3 / span 2;
min-height: 240px;
padding: 1.25rem 1rem;
}

.featured-news__card .card-image {
grid-column: 1 / span 2;
}

.card-content {
position: relative;
padding: 10px;
}

.news-card article .card-image,
.news-card article .card-content {
grid-column: 1 / span 3;
}

.news-card .card-image img {
object-fit: cover;
aspect-ratio: 41 / 30;
}
}

@media screen and (min-width: 1025px) {
.featured-news__card article,
.news-card article {
margin-bottom: var(--spacing-large);
}

.featured-news__card:first-of-type {
margin-bottom: var(--spacing-largest);
}
}