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,74 +1,74 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
box-sizing: border-box;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-font-smoothing: antialiased;
|
||||
-o-font-smoothing: antialiased;
|
||||
box-sizing: border-box;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-font-smoothing: antialiased;
|
||||
-o-font-smoothing: antialiased;
|
||||
|
||||
scroll-behavior: smooth;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
a {
|
||||
color: currentColor;
|
||||
color: currentColor;
|
||||
}
|
||||
button{
|
||||
background: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
color: var(--color-txt);
|
||||
button {
|
||||
background: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
color: var(--color-txt);
|
||||
}
|
||||
iframe{
|
||||
border: none;
|
||||
iframe {
|
||||
border: none;
|
||||
}
|
||||
|
||||
body{
|
||||
font-family: var(--font);
|
||||
line-height: var(--leading-normal);
|
||||
font-size: var(--fs-normal);
|
||||
body {
|
||||
font-family: var(--font);
|
||||
line-height: var(--leading-normal);
|
||||
font-size: var(--fs-normal);
|
||||
|
||||
color: var(--color-txt);
|
||||
background-color: var(--color-bg);
|
||||
|
||||
|
||||
color: var(--color-txt);
|
||||
background-color: var(--color-bg);
|
||||
}
|
||||
|
||||
img{
|
||||
max-width: 100%;
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.link-block{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
// &:hover{
|
||||
// background-color: rgba(255, 0, 0, 0.244);
|
||||
// }
|
||||
.link-block {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
// &:hover{
|
||||
// background-color: rgba(255, 0, 0, 0.244);
|
||||
// }
|
||||
}
|
||||
|
||||
.swiper-button-next, .swiper-button-prev,
|
||||
body, #site-header, #site-footer{
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
.swiper-button-next,
|
||||
.swiper-button-prev,
|
||||
body,
|
||||
#site-header,
|
||||
#site-footer {
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
}
|
||||
|
||||
@mixin grid-content(){
|
||||
display: grid;
|
||||
grid-gap: var(--padding-inner);
|
||||
grid-template-columns: 2fr 3fr;
|
||||
position: relative;
|
||||
@mixin grid-content() {
|
||||
display: grid;
|
||||
grid-gap: var(--padding-inner);
|
||||
grid-template-columns: 2fr 3fr;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
@mixin hide-scroll(){
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
&::-webkit-scrollbar {
|
||||
@mixin hide-scroll() {
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin clamp($lines) {
|
||||
|
|
@ -78,67 +78,60 @@ body, #site-header, #site-footer{
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
@mixin hover-card-line(){
|
||||
border-bottom: var(--border-light);
|
||||
&:first-of-type{
|
||||
border-top: var(--border-light);
|
||||
}
|
||||
position: relative;
|
||||
&::before{
|
||||
content: '';
|
||||
width: 100%;
|
||||
border-top: 1px solid transparent;
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
left: 0;
|
||||
}
|
||||
@mixin hover-card-line() {
|
||||
border-bottom: var(--border-light);
|
||||
&:first-of-type {
|
||||
border-top: var(--border-light);
|
||||
}
|
||||
position: relative;
|
||||
&::before {
|
||||
content: "";
|
||||
width: 100%;
|
||||
border-top: 1px solid transparent;
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&:hover{
|
||||
background-color: var(--grey-950);
|
||||
&:not([data-impact-type="media"]) {
|
||||
&:hover {
|
||||
background-color: var(--grey-950);
|
||||
border-color: var(--color-txt);
|
||||
&::before {
|
||||
border-color: var(--color-txt);
|
||||
&::before{
|
||||
border-color: var(--color-txt);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@mixin pin(){
|
||||
.pin{
|
||||
z-index: 90;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
transform: rotate(45deg);
|
||||
transform-origin: center;
|
||||
svg{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
fill: var(--color-txt);
|
||||
}
|
||||
@mixin pin() {
|
||||
.pin {
|
||||
z-index: 90;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
transform: rotate(45deg);
|
||||
transform-origin: center;
|
||||
svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
fill: var(--color-txt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@mixin icon($size){
|
||||
|
||||
.icon{
|
||||
display: flex;
|
||||
width: $size;
|
||||
height: $size;
|
||||
svg{
|
||||
width: $size;
|
||||
height: $size;
|
||||
}
|
||||
@mixin icon($size) {
|
||||
.icon {
|
||||
display: flex;
|
||||
width: $size;
|
||||
height: $size;
|
||||
svg {
|
||||
width: $size;
|
||||
height: $size;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
body.menu-open,
|
||||
body.is-hidden{
|
||||
overflow-y: hidden;
|
||||
body.is-hidden {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue