@@ -45,93 +45,139 @@ return !["title", "image", "image-alt", "date", "author", "subtitle", "descripti
4545```
4646
4747<% if (fields.includes('image')) { %>
48+
4849<% if (item.image) { %>
49- ` <p class="card-img-top"> ` {=html}
50+
51+ ``` {=html}
52+ <p class="card-img-top">
5053<%= listing.utilities.img(itemNumber, item.image, "thumbnail-image card-img", item['image-alt'], item['image-lazy-loading'] ?? listing['image-lazy-loading']) %>
51- ` </p> ` {=html}
54+ </p>
55+ ```
56+
5257<% } else { %>
58+
59+ ``` {=html}
5360<%= listing.utilities.imgPlaceholder(listing.id, itemNumber, item.outputHref) %>
54- <% } %>
61+ ```
5562
5663<% } %>
64+ <% } %>
65+
5766<% if (showField('title') || showField('subtitle') || showField('description') || showField('author') || showField('date') || otherFields.length > 0) { %>
5867
59- ` <div class=" card-body post-contents"> ` {=html }
68+ ::: {. card-body . post-contents}
6069
6170<% if (showField('title')) { %>
62- ` <h5 class="no-anchor card-title listing-title"> ` {=html} <%= item.title %> ` </h5> ` {=html}
71+ <h5 class =" no-anchor card-title listing-title " ><%= item.title %></h5 >
6372<% } %>
6473
6574<% if (showField('subtitle')) { %>
66- ` <div class="card-subtitle listing-subtitle"> ` {=html} <%= item.subtitle %> ` </div> ` {=html}
75+ <div class =" card-subtitle listing-subtitle " ><%= item.subtitle %></div >
6776<% } %>
6877
6978<% if (showField('reading-time')) { %>
70- ` <div class="listing-reading-time card-text text-muted"> ` {=html} <%= item[ 'reading-time'] %> ` </div> ` {=html}
79+
80+ ``` {=html}
81+ <div class="listing-reading-time card-text text-muted"><%= item['reading-time'] %></div>
82+ ```
83+
7184<% } %>
7285
7386<% if (fields.includes('categories') && item.categories) { %>
74- ` <div class="listing-categories"> ` {=html}
7587
88+ ``` {=html}
89+ <div class="listing-categories">
7690<% for (const category of item.categories) { %>
77- ` <div class="listing-category" onclick="window.quartoListingCategory('<%- utils.b64encode(category ) %>'); return false;"> ` {=html} <%= category %> ` </div> ` {=html}
91+ <div class="listing-category" onclick="window.quartoListingCategory('<%- utils.b64encode(category ) %>'); return false;"><%= category %></div>
7892<% } %>
93+ </div>
94+ ```
7995
80- ` </div> ` {=html}
8196<% } %>
8297
8398<% if (showField('description')) { %>
84- ` <div class="card-text listing-description delink"> ` {=html} <%= item.description %> ` </div> ` {=html}
99+
100+ ``` {=html}
101+ <div class="card-text listing-description delink">
102+ ```
103+
104+ <%= item.description %>
105+
106+ ``` {=html}
107+ </div>
108+ ```
109+
85110<% } %>
86111
87112<%
88113const flexJustify = showField('author') && showField('date') ? "justify" : showField('author') ? "start" : "end";
89114%>
90115
91116<% if (showField('author') || showField('date')) { %>
92- ` <div class="card-attribution card-text-small <%- flexJustify %>"> ` {=html}
117+
118+ ``` {=html}
119+ <div class="card-attribution card-text-small <%- flexJustify %>">
120+ ```
93121
94122<% if (showField('author')) { %>
95- ` <div class="listing-author"> ` {=html} <%= item.author %> ` </div> ` {=html}
123+ <div class =" listing-author " ><%= item.author %></div >
96124<% } %>
97125
98126<% if (showField('date')) { %>
99- ` <div class="listing-date"> ` {=html} <%= item.date %> ` </div> ` {=html}
127+ <div class =" listing-date " ><%= item.date %></div >
100128<% } %>
101129
102- ` </div> ` {=html}
130+ ``` {=html}
131+ </div>
132+ ```
133+
103134<% } %>
104135
105136<% if (otherFields.length > 0) { %>
106- ` <table class="card-other-values"> ` {=html}
137+
138+ ``` {=html}
139+ <table class="card-other-values">
107140<% for (const field of otherFields) {
108141let value = readField(item, field);
109142%>
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}
143+ <tr>
144+ <td><%= listing.utilities.fieldName(field) %></td>
145+ <td class="<%- field %>"><%= listing.utilities.outputLink(item, field, value) %></td>
146+ </tr>
114147<% } %>
115- ` </table> ` {=html}
148+ </table>
149+ ```
150+
116151<% } %>
117152
118- ` </div> ` {=html}
153+ :::
119154<% } %>
120155
121156<% if (fields.includes('filename') || fields.includes('file-modified')) { %>
122157
123- ` <div class=" card-footer"> ` {=html }
158+ ::: {. card-footer}
124159
125160<% if (fields.includes('filename')) { %>
126- ` <div class="card-filename listing-filename"> ` {=html} <%= item.filename ? item.filename : "  ; " %> ` </div> ` {=html}
161+
162+ ``` {=html}
163+ <div class="card-filename listing-filename"><%= item.filename ? item.filename : " " %></div>
164+ ```
165+
127166<% } %>
128167
129168<% if (fields.includes('file-modified')) { %>
130- ` <div class="card-file-modified listing-file-modified"> ` {=html} <%= item[ 'file-modified'] ? item[ 'file-modified'] : "  ; " %> ` </div> ` {=html}
169+
170+ ``` {=html}
171+ <div class="card-file-modified listing-file-modified"><%= item['file-modified'] ? item['file-modified'] : " " %></div>
172+ ```
173+
131174<% } %>
132175
133- ` </div> ` {=html}
176+ :::
134177<% } %>
135- ` </div></a> ` {=html}
178+
179+ ``` {=html}
180+ </div></a>
181+ ```
136182
137183:::
0 commit comments