The blog was reachable only from a link in the footer, which is to say hardly at all. Once there is a post: - "Blog" joins the header menu, on desktop and in the mobile menu, on every page. - The landing shows the three latest posts under "Novedades", with a link to the rest. The post card moves into its own component, post-card, shared by the blog (image beside the text) and the landing (image above). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
78 lines
1.5 KiB
SCSS
78 lines
1.5 KiB
SCSS
:host {
|
|
display: block;
|
|
height: 100%;
|
|
}
|
|
|
|
.post-card {
|
|
display: grid;
|
|
grid-template-rows: auto 1fr;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
border-radius: var(--pi-theme-card-radius, 1.5rem);
|
|
box-shadow: var(--pi-theme-card-shadow, none);
|
|
}
|
|
|
|
// Beside the text rather than above it, and only when there is an image:
|
|
// without one the text would sit in the image's column with the rest empty.
|
|
:host(.post-card--row) .post-card--media {
|
|
@media (min-width: 768px) {
|
|
grid-template-rows: none;
|
|
grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
|
|
}
|
|
}
|
|
|
|
// The `<img>` belongs to `app-api-image`, so a scoped rule cannot reach it.
|
|
.post-card__media ::ng-deep img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
aspect-ratio: 16 / 10;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.post-card__body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
padding: 1.5rem 1.75rem;
|
|
}
|
|
|
|
.post-card__date {
|
|
font-size: 0.8125rem;
|
|
color: color-mix(in srgb, currentColor 68%, transparent);
|
|
}
|
|
|
|
.post-card__title {
|
|
margin: 0;
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
line-height: 1.25;
|
|
|
|
:host(.post-card--row) & {
|
|
font-size: 1.375rem;
|
|
}
|
|
|
|
a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
|
|
&:hover {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
}
|
|
|
|
.post-card__excerpt {
|
|
margin: 0;
|
|
line-height: 1.6;
|
|
color: color-mix(in srgb, currentColor 68%, transparent);
|
|
}
|
|
|
|
.post-card__more {
|
|
margin-top: auto;
|
|
padding-top: 0.5rem;
|
|
color: var(--pi-color-primary);
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
}
|