diff --git a/src/resources/projects/website/listing/_filter.ejs.md b/src/resources/projects/website/listing/_filter.ejs.md index c72ec41fad..5dc37fa3b0 100644 --- a/src/resources/projects/website/listing/_filter.ejs.md +++ b/src/resources/projects/website/listing/_filter.ejs.md @@ -10,32 +10,29 @@ const sortUi = listing['sort-ui']; <% const sortableFields = listing.utilities.sortableFieldData(); %> <% if (sortUi && sortableFields.length > 0) { %>
- - " + aria-label="<%- listing.utilities.localizedString("listing-page-order-by") %>" onChange="window['quarto-listings']['listing-<%- listing.id %>'].sort(this.options[this.selectedIndex].value, { order: this.options[this.selectedIndex].getAttribute('data-direction')})" > - - - <% for (const sortData of sortableFields) { %> - - <% } %> - + + + <% for (const sortData of sortableFields) { %> + + <% } %> +
- - <% } %> - <% if (filterUi) { %>
- " /> + " />
<% } %> diff --git a/src/resources/projects/website/listing/_metadata.ejs.md b/src/resources/projects/website/listing/_metadata.ejs.md index 45d19c4a7e..7c26782f35 100644 --- a/src/resources/projects/website/listing/_metadata.ejs.md +++ b/src/resources/projects/website/listing/_metadata.ejs.md @@ -2,7 +2,9 @@ const categories = item.categories !== undefined ? item.categories.join(',') : undefined; %> +```{=html}
<% if (categories !== undefined) { %><% } %>
+``` diff --git a/src/resources/projects/website/listing/_pagination.ejs.md b/src/resources/projects/website/listing/_pagination.ejs.md index 046b3f0818..5ec6d25200 100644 --- a/src/resources/projects/website/listing/_pagination.ejs.md +++ b/src/resources/projects/website/listing/_pagination.ejs.md @@ -1,8 +1,10 @@ -
<%- listing.utilities.localizedString("listing-page-no-matches")%>
-<% if (listing["page-size"] < items.length) { %> ```{=html} +
+<%- listing.utilities.localizedString("listing-page-no-matches") %> +
+<% if (listing["page-size"] < items.length) { %> -``` <% } %> +``` diff --git a/src/resources/projects/website/listing/item-default.ejs.md b/src/resources/projects/website/listing/item-default.ejs.md index edaebc664f..a433061c83 100644 --- a/src/resources/projects/website/listing/item-default.ejs.md +++ b/src/resources/projects/website/listing/item-default.ejs.md @@ -31,44 +31,64 @@ return value; let value = readField(item, field); if (value !== undefined) { -print(`
${listing.utilities.outputLink(item, field, value)}
`); +print(`
${listing.utilities.outputLink(item, field, value)}
`); } } %> -
> +::: {.quarto-post .image-<%= imageAlign %> <%= listing.utilities.metadataAttrs(item) %>} + <% if (fields.includes('image')) { %> -
- +` +`
`{=html} <% } %> -
+ +::: {.body} + <% if (fields.includes('title')) { %> -

<%= item.title %>

- +`

`{=html} <%= item.title %> `

`{=html} +<% if (fields.includes('subtitle')) { %> +``{=html} +<% } %> <% } %> -<% if (fields.includes('categories') && item.categories) { %> -
+ +<% if (fields.includes('categories') && item.categories) { %> +`
`{=html} <% for (const category of item.categories) { %> -
<%= category %>
+`
`{=html} <%= category %> `
`{=html} +<% } %> +`
`{=html} <% } %> -
-<% } %> + <% if (fields.includes('description')) { %> - +``{=html} +<% } %> + +::: + +::: {.metadata} +``{=html} +<% if (fields.includes('date') && item.date) { %> +`
`{=html} <%= item.date %> `
`{=html} +<% } %> + +<% if (fields.includes('author') && item.author) { %> +`
`{=html} <%= item.author %> `
`{=html} <% } %> -
-
-<% if (fields.includes('date') && item.date) { %>
<%= item.date %>
<% } %> -<% if (fields.includes('author') && item.author) { %>
<%= item.author %>
<% } %> -<% if (fields.includes('reading-time') && item['reading-time']) { %>
<%= item['reading-time'] %>
<% } %> + +<% if (fields.includes('reading-time') && item['reading-time']) { %> +`
`{=html} <%= item['reading-time'] %> `
`{=html} +<% } %> + <% for (const field of otherFields) { %> -<% outputMetadata(item, field) %><% } %>
+<% outputMetadata(item, field) %> +<% } %> +``{=html} +::: -
+::: diff --git a/src/resources/projects/website/listing/item-grid.ejs.md b/src/resources/projects/website/listing/item-grid.ejs.md index a584349734..8c49b15150 100644 --- a/src/resources/projects/website/listing/item-grid.ejs.md +++ b/src/resources/projects/website/listing/item-grid.ejs.md @@ -37,17 +37,18 @@ return !["title", "image", "image-alt", "date", "author", "subtitle", "descripti }); %> -
> +::: {.g-col-1 <%= listing.utilities.metadataAttrs(item) %> } + +```{=html} -
+
+``` <% if (fields.includes('image')) { %> - <% if (item.image) { %> - -

+`

`{=html} <%= listing.utilities.img(itemNumber, item.image, "thumbnail-image card-img", item['image-alt'], item['image-lazy-loading'] ?? listing['image-lazy-loading']) %> -

+`

`{=html} <% } else { %> <%= listing.utilities.imgPlaceholder(listing.id, itemNumber, item.outputHref) %> <% } %> @@ -55,65 +56,82 @@ return !["title", "image", "image-alt", "date", "author", "subtitle", "descripti <% } %> <% if (showField('title') || showField('subtitle') || showField('description') || showField('author') || showField('date') || otherFields.length > 0) { %> -
-<% if (showField('title')) { %>
<%= item.title %>
<% } %> -<% if (showField('subtitle')) { %>
<%= item.subtitle %>
<% } %> -<% if (showField('reading-time')) { %>
<%= item['reading-time'] %>
<% } %> +`
`{=html} + +<% if (showField('title')) { %> +`
`{=html} <%= item.title %> `
`{=html} +<% } %> + +<% if (showField('subtitle')) { %> +`
`{=html} <%= item.subtitle %> `
`{=html} +<% } %> + +<% if (showField('reading-time')) { %> +`
`{=html} <%= item['reading-time'] %> `
`{=html} +<% } %> <% if (fields.includes('categories') && item.categories) { %> +`
`{=html} -
- <% for (const category of item.categories) { %> -
<%= category %>
- <% } %> -
+<% for (const category of item.categories) { %> +`
`{=html} <%= category %> `
`{=html} +<% } %> +`
`{=html} <% } %> -<% if (showField('description')) { %> - +<% if (showField('description')) { %> +``{=html} <% } %> -<% + +<% const flexJustify = showField('author') && showField('date') ? "justify" : showField('author') ? "start" : "end"; %> + <% if (showField('author') || showField('date')) { %> -
-<% if (showField('author')) { %>
<%= item.author %>
<% } %> -<% if (showField('date')) { %>
<%= item.date %>
<% } %> -
+`
`{=html} + +<% if (showField('author')) { %> +`
`{=html} <%= item.author %> `
`{=html} <% } %> -<% if (otherFields.length > 0) { %> +<% if (showField('date')) { %> +`
`{=html} <%= item.date %> `
`{=html} +<% } %> - -<% for (const field of otherFields) { -let value = readField(item, field); -%> - - - - +``{=html} <% } %> -
<%= listing.utilities.fieldName(field) %><%= listing.utilities.outputLink(item, field, value) %>
+<% if (otherFields.length > 0) { %> +``{=html} +<% for (const field of otherFields) { +let value = readField(item, field); +%> +``{=html} +``{=html} +``{=html} +``{=html} +<% } %> +`
`{=html} <%= listing.utilities.fieldName(field) %> ``{=html} <%= listing.utilities.outputLink(item, field, value) %> `
`{=html} <% } %> -
+`
`{=html} <% } %> <% if (fields.includes('filename') || fields.includes('file-modified')) { %> -`{=html} <% } %> -
+`
`{=html} + +::: diff --git a/src/resources/projects/website/listing/listing-default.ejs.md b/src/resources/projects/website/listing/listing-default.ejs.md index c95f18c77d..4ffe8c2213 100644 --- a/src/resources/projects/website/listing/listing-default.ejs.md +++ b/src/resources/projects/website/listing/listing-default.ejs.md @@ -1,7 +1,7 @@ -:::{.list .quarto-listing-default} -``````{=html} +::: {.list .quarto-listing-default} + <% for (const item of items) { %> <% partial('item-default.ejs.md', {listing, item, utils }) %> <% } %> -`````` + ::: diff --git a/src/resources/projects/website/listing/listing-grid.ejs.md b/src/resources/projects/website/listing/listing-grid.ejs.md index f049b94bb3..19d7382972 100644 --- a/src/resources/projects/website/listing/listing-grid.ejs.md +++ b/src/resources/projects/website/listing/listing-grid.ejs.md @@ -2,10 +2,10 @@ const cols = listing['grid-columns']; %> -:::{.list .grid .quarto-listing-cols-<%=cols%>} -```{=html} +::: {.list .grid .quarto-listing-cols-<%= cols %>} + <% for (const item of items) { %> <% partial('item-grid.ejs.md', {listing, item, utils }) %> <% } %> -``` + ::: diff --git a/src/resources/projects/website/listing/listing-table.ejs.md b/src/resources/projects/website/listing/listing-table.ejs.md index 864a26f70f..a5d78321ac 100644 --- a/src/resources/projects/website/listing/listing-table.ejs.md +++ b/src/resources/projects/website/listing/listing-table.ejs.md @@ -84,11 +84,13 @@ return listing.utilities.outputLink(item, field, value, `listing-${field}`); <%= onclick(item) %>> <% for (const field of fields){ %> +``` <%= outputValue(itemNumber, field) %> +```{=html} <% } %> <% } %> -``` \ No newline at end of file +```