@@ -37,83 +37,101 @@ return !["title", "image", "image-alt", "date", "author", "subtitle", "descripti
3737});
3838%>
3939
40- <div class =" g-col-1 " <% = listing.utilities.metadataAttrs(item) % >>
40+ ::: {.g-col-1 <%= listing.utilities.metadataAttrs(item) %> }
41+
42+ ``` {=html}
4143<a href="<%- item.path %>" class="quarto-grid-link">
42- <div class =" quarto-grid-item card h-100 <%-`card-${align}`%><%= hideBorders ? ' borderless' : '' %> " >
44+ <div class="quarto-grid-item card h-100 <%- `card-${align}` %><%- hideBorders ? ' borderless' : '' %>">
45+ ```
4346
4447<% if (fields.includes('image')) { %>
45-
4648<% if (item.image) { %>
47-
48- <p class =" card-img-top " >
49+ ` <p class="card-img-top"> ` {=html}
4950<%= listing.utilities.img(itemNumber, item.image, "thumbnail-image card-img", item[ 'image-alt'] , item[ 'image-lazy-loading'] ?? listing[ 'image-lazy-loading'] ) %>
50- </p >
51+ ` </p> ` {=html}
5152<% } else { %>
5253<%= listing.utilities.imgPlaceholder(listing.id, itemNumber, item.outputHref) %>
5354<% } %>
5455
5556<% } %>
5657<% if (showField('title') || showField('subtitle') || showField('description') || showField('author') || showField('date') || otherFields.length > 0) { %>
5758
58- <div class =" card-body post-contents " >
59- <% if (showField('title')) { %><h5 class =" no-anchor card-title listing-title " ><%= item.title %></h5 ><% } %>
60- <% if (showField('subtitle')) { %><div class =" card-subtitle listing-subtitle " ><%= item.subtitle %></div ><% } %>
61- <% if (showField('reading-time')) { %><div class =" listing-reading-time card-text text-muted " ><%= item[ 'reading-time'] %></div > <% } %>
59+ ` <div class="card-body post-contents"> ` {=html}
60+
61+ <% if (showField('title')) { %>
62+ ` <h5 class="no-anchor card-title listing-title"> ` {=html} <%= item.title %> ` </h5> ` {=html}
63+ <% } %>
64+
65+ <% if (showField('subtitle')) { %>
66+ ` <div class="card-subtitle listing-subtitle"> ` {=html} <%= item.subtitle %> ` </div> ` {=html}
67+ <% } %>
68+
69+ <% if (showField('reading-time')) { %>
70+ ` <div class="listing-reading-time card-text text-muted"> ` {=html} <%= item[ 'reading-time'] %> ` </div> ` {=html}
71+ <% } %>
6272
6373<% if (fields.includes('categories') && item.categories) { %>
74+ ` <div class="listing-categories"> ` {=html}
6475
65- <div class =" listing-categories " >
66- <% for (const category of item.categories) { %>
67- <div class =" listing-category " onclick =" window .quartoListingCategory (' <%=utils.b64encode(category)%>' ); return false ;" ><%= category %></div >
68- <% } %>
69- </div >
76+ <% for (const category of item.categories) { %>
77+ ` <div class="listing-category" onclick="window.quartoListingCategory('<%- utils.b64encode(category ) %>'); return false;"> ` {=html} <%= category %> ` </div> ` {=html}
78+ <% } %>
7079
80+ ` </div> ` {=html}
7181<% } %>
72- <% if (showField('description')) { %>
7382
74- <div class =" card-text listing-description delink " ><%= item.description %></div >
83+ <% if (showField('description')) { %>
84+ ` <div class="card-text listing-description delink"> ` {=html} <%= item.description %> ` </div> ` {=html}
7585<% } %>
76- <%
86+
87+ <%
7788const flexJustify = showField('author') && showField('date') ? "justify" : showField('author') ? "start" : "end";
7889%>
90+
7991<% if (showField('author') || showField('date')) { %>
80- <div class =" card-attribution card-text-small <%-flexJustify%> " >
81- <% if (showField('author')) { %>< div class = " listing-author " ><%= item.author %></ div ><% } %>
82- <% if (showField('date ')) { %>< div class = " listing-date " ><%= item.date %></ div ><% } %>
83- < /div >
92+ ` <div class="card-attribution card-text-small <%- flexJustify %>"> ` {=html}
93+
94+ <% if (showField('author ')) { %>
95+ ` <div class="listing-author"> ` {=html} <%= item.author %> ` < /div>` {=html}
8496<% } %>
8597
86- <% if (otherFields.length > 0) { %>
98+ <% if (showField('date')) { %>
99+ ` <div class="listing-date"> ` {=html} <%= item.date %> ` </div> ` {=html}
100+ <% } %>
87101
88- <table class =" card-other-values " >
89- <% for (const field of otherFields) {
90- let value = readField(item, field);
91- %>
92- <tr >
93- <td ><%= listing.utilities.fieldName(field) %></td >
94- <td class =" <%-field%> " ><%= listing.utilities.outputLink(item, field, value) %></td >
95- </tr >
102+ ` </div> ` {=html}
96103<% } %>
97- </table >
98104
105+ <% if (otherFields.length > 0) { %>
106+ ` <table class="card-other-values"> ` {=html}
107+ <% for (const field of otherFields) {
108+ let value = readField(item, field);
109+ %>
110+ ` <tr> ` {=html}
111+ ` <td> ` {=html} <%= listing.utilities.fieldName(field) %> ` </td> ` {=html}
112+ ` <td class="<%- field %>"> ` {=html} <%= listing.utilities.outputLink(item, field, value) %> ` </td> ` {=html}
113+ ` </tr> ` {=html}
114+ <% } %>
115+ ` </table> ` {=html}
99116<% } %>
100117
101- </div >
118+ ` </div> ` {=html}
102119<% } %>
103120
104121<% if (fields.includes('filename') || fields.includes('file-modified')) { %>
105122
106- <div class =" card-footer " >
123+ ` <div class="card-footer"> ` {=html}
124+
107125<% if (fields.includes('filename')) { %>
108- <div class =" card-filename listing-filename " >
109- <%= item.filename ? item.filename : "  ; " %>
110- </div >
126+ ` <div class="card-filename listing-filename"> ` {=html} <%= item.filename ? item.filename : "  ; " %> ` </div> ` {=html}
111127<% } %>
128+
112129<% if (fields.includes('file-modified')) { %>
113- <div class =" card-file-modified listing-file-modified " >
114- <%= item[ 'file-modified'] ? item[ 'file-modified'] : "  ; "%>
115- </div >
130+ ` <div class="card-file-modified listing-file-modified"> ` {=html} <%= item[ 'file-modified'] ? item[ 'file-modified'] : "  ; " %> ` </div> ` {=html}
116131<% } %>
117- </div >
132+
133+ ` </div> ` {=html}
118134<% } %>
119- </div ></a ></div >
135+ ` </div></a> ` {=html}
136+
137+ :::
0 commit comments