Built site for gh-pages

This commit is contained in:
Quarto GHA Workflow Runner
2024-11-30 01:38:42 +00:00
parent 05ea741e04
commit e060877a9c
35 changed files with 151 additions and 219 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -202,4 +202,4 @@ code span.kw {
content: "</";
}
/*# sourceMappingURL=debc5d5d77c3f9108843748ff7464032.css.map */
/*# sourceMappingURL=e90e9ab646ea9b1aaa61e089606e0f97.css.map */

View File

@@ -225,7 +225,10 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
}
async function findAndActivateCategories() {
const currentPagePath = offsetAbsoluteUrl(window.location.href);
// Categories search with listing only use path without query
const currentPagePath = offsetAbsoluteUrl(
window.location.origin + window.location.pathname
);
const response = await fetch(offsetRelativeUrl("listings.json"));
if (response.status == 200) {
return response.json().then(function (listingPaths) {

File diff suppressed because one or more lines are too long

View File

@@ -2,6 +2,7 @@ const kProgressiveAttr = "data-src";
let categoriesLoaded = false;
window.quartoListingCategory = (category) => {
category = atob(category);
if (categoriesLoaded) {
activateCategory(category);
setCategoryHash(category);
@@ -15,7 +16,9 @@ window["quarto-listing-loaded"] = () => {
if (hash) {
// If there is a category, switch to that
if (hash.category) {
activateCategory(hash.category);
// category hash are URI encoded so we need to decode it before processing
// so that we can match it with the category element processed in JS
activateCategory(decodeURIComponent(hash.category));
}
// Paginate a specific listing
const listingIds = Object.keys(window["quarto-listings"]);
@@ -58,7 +61,10 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
);
for (const categoryEl of categoryEls) {
const category = categoryEl.getAttribute("data-category");
// category needs to support non ASCII characters
const category = decodeURIComponent(
atob(categoryEl.getAttribute("data-category"))
);
categoryEl.onclick = () => {
activateCategory(category);
setCategoryHash(category);
@@ -208,7 +214,9 @@ function activateCategory(category) {
// Activate this category
const categoryEl = window.document.querySelector(
`.quarto-listing-category .category[data-category='${category}'`
`.quarto-listing-category .category[data-category='${btoa(
encodeURIComponent(category)
)}']`
);
if (categoryEl) {
categoryEl.classList.add("active");
@@ -231,7 +239,9 @@ function filterListingCategory(category) {
list.filter(function (item) {
const itemValues = item.values();
if (itemValues.categories !== null) {
const categories = itemValues.categories.split(",");
const categories = decodeURIComponent(
atob(itemValues.categories)
).split(",");
return categories.includes(category);
} else {
return false;