From 2cea5f44fba9714b2f96b089af3f96a315dbd790 Mon Sep 17 00:00:00 2001 From: Dave Lane Date: Tue, 19 Nov 2024 10:59:01 +1300 Subject: [PATCH] WIP just need to fix the filtering of technologies based on instance properties --- Plans.md | 22 ++++- src/app.css | 42 ++++++++- src/lib/components/CollapsibleSection.svelte | 70 -------------- src/lib/components/TechnologyTile.svelte | 96 ++++++++++---------- src/routes/+page.js | 26 +++--- src/routes/+page.svelte | 50 +++++++--- 6 files changed, 157 insertions(+), 149 deletions(-) delete mode 100644 src/lib/components/CollapsibleSection.svelte diff --git a/Plans.md b/Plans.md index 41c49ea..5a6d057 100644 --- a/Plans.md +++ b/Plans.md @@ -1,8 +1,24 @@ # Plans for Webservices App -High priority: +I've got quite a few plans for this app... here's a rough sketch of what I'm planning. + +First release: * filtering of all properties like Categories, Analogues, Licenses, Statuses, Hosts, and Affiliations. +* modal showing each technology in more detail. DONE +* split out all constants (arrays) into separate files. ~DONE +* split out functions into svelte components. + +Future versions: + +* upgrade to Svelte 5 * a 'Technology' view (overlay), addressable by URL (i.e. going to, say, http://localhost:5173/ServiceName brings up the site with ServiceName shown in 'Technology' view, allowing people to reference a specific technology of interest to others). -* split out all constants (arrays) into separate files. -* split out functions into svelte modules. +* ability to go 'prev' or 'next' in modals within filtered set of technologies. +* ability to select a Hosts and view all Technologies with instances on that Host +* ability to see the status (via UptimeKuma API) of each instance. + +Possibly, eventually: + +* move data into a database (rather than a fragile hand-crafted JSON file) with integrity checking. +* Authentication for administration +* CRUD interface for Technologies, Licenses, Hosts, and Affiliations. diff --git a/src/app.css b/src/app.css index 10bf462..047d31f 100644 --- a/src/app.css +++ b/src/app.css @@ -28,7 +28,7 @@ a:hover { text-decoration: underline; } a:visited { - color: #437fad; + color: #325f81; } .y-accordions, .y-accordion-header-button { @@ -44,9 +44,14 @@ a:visited { border-radius: 15px; box-shadow: 5px 5px 3px #6a6d6a; width: 90%; - margin: auto auto; - max-width: none; + margin: 1em auto; + max-width: 40em; height: auto; + padding: 0; +} +.y-modal .y-modal-container .y-modal-content { + width: 100%; + border-width: 0; } .y-modal .y-modal-container .y-modal-header { text-align: center; @@ -57,3 +62,34 @@ a:visited { font-size: 1.5em; margin: auto; } +.y-modal .y-modal-container .y-modal-body { + background-color: #eee; +} +.y-modal .y-modal-container div.instances { + background-color: #ddd; + width: 100%; + padding: 20px; + margin-bottom: 0; +} + +.y-modal .y-modal-container p.instances, +.y-modal .y-modal-container li p { + padding: 0; + margin-bottom: 0; +} + +/* end modals */ +/* popover styles */ +.y-popover { + z-index: 10000; +} +.y-popover a { + font-size: 110%; +} +.y-popover a:hover { + color: #000; + text-decoration: underline; +} +.y-popover a:visited { + color: #325f81; +} diff --git a/src/lib/components/CollapsibleSection.svelte b/src/lib/components/CollapsibleSection.svelte deleted file mode 100644 index 62acc24..0000000 --- a/src/lib/components/CollapsibleSection.svelte +++ /dev/null @@ -1,70 +0,0 @@ - - -
-

- -

- - -
- - diff --git a/src/lib/components/TechnologyTile.svelte b/src/lib/components/TechnologyTile.svelte index 9623c4b..940f93b 100644 --- a/src/lib/components/TechnologyTile.svelte +++ b/src/lib/components/TechnologyTile.svelte @@ -1,10 +1,12 @@ @@ -597,9 +613,7 @@ context={'categories'}>

Categories

- You can These are general categories of software which help you understand the - sort of software you're looking at, as well as identifying functionally similar - software for comparison. + These are general categories of software which help you understand the sort of software you're looking at, as well as identifying functionally similar software for comparison.

@@ -691,10 +705,16 @@

Showing {filteredTechnologies.length} technology tiles.

-

Current URL: {$page.url}...

+
- {#each filteredTechnologies as technology} - + {#each filteredTechnologies as technology, index} + + + + {:else} +

No technologies are selected

{/each}