From d2aab294bdd8c3fbcf092195a3f78303e055f32b Mon Sep 17 00:00:00 2001 From: Dave Lane Date: Thu, 19 Sep 2024 16:23:30 +1200 Subject: [PATCH] initial commit with collapsible filters and filtering on categories --- README.md | 11 +- src/lib/components/CollapsibleSection.svelte | 43 ++++++ src/lib/components/Filterable.svelte | 7 +- src/lib/components/filter.js | 19 +++ src/lib/references.js | 77 +---------- src/routes/+page.svelte | 138 ++++++++++--------- 6 files changed, 150 insertions(+), 145 deletions(-) create mode 100644 src/lib/components/CollapsibleSection.svelte create mode 100644 src/lib/components/filter.js diff --git a/README.md b/README.md index cc5e0ce..cb2a3a3 100644 --- a/README.md +++ b/README.md @@ -59,11 +59,18 @@ and then run docker-compose build -### You can push your new container to a docker container repository (I use my Forgejo instance!) +You can push your new container to a docker container repository (I use my Forgejo instance!) docker push forge.magnificent.nz/lightweight/webservices-app:latest -### To start it up (and tail the logs - CTRL-C to quit out of the logs without affecting running container) + +### To deploy the new container + +At the location you're running production, pull the updated container + + docker-compose pull + +To start it up (and tail the logs - CTRL-C to quit out of the logs without affecting running container) docker-compose up -d && docker-compose logs -f diff --git a/src/lib/components/CollapsibleSection.svelte b/src/lib/components/CollapsibleSection.svelte new file mode 100644 index 0000000..cb701e5 --- /dev/null +++ b/src/lib/components/CollapsibleSection.svelte @@ -0,0 +1,43 @@ + + +
+

+ +

+ + +
+ + diff --git a/src/lib/components/Filterable.svelte b/src/lib/components/Filterable.svelte index e454e2c..fd311f8 100644 --- a/src/lib/components/Filterable.svelte +++ b/src/lib/components/Filterable.svelte @@ -23,7 +23,7 @@ console.log('joinActive'); console.log('filterValues: ', filterValues); if (isActive.length) return formatter.format(isActive); - return 'None'; + return 'No'; } function getActive($f) { @@ -88,11 +88,11 @@ {filter.name} ({filter.id}) + name="{filter.id}" role="button" tabindex={tabindex + filter.id}>{filter.name} {/each} -

{activeFiltersString} {filterText} active.

+