Built site for gh-pages
This commit is contained in:
12
site_libs/bootstrap/bootstrap-6dc8c7154efc9107c56af80c20f57253.min.css
vendored
Normal file
12
site_libs/bootstrap/bootstrap-6dc8c7154efc9107c56af80c20f57253.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
site_libs/bootstrap/bootstrap.min.css
vendored
12
site_libs/bootstrap/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -202,4 +202,4 @@ code span.kw {
|
||||
content: "</";
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=debc5d5d77c3f9108843748ff7464032.css.map */
|
||||
/*# sourceMappingURL=e90e9ab646ea9b1aaa61e089606e0f97.css.map */
|
||||
@@ -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) {
|
||||
|
||||
2
site_libs/quarto-listing/list.min.js
vendored
2
site_libs/quarto-listing/list.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user