From 93a803ae0e84cbccc030d9f7b327d00f1f68fee6 Mon Sep 17 00:00:00 2001 From: arnayv-47 Date: Tue, 4 Feb 2025 21:35:12 -0500 Subject: [PATCH 1/3] add manual archived functionality for resources --- _external_resources/enhancing-transparency-american-emblem.md | 2 +- assets/js/isotope.settings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_external_resources/enhancing-transparency-american-emblem.md b/_external_resources/enhancing-transparency-american-emblem.md index 5c906b7f7..27ef5931e 100644 --- a/_external_resources/enhancing-transparency-american-emblem.md +++ b/_external_resources/enhancing-transparency-american-emblem.md @@ -3,6 +3,6 @@ layout: resources-landing title: "Enhancing Transparency Through Use of the Building a Better America Emblem on Construction Signs (Superseded by CA-23-06)" subtitle: "Enhancing Transparency Through Use of the Building a Better America Emblem on Construction Signs (Superseded by CA-23-06)" doc-link: ../assets/files/Controller Alert EnhancingTransparencyBipartisanInfrastructureLaw.pdf -filters: major-legislation controller-alert omb 2022 +filters: major-legislation controller-alert omb 2022 archived fiscal_year: 2022 --- \ No newline at end of file diff --git a/assets/js/isotope.settings.js b/assets/js/isotope.settings.js index fd46c2d80..68adfee52 100644 --- a/assets/js/isotope.settings.js +++ b/assets/js/isotope.settings.js @@ -15,7 +15,7 @@ jQuery(document).ready(function ($) { // Add the years to the data-filter attribute of the filter-list-not-archived $("#filter-list-not-archived").attr("data-filter", years.join(", ")); - var initialFilter = years.join(", "); + var initialFilter = years.join(", ") + ":not(.archived)" // Create initial hash var initHash = "archive_area=" + encodeURIComponent(initialFilter); From 22bb1c2a9459fda1f073872b2adcecfde4107975 Mon Sep 17 00:00:00 2001 From: arnayv-47 Date: Tue, 4 Feb 2025 21:45:55 -0500 Subject: [PATCH 2/3] change isotope --- assets/js/isotope.settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/isotope.settings.js b/assets/js/isotope.settings.js index 68adfee52..fd46c2d80 100644 --- a/assets/js/isotope.settings.js +++ b/assets/js/isotope.settings.js @@ -15,7 +15,7 @@ jQuery(document).ready(function ($) { // Add the years to the data-filter attribute of the filter-list-not-archived $("#filter-list-not-archived").attr("data-filter", years.join(", ")); - var initialFilter = years.join(", ") + ":not(.archived)" + var initialFilter = years.join(", "); // Create initial hash var initHash = "archive_area=" + encodeURIComponent(initialFilter); From 89e1aa5d167c95274b5392771b7a55881681ec93 Mon Sep 17 00:00:00 2001 From: arnayv-47 Date: Tue, 4 Feb 2025 22:07:40 -0500 Subject: [PATCH 3/3] change isotope to manually allow archived --- assets/js/isotope.settings.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/js/isotope.settings.js b/assets/js/isotope.settings.js index fd46c2d80..ca69af795 100644 --- a/assets/js/isotope.settings.js +++ b/assets/js/isotope.settings.js @@ -7,15 +7,16 @@ jQuery(document).ready(function ($) { let currentYear = new Date().getFullYear(); const archivedYears = 7; const endYear = (currentYear - archivedYears); - let years = []; + let notArchivedYears = []; for (let i = currentYear; i >= endYear; i--) { - years.push(`.${i}`); + notArchivedYears.push(`.${i}:not(.archived)`); } + let notArchivedFilter = notArchivedYears.join(", "); // Add the years to the data-filter attribute of the filter-list-not-archived - $("#filter-list-not-archived").attr("data-filter", years.join(", ")); - var initialFilter = years.join(", "); + $("#filter-list-not-archived").attr("data-filter", notArchivedFilter); + var initialFilter = notArchivedFilter; // Create initial hash var initHash = "archive_area=" + encodeURIComponent(initialFilter);