Changeset 43dbf9c in Klonkt for src/views/partials/post-card.ejs
- Timestamp:
- 06/16/2026 01:52:09 AM (3 months ago)
- Branches:
- main
- Children:
- 9f81a09
- Parents:
- aa7f548
- File:
-
- 1 edited
-
src/views/partials/post-card.ejs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/post-card.ejs
raa7f548 r43dbf9c 12 12 13 13 const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; 14 const _href = _base + '/' + post.slug; 14 const _external = post.external_url || null; 15 const _href = _external || (_base + '/' + post.slug); 16 const _ext = !!_external; 17 const _src = post.source_name || ''; 15 18 const _hasCover = !!post.cover_image_url; 16 19 const _typeLabel = (post.type && post.type !== 'overig' && post.type !== 'post') ? post.type : ''; … … 43 46 <% if (_hasCover) { %> 44 47 <a class="post-list-cover" href="<%= _href %>" 45 hx-get="<%= _href %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" 46 hx-push-url="<%= _href %>" hx-indicator="#pcms-loading" 48 <% if (_ext) { %>target="_blank" rel="noopener"<% } else { %>hx-get="<%= _href %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="<%= _href %>" hx-indicator="#pcms-loading"<% } %> 47 49 aria-label="<%= post.title || '(zonder titel)' %>" tabindex="-1"> 48 50 <img src="<%= post.cover_image_url %>" alt="" loading="lazy" decoding="async"> … … 54 56 <% if (_isPinned) { %><span class="post-list-pin" aria-label="Vastgepind">★</span><% } %> 55 57 <time datetime="<%= post.published_at || post.created_at %>"><%= _ddmmyyyy(post.published_at || post.created_at) %></time> 58 <% if (_src) { %><span class="post-list-type">· via <%= _src %></span><% } %> 56 59 <% if (_typeLabel) { %> 57 60 <span class="post-list-type">· <%= _typeLabel.charAt(0).toUpperCase() + _typeLabel.slice(1) %></span> … … 64 67 <h3 class="post-list-title"> 65 68 <a href="<%= _href %>" 66 hx-get="<%= _href %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" 67 hx-push-url="<%= _href %>" hx-indicator="#pcms-loading"> 69 <% if (_ext) { %>target="_blank" rel="noopener"<% } else { %>hx-get="<%= _href %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="<%= _href %>" hx-indicator="#pcms-loading"<% } %>> 68 70 <%= post.title || '(zonder titel)' %> 69 71 </a>
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)