feat: impact-media page type with OG scraping and cache
All checks were successful
Deploy / Deploy to Production (push) Successful in 12s
All checks were successful
Deploy / Deploy to Production (push) Successful in 12s
- Add impact-media blueprint (entries field + linked investigation) - Add minimal impact-media template - Refactor card-open-graph snippet: accepts $url param, Kirby cache (6h TTL), decode HTML entities, empty alt on images - Update impacts.yml to allow impact-media pages - Render impact-media in investigation aside with dynamic count + details/summary - Add OG cache config in config.php - CSS formatting fixes (body, card-block-small, category) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b8352c81fa
commit
f757906584
11 changed files with 505 additions and 452 deletions
|
|
@ -1,153 +1,141 @@
|
|||
.card--block-small {
|
||||
border-bottom: var(--border-light);
|
||||
padding: var(--padding-inner) 0;
|
||||
padding-bottom: calc(var(--spacing) * 0.75);
|
||||
|
||||
border-bottom: var(--border-light);
|
||||
padding: var(--padding-inner) 0;
|
||||
padding-bottom: calc(var(--spacing)*0.75);
|
||||
&:first-of-type {
|
||||
border-top: var(--border-light);
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
border-top: var(--border-light);
|
||||
}
|
||||
@include grid-content();
|
||||
@include hover-card-line();
|
||||
|
||||
@include grid-content();
|
||||
@include hover-card-line();
|
||||
.group-top {
|
||||
position: relative;
|
||||
// top: -5px;
|
||||
}
|
||||
|
||||
|
||||
.group-top {
|
||||
position: relative;
|
||||
// top: -5px;
|
||||
}
|
||||
@include btn--go-to();
|
||||
|
||||
@include btn--go-to();
|
||||
.btn--go-to {
|
||||
top: calc(var(--padding-inner) * 1);
|
||||
bottom: auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
font-size: var(--fs-normal);
|
||||
line-height: var(--leading-title);
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
margin-right: 4ch;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: var(--fs-small);
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
@media #{$small} {
|
||||
display: block;
|
||||
padding-bottom: calc(var(--spacing) * 0.5);
|
||||
|
||||
.btn--go-to {
|
||||
top: calc(var(--padding-inner)*1);
|
||||
bottom: auto;
|
||||
top: auto;
|
||||
bottom: calc(var(--padding-inner) * 1);
|
||||
}
|
||||
|
||||
.group-top {
|
||||
top: 0px;
|
||||
margin-bottom: calc(var(--spacing) * 0.5);
|
||||
}
|
||||
|
||||
.title {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
font-size: var(--fs-normal);
|
||||
line-height: var(--leading-title);
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
margin-right: 4ch;
|
||||
margin-bottom: calc(var(--spacing) * 0.75);
|
||||
margin-right: 1ch;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: var(--fs-small);
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
margin-top: 4px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
@media #{$small} {
|
||||
display: block;
|
||||
padding-bottom: calc(var(--spacing)*0.5);
|
||||
|
||||
.btn--go-to{
|
||||
top: auto;
|
||||
bottom: calc(var(--padding-inner)*1);
|
||||
}
|
||||
|
||||
.group-top {
|
||||
top: 0px;
|
||||
margin-bottom: calc(var(--spacing)*0.5);
|
||||
}
|
||||
|
||||
.title{
|
||||
margin-bottom: calc(var(--spacing)*0.75);
|
||||
margin-right: 1ch;
|
||||
}
|
||||
|
||||
.date{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.card--block-small {
|
||||
|
||||
.card--open-graph {
|
||||
grid-column: 2;
|
||||
z-index: 10;
|
||||
grid-column: 2;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.card--open-graph:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.open-graph__details {
|
||||
grid-column: 2;
|
||||
|
||||
summary,
|
||||
.summary-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
gap: 0.5ch;
|
||||
}
|
||||
|
||||
.open-graph__details {
|
||||
grid-column: 2;
|
||||
.arrow-details {
|
||||
line-height: 0;
|
||||
--size: 11px;
|
||||
height: var(--size);
|
||||
width: var(--size);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
|
||||
svg {
|
||||
transition: transform 0.2s ease-in;
|
||||
width: 100%;
|
||||
fill: var(--color-txt);
|
||||
}
|
||||
}
|
||||
|
||||
summary:hover {
|
||||
color: var(--color-txt);
|
||||
|
||||
.arrow-details svg {
|
||||
fill: var(--color-txt);
|
||||
}
|
||||
}
|
||||
|
||||
&[open] {
|
||||
.arrow-details svg {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
summary {
|
||||
color: var(--color-txt-light);
|
||||
|
||||
.arrow-details svg {
|
||||
fill: var(--color-txt-light);
|
||||
}
|
||||
}
|
||||
|
||||
@media #{$x-small} {
|
||||
summary {
|
||||
@include grid-content();
|
||||
grid-row-gap: 0;
|
||||
|
||||
summary,
|
||||
.summary-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
gap: 0.5ch;
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.arrow-details {
|
||||
line-height: 0;
|
||||
--size: 11px;
|
||||
height: var(--size);
|
||||
width: var(--size);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
|
||||
svg {
|
||||
transition: transform 0.2s ease-in;
|
||||
width: 100%;
|
||||
fill: var(--color-txt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
summary:hover {
|
||||
color: var(--color-txt);
|
||||
|
||||
.arrow-details svg {
|
||||
fill: var(--color-txt);
|
||||
}
|
||||
}
|
||||
|
||||
&[open] {
|
||||
.arrow-details svg {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
summary {
|
||||
color: var(--color-txt-light);
|
||||
|
||||
.arrow-details svg {
|
||||
fill: var(--color-txt-light);
|
||||
}
|
||||
}
|
||||
|
||||
@media #{$x-small} {
|
||||
summary {
|
||||
@include grid-content();
|
||||
grid-row-gap: 0;
|
||||
|
||||
.summary-inner {
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
|
||||
grid-column: 1/3;
|
||||
}
|
||||
grid-column: 1/3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,112 +1,102 @@
|
|||
.type{
|
||||
height: calc(var(--h-block)*0.75);
|
||||
// border-radius: calc(var(--h-block)*0.75/2);
|
||||
border-radius: var(--radius-small);
|
||||
.type {
|
||||
height: calc(var(--h-block) * 0.75);
|
||||
// border-radius: calc(var(--h-block)*0.75/2);
|
||||
border-radius: var(--radius-small);
|
||||
width: max-content;
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 1ch;
|
||||
padding-top: 3px;
|
||||
|
||||
font-size: var(--fs-xsmall);
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
|
||||
background-color: var(--color-txt);
|
||||
color: var(--color-bg);
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.category {
|
||||
height: calc(var(--h-block) * 0.75);
|
||||
border-radius: var(--radius-small);
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 1ch;
|
||||
padding-top: 3px;
|
||||
|
||||
font-size: var(--fs-xsmall);
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
|
||||
border: var(--border-medium);
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-txt-light);
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.page__category {
|
||||
height: calc(var(--h-block) * 1);
|
||||
border-radius: var(--radius-small);
|
||||
border: var(--border-medium);
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 1.5ch;
|
||||
padding-top: 5px;
|
||||
|
||||
font-size: var(--fs-small);
|
||||
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-txt-light);
|
||||
font-weight: 500;
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
|
||||
@media #{$small} {
|
||||
height: calc(var(--h-block) * 0.75);
|
||||
font-size: var(--fs-xsmall);
|
||||
padding: 0 1ch;
|
||||
padding-top: 3px;
|
||||
|
||||
font-size: var(--fs-xsmall);
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
|
||||
background-color: var(--color-txt);
|
||||
color: var(--color-bg);
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.page__type {
|
||||
height: calc(var(--h-block) * 1);
|
||||
border-radius: var(--radius-small);
|
||||
margin-left: calc(var(--padding-inner) * 0.25);
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 1.5ch;
|
||||
padding-top: 5px;
|
||||
|
||||
.category{
|
||||
height: calc(var(--h-block)*0.75);
|
||||
border-radius: var(--radius-small);
|
||||
font-size: var(--fs-small);
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: var(--color-txt);
|
||||
color: var(--color-bg);
|
||||
font-weight: 500;
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
|
||||
@media #{$small} {
|
||||
height: calc(var(--h-block) * 0.75);
|
||||
font-size: var(--fs-xsmall);
|
||||
padding: 0 1ch;
|
||||
padding-top: 3px;
|
||||
|
||||
font-size: var(--fs-xsmall);
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
|
||||
border: var(--border-medium);
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-txt-light);
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.page__category{
|
||||
|
||||
height: calc(var(--h-block)*1);
|
||||
border-radius: var(--radius-small);
|
||||
border: var(--border-medium);
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 1.5ch;
|
||||
padding-top: 5px;
|
||||
|
||||
font-size: var(--fs-small);
|
||||
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-txt-light);
|
||||
font-weight: 500;
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
|
||||
@media #{$small} {
|
||||
height: calc(var(--h-block)*0.75);
|
||||
font-size: var(--fs-xsmall);
|
||||
padding: 0 1ch;
|
||||
padding-top: 3px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.page__type{
|
||||
|
||||
height: calc(var(--h-block)*1);
|
||||
border-radius: var(--radius-small);
|
||||
margin-left: calc(var(--padding-inner)*0.25);
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 1.5ch;
|
||||
padding-top: 5px;
|
||||
|
||||
font-size: var(--fs-small);
|
||||
|
||||
background-color: var(--color-txt);
|
||||
color: var(--color-bg);
|
||||
font-weight: 500;
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
|
||||
@media #{$small} {
|
||||
height: calc(var(--h-block)*0.75);
|
||||
font-size: var(--fs-xsmall);
|
||||
padding: 0 1ch;
|
||||
padding-top: 3px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue