Add resource-tiles shortcode
Displays a page's file resources as a responsive grid of cards with a thumbnail (explicit param, name-matched image, or a generic file icon), title, size and download link. Meant for a downloads page offering a handful of PDFs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,3 +87,36 @@ h1, h2, h3, h4, h5 {
|
||||
margin-top: -3rem;
|
||||
}
|
||||
|
||||
// Resource tiles (see the `resource-tiles` shortcode): a grid of cards,
|
||||
// one per downloadable file, each with a thumbnail or a generic file
|
||||
// icon on top.
|
||||
.resource-tile {
|
||||
&__thumb,
|
||||
&__icon {
|
||||
aspect-ratio: 3 / 2;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
background-color: var(--bs-light);
|
||||
}
|
||||
|
||||
&__icon {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--bs-primary);
|
||||
}
|
||||
|
||||
&__ext {
|
||||
position: absolute;
|
||||
bottom: 0.9rem;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user