Changeset 7963a6e in Klonkt
- Timestamp:
- 06/14/2026 05:13:12 PM (3 months ago)
- Branches:
- main
- Children:
- b94c08e
- Parents:
- 0c2228a
- Location:
- src/views/partials
- Files:
-
- 2 edited
-
post-card.ejs (modified) (2 diffs)
-
post-tile.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/post-card.ejs
r0c2228a r7963a6e 11 11 // Hover state on cover. Tap-target stays large. 12 12 13 const _href = '/' + post.slug; 13 const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; 14 const _href = _base + '/' + post.slug; 14 15 const _hasCover = !!post.cover_image_url; 15 16 const _typeLabel = (post.type && post.type !== 'overig' && post.type !== 'post') ? post.type : ''; … … 76 77 <div class="post-list-tags"> 77 78 <% _tags.forEach(function(t) { %> 78 <a href=" /tag/<%= encodeURIComponent(t) %>" class="tag-chip"79 hx-get=" /tag/<%= encodeURIComponent(t) %>?partial=1" hx-target="#pcms-main"80 hx-swap="innerHTML" hx-push-url=" /tag/<%= encodeURIComponent(t) %>"79 <a href="<%= _base %>/tag/<%= encodeURIComponent(t) %>" class="tag-chip" 80 hx-get="<%= _base %>/tag/<%= encodeURIComponent(t) %>?partial=1" hx-target="#pcms-main" 81 hx-swap="innerHTML" hx-push-url="<%= _base %>/tag/<%= encodeURIComponent(t) %>" 81 82 hx-indicator="#pcms-loading">#<%= t %></a> 82 83 <% }); %> -
src/views/partials/post-tile.ejs
r0c2228a r7963a6e 7 7 const _hasCover = !!post.cover_image_url; 8 8 const _typeLabel = (post.type && post.type !== 'post') ? post.type : ''; 9 const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; 10 const _href = _base + '/' + post.slug; 9 11 %> 10 12 <a class="grid-tile<%= _hasCover ? '' : ' grid-tile-gradient' %><%= _isPinned ? ' is-pinned' : '' %>" 11 href=" /<%= post.slug%>"13 href="<%= _href %>" 12 14 <% if (_hasCover) { %>style="background-image: url('<%= post.cover_image_url %>'); --tile-hue: <%= _tileHue %>;"<% } else { %>style="--tile-hue: <%= _tileHue %>;"<% } %> 13 hx-get=" /<%= post.slug%>?partial=1"15 hx-get="<%= _href %>?partial=1" 14 16 hx-target="#pcms-main" 15 17 hx-swap="innerHTML" 16 hx-push-url=" /<%= post.slug%>"18 hx-push-url="<%= _href %>" 17 19 hx-indicator="#pcms-loading"> 18 20
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)