Changeset d9ad6c5 in Klonkt for src/assets
- Timestamp:
- 07/28/2026 06:17:36 PM (6 weeks ago)
- Branches:
- main
- Children:
- a7bcf66
- Parents:
- 2708282
- Location:
- src/assets
- Files:
-
- 2 edited
-
css/guardian.css (modified) (1 diff)
-
js/guardian.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/css/guardian.css
r2708282 rd9ad6c5 88 88 .g-card.feed .feed-body { margin-top: 6px; line-height: 1.4; } 89 89 .g-card.feed .feed-body img { max-width: 100%; border-radius: 8px; } 90 91 /* ââ The body of a post ââââââââââââââââââââââââââââââââââââââââââââââââââââ 92 The đ card shows a real post, so it is rendered by the same partial de 93 Krant and Berichten use (partials/note-body). These are that partial's 94 classes, in the PWA's own colours: the dashboard is standalone and does not 95 load the site's stylesheet. */ 96 .g-note .tl-content { line-height: 1.5; overflow-wrap: anywhere; } 97 .g-note .tl-content p { margin: .35rem 0; } 98 .g-note .tl-content p:first-child { margin-top: 0; } 99 .g-note .tl-content p:last-child { margin-bottom: 0; } 100 .g-note .tl-content a { color: var(--accent); } 101 .g-note img.emoji { height: 1.25em; width: auto; margin: 0 .05em; vertical-align: -.2em; 102 display: inline-block; border-radius: 0; background: none; } 103 104 /* Quote card and link preview: one card, two origins. */ 105 .g-note .tl-quote { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; 106 border: 1px solid var(--line); background: var(--card-2, rgba(128,128,128,.07)); } 107 .g-note .tl-quote-head { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; min-width: 0; } 108 .g-note .tl-quote-avatar { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; } 109 .g-note .tl-quote-name { font-weight: 600; font-size: .82rem; white-space: nowrap; } 110 .g-note .tl-quote-handle { color: var(--sub); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } 111 .g-note .tl-quote-body { color: var(--sub); font-size: .88rem; line-height: 1.45; max-height: 14em; overflow: hidden; } 112 .g-note .tl-quote-media { display: block; margin: 6px 0 0; } 113 114 /* The capture a đ usually carries. */ 115 .g-note .tl-media { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; } 116 .g-note .tl-media-img { display: block; border-radius: 10px; overflow: hidden; } 117 .g-note .tl-media-img img { width: 100%; height: auto; display: block; background: #fff; } 118 .g-note .tl-media-video, .g-note .tl-media-audio { width: 100%; margin: 8px 0 0; border-radius: 10px; display: block; } 119 .g-note .tl-media-video { max-height: 320px; background: #000; } -
src/assets/js/guardian.js
r2708282 rd9ad6c5 43 43 var card = el('div', 'g-card help'); 44 44 var row = el('div', 'row'); 45 row.appendChild(el('span', 'who grow', h.actor_name || handleOf(h.actor_uri, h.actor_handle))); 45 var who = el('span', 'who grow'); 46 // name_html carries the custom emojis (FEP-9098) of the display name, the 47 // same way de Krant renders a byline. Falls back to the plain name. 48 if (h.name_html) who.innerHTML = h.name_html; 49 else who.textContent = h.actor_name || handleOf(h.actor_uri, h.actor_handle); 50 row.appendChild(who); 46 51 row.appendChild(el('span', 'when', when(h.published || h.created_at))); 47 52 card.appendChild(row); 48 var body = el('div', 'body'); 49 body.innerHTML = h.content || ''; // sanitized server-side on ingest 53 var body = el('div', 'body g-note'); 54 // body_html is the shared note-body partial, rendered server-side: the 55 // content with its emojis, the quote / link-preview card and the media. 56 // Falls back to the bare content for rows stored before that existed. 57 body.innerHTML = h.body_html || h.content || ''; // sanitized server-side on ingest 50 58 card.appendChild(body); 51 59 if (h.note_url) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)