feat: impact-media page type with OG scraping and cache
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:
isUnknown 2026-02-27 17:31:00 +01:00
parent b8352c81fa
commit f757906584
11 changed files with 505 additions and 452 deletions

View file

@ -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;
}
}