From 0d9762206f7fedacc2bb047e1ea830dec579d58c Mon Sep 17 00:00:00 2001 From: Dave Lane Date: Mon, 23 Sep 2024 09:34:14 +1200 Subject: [PATCH] wip --- src/lib/components/CollapsibleSection.svelte | 12 ++- src/lib/components/Filterable.svelte | 41 ++++++++- src/routes/+page.svelte | 96 +++++--------------- 3 files changed, 71 insertions(+), 78 deletions(-) diff --git a/src/lib/components/CollapsibleSection.svelte b/src/lib/components/CollapsibleSection.svelte index cb701e5..b6bfa66 100644 --- a/src/lib/components/CollapsibleSection.svelte +++ b/src/lib/components/CollapsibleSection.svelte @@ -23,21 +23,25 @@ diff --git a/src/lib/components/Filterable.svelte b/src/lib/components/Filterable.svelte index fd311f8..2e2d61a 100644 --- a/src/lib/components/Filterable.svelte +++ b/src/lib/components/Filterable.svelte @@ -122,7 +122,7 @@ grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));*/ } .filter { - font-size: 80%; + font-size: 80%; width: 80px; height: auto; border: 1px #aaa solid; @@ -141,6 +141,43 @@ } .active { background-color: lightblue; - border-color: blue; + /*border-color: blue;*/ + } + + /* instance-specific styles */ + .filter { + font-size: 80%; + margin-right: 0.5em; + line-height: 2.5; + padding: 6px 8px; + border-radius: 10px; + white-space: nowrap; + word-break: normal; + box-shadow: 3px 3px 3px #6a6d6a; + } + .filter:hover { box-shadow: 4px 4px 3px #727372;} + .filter.categories.active { + background-color: #9aa34d; + color: #fff; + } + .filter.analogues.active { + background-color: #a34b62; + color: #fff; + } + .filter.licenses.active { + background-color: #6498a3; + color: #fff; + } + .filter.statuses.active { + background-color: #a369a2; + color: #fff; + } + .filter.affiliates.active { + background-color: #fff; + color: #000; + } + .filter.hosts.active { + background-color: #fff; + color: #000; } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 84fc96f..57d11e7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -10,7 +10,8 @@ import { setFilter, getFilter } from '$lib/components/filter.js'; import Filterable from '$lib/components/Filterable.svelte'; // collapsible sections - import CollapsibleSection from '$lib/components/CollapsibleSection.svelte' + import CollapsibleSection from '$lib/components/CollapsibleSection.svelte'; + import Tile from '$lib/components/Tile.svelte'; //console.log('colours: ', colours); @@ -350,45 +351,45 @@
  • Total number of services: {results.total_instances}
  • - +
    -
    +

    Categories

    - -
    + +

    Analogues

    - -
    + +

    Open Source & Copyleft Licenses

    - -
    + +

    Statuses

    - -
    + +

    Affiliates

    - -
    + +

    Hosts

    @@ -462,69 +463,16 @@ background-color: #ccc; display: block; } - .filters { - /*background-color: #f1ff94; - padding: 0.5em; - border: 3px solid #cbea77; - margin: 1em 0;*/ - margin-bottom: 1em; - } +/* .filters { margin-bottom: 1em;} .filters .tags { - /*padding: 0.5em;*/ margin: 1em 0; display: block; + }*/ + .collapsible { + color: #eee !important; + background-color: #666 !important; } - .tag-list { -/* white-space: normal; - word-break: normal; - display: inline;*/ - } - .tags { -/* white-space: normal; - word-break: normal; - display: inline;*/ - } - .tag { - font-size: 80%; - margin-right: 0.5em; - line-height: 2.5; - padding: 6px 8px; - border-radius: 10px; - white-space: nowrap; - word-break: normal; - box-shadow: 3px 3px 3px #6a6d6a; - } - .tag:hover { box-shadow: 4px 4px 3px #727372;} - .tag.category { - background-color: #9aa34d; - color: #fff; - } - .tag.license { - background-color: #6498a3; - color: #fff; - } - .tag.status { - background-color: #a369a2; - color: #fff; - } - .tag.affiliate { - background-color: #fff; - color: #000; - } - .tag.host { - background-color: #fff; - color: #000; - } - .tag.on { - padding-right: 25px; - background-image: url('/images/check-black-in-white-20px.png'); - background-position: right center; - background-repeat: no-repeat; - } - .tag.off { - color: #ccc; - opacity: 0.5; - } + .tiles { display: grid; grid-gap: 15px; @@ -555,6 +503,10 @@ .tile:hover { box-shadow: 10px 10px 6px #727372; } + .tile p.description { + height: 200px; + overflow: scroll; + } .tile .links h2 a { color: #e6c4fc; }