mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
feat: image rendering, link preview CSS, lightbox swipe, URL linkification (v2.8.0)
- Gallery photos: 220px → 280px height, 180px on mobile (≤480px) - Link preview cards: full CSS for horizontal card layout (text left, image right) - Lightbox: touch/swipe support for mobile (50px threshold) - URL linkification: bare URLs in content auto-wrapped in <a> tags before AP delivery Confab-Link: http://localhost:8080/sessions/c5b1471e-b046-44d9-b94f-ab5e68fae7cc
This commit is contained in:
@@ -528,12 +528,18 @@
|
||||
.ap-card__gallery img {
|
||||
background: var(--color-offset-variant);
|
||||
display: block;
|
||||
height: 220px;
|
||||
height: 280px;
|
||||
object-fit: cover;
|
||||
width: 100%;
|
||||
transition: filter 0.2s ease;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.ap-card__gallery img {
|
||||
height: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
.ap-card__gallery-link:hover img {
|
||||
filter: brightness(0.92);
|
||||
}
|
||||
@@ -668,6 +674,83 @@
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Link Preview Card
|
||||
========================================================================== */
|
||||
|
||||
.ap-link-previews {
|
||||
margin-bottom: var(--space-s);
|
||||
}
|
||||
|
||||
.ap-link-preview {
|
||||
display: flex;
|
||||
border: var(--border-width-thin) solid var(--color-outline);
|
||||
border-radius: var(--border-radius-small);
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.ap-link-preview:hover {
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.ap-link-preview__text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: var(--space-s) var(--space-m);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 0.2em;
|
||||
}
|
||||
|
||||
.ap-link-preview__title {
|
||||
font-weight: var(--font-weight-bold);
|
||||
font-size: var(--font-size-s);
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ap-link-preview__desc {
|
||||
font-size: var(--font-size-s);
|
||||
color: var(--color-on-offset);
|
||||
margin: 0;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ap-link-preview__domain {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-on-offset);
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.3em;
|
||||
}
|
||||
|
||||
.ap-link-preview__favicon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.ap-link-preview__image {
|
||||
flex-shrink: 0;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.ap-link-preview__image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Video Embed
|
||||
========================================================================== */
|
||||
|
||||
Reference in New Issue
Block a user