Improve styling; fix icons

This commit is contained in:
Emmanuel 2024-12-03 23:08:21 +01:00
parent 96a69de097
commit 0dd6d392cd
28 changed files with 76 additions and 99 deletions

58
package-lock.json generated
View file

@ -16,7 +16,6 @@
"jsdom": "^25.0.0"
},
"devDependencies": {
"@iconify-icons/codicon": "^1.2.15",
"@playwright/test": "^1.22.2",
"@sveltejs/adapter-node": "^5.0.1",
"@sveltejs/kit": "^2.7.7",
@ -42,8 +41,8 @@
"eslint-plugin-svelte": "^2.28.0",
"fs-extra": "^11.1.0",
"globals": "^15.9.0",
"iconify-icon": "^2.0.0",
"isomorphic-git": "^1.27.2",
"lucide-svelte": "^0.464.0",
"metslesliens": "git+https://git.en-root.org/eraviart/metslesliens.git",
"morgan": "^1.10.0",
"object-hash": "^3.0.0",
@ -742,23 +741,6 @@
"url": "https://github.com/sponsors/nzakas"
}
},
"node_modules/@iconify-icons/codicon": {
"version": "1.2.30",
"resolved": "https://registry.npmjs.org/@iconify-icons/codicon/-/codicon-1.2.30.tgz",
"integrity": "sha512-rLQFx8nFu0RwP4BFPr4ELooaubDzWUb+6tB2knHPyHYEL8Jfus8ysJ5i26H1Wr9CbtlKu/B2Tx+57otwqhFLqw==",
"dev": true,
"license": "CC-BY-4.0",
"dependencies": {
"@iconify/types": "*"
}
},
"node_modules/@iconify/types": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
"integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",
"dev": true,
"license": "MIT"
},
"node_modules/@internationalized/date": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.6.0.tgz",
@ -1468,6 +1450,15 @@
"svelte": "^5.1.9"
}
},
"node_modules/@tricoteuses/explorer-tools/node_modules/lucide-svelte": {
"version": "0.454.0",
"resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.454.0.tgz",
"integrity": "sha512-TgW17HI7M8LeFZ3NpaDp1LwPGBGMVjx/x81TtK+AacEQvmJcqetqeJNeBT18NMEJP9+zi/Wt+Zc8mo44K5Uszw==",
"license": "ISC",
"peerDependencies": {
"svelte": "^3 || ^4 || ^5.0.0-next.42"
}
},
"node_modules/@tricoteuses/explorer-tools/node_modules/tailwind-variants": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-0.2.1.tgz",
@ -2078,6 +2069,15 @@
"svelte": "^5.1.9"
}
},
"node_modules/augmented-data-viewer/node_modules/lucide-svelte": {
"version": "0.454.0",
"resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.454.0.tgz",
"integrity": "sha512-TgW17HI7M8LeFZ3NpaDp1LwPGBGMVjx/x81TtK+AacEQvmJcqetqeJNeBT18NMEJP9+zi/Wt+Zc8mo44K5Uszw==",
"license": "ISC",
"peerDependencies": {
"svelte": "^3 || ^4 || ^5.0.0-next.42"
}
},
"node_modules/autoprefixer": {
"version": "10.4.20",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz",
@ -3980,19 +3980,6 @@
"ms": "^2.0.0"
}
},
"node_modules/iconify-icon": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/iconify-icon/-/iconify-icon-2.1.0.tgz",
"integrity": "sha512-lto4XU3bwTQnb+D/CsJ4dWAo0aDe+uPMxEtxyOodw9l7R9QnJUUab3GCehlw2M8mDHdeUu/ufx8PvRQiJphhXg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@iconify/types": "^2.0.0"
},
"funding": {
"url": "https://github.com/sponsors/cyberalien"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
@ -4755,9 +4742,10 @@
}
},
"node_modules/lucide-svelte": {
"version": "0.454.0",
"resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.454.0.tgz",
"integrity": "sha512-TgW17HI7M8LeFZ3NpaDp1LwPGBGMVjx/x81TtK+AacEQvmJcqetqeJNeBT18NMEJP9+zi/Wt+Zc8mo44K5Uszw==",
"version": "0.464.0",
"resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.464.0.tgz",
"integrity": "sha512-yTLUIff++ydIYVN6hnfQCGUsR5Y56T6cvM3CyXrVNsExRsDKCZAifcIg3C8Bxcb7cO2h+fuCPPzvGsQfEl3TBA==",
"dev": true,
"license": "ISC",
"peerDependencies": {
"svelte": "^3 || ^4 || ^5.0.0-next.42"

View file

@ -53,7 +53,6 @@
"jsdom": "^25.0.0"
},
"devDependencies": {
"@iconify-icons/codicon": "^1.2.15",
"@playwright/test": "^1.22.2",
"@sveltejs/adapter-node": "^5.0.1",
"@sveltejs/kit": "^2.7.7",
@ -79,8 +78,8 @@
"eslint-plugin-svelte": "^2.28.0",
"fs-extra": "^11.1.0",
"globals": "^15.9.0",
"iconify-icon": "^2.0.0",
"isomorphic-git": "^1.27.2",
"lucide-svelte": "^0.464.0",
"metslesliens": "git+https://git.en-root.org/eraviart/metslesliens.git",
"morgan": "^1.10.0",
"object-hash": "^3.0.0",

View file

@ -1,7 +1,5 @@
<script lang="ts">
import dash from "@iconify-icons/codicon/dash"
import triangleDown from "@iconify-icons/codicon/triangle-down"
import triangleRight from "@iconify-icons/codicon/triangle-right"
import { Minus, Triangle } from "lucide-svelte"
import type { Aggregate } from "$lib/aggregates"
import ArticleView from "$lib/components/ArticleView.svelte"
@ -66,8 +64,10 @@
class="inline-flex align-top"
on:click|stopPropagation={toggle}
on:keyup|stopPropagation={toggle}
role="button"
tabindex="-1"
>
<iconify-icon class="mt-1 inline-block shrink-0" icon={dash} inline />
<Minus class="mr-1 mt-0.5 w-3 flex-none shrink-0" />
<a class="link-hover link-primary link" href={pathnameFromLegalId(id)}>
{lien["#text"]}
</a>
@ -77,20 +77,22 @@
class="inline-flex cursor-pointer align-top"
on:click|stopPropagation={toggle}
on:keyup|stopPropagation={toggle}
role="button"
tabindex="-1"
>
<iconify-icon
class="mt-1 inline-block shrink-0"
icon={open ? triangleDown : triangleRight}
inline
<Triangle
class="mr-1 mt-0.5 w-3 flex-none"
fill="currentColor"
transform="rotate({open ? 180 : 90})"
/>
{lien["#text"]}
</div>
{#if open}
<div class="ml-2 border-l-4 pl-2">
<div
class="ml-2 border-l-4 pl-2"
<svelte:component
this={componentAndProperties.component}
{...componentAndProperties.properties}
/>
</div>
this={componentAndProperties.component}
{...componentAndProperties.properties}
></div>
{/if}
{/if}

View file

@ -1,5 +1,5 @@
<script lang="ts">
import errorIcon from "@iconify-icons/codicon/error"
import { CircleX } from "lucide-svelte"
import { realErrorFromError } from "./errors"
import ErrorValue from "./ErrorValue.svelte"
@ -13,7 +13,7 @@
{#if realError !== error || (!hideError && realError != null)}
<div class="alert alert-error">
<div class="flex-1">
<iconify-icon class="mr-1" icon={errorIcon} />
<CircleX class="mr-1" />
<ErrorValue bind:error frame={false} {hideError} />
</div>
</div>

View file

@ -1,5 +1,5 @@
import arrowRight from "@iconify-icons/codicon/arrow-small-right"
import type { Access, Summarizer, Summary } from "augmented-data-viewer"
import { MoveRight } from "lucide-svelte"
import {
type Article,

View file

@ -3,7 +3,6 @@
import { NavBar } from "@tricoteuses/explorer-tools"
// import NavBar from "@tricoteuses/explorer-tools/components/NavBar.svelte"
import "iconify-icon"
import { page } from "$app/stores"
import { appMenu } from "$lib/legal"

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ article: articles } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
ARTICLE
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -23,7 +23,7 @@
<IdPagesSwitcher {id} />
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ dossier_legislatif: dossiersLegislatifs } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
DOSSIER_LEGISLATIF
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -19,7 +19,7 @@
)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ id: idsWrapper } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
ID
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -15,7 +15,7 @@
$: summary = summarizeLegalObject({ key: "id" }, "id", idWrapper)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ idcc: idccArray } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
IDCC
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -12,7 +12,7 @@
$: summary = summarizeLegalObject({ key: "idcc" }, "idcc", idcc)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ jo: jos } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
JO
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -12,7 +12,7 @@
$: summary = summarizeLegalObject({ key: "jo" }, "jo", jo)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,6 +1,6 @@
<script lang="ts">
import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
import { Search } from "lucide-svelte"
import { page } from "$app/stores"
// import Pagination from "$lib/components/Pagination.svelte"
@ -15,7 +15,7 @@
$: article = id === undefined ? undefined : data.article?.[id]
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
Recherche
</h1>
@ -31,7 +31,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ section_ta: sectionTaArray } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
SECTION_TA
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ texte_version: texteVersionArray } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
TEXTE_VERSION
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -22,7 +22,7 @@
<IdPagesSwitcher id={texteVersion.META.META_COMMUN.ID} />
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ textekali: textekaliArray } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
TEXTEKALI
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -22,7 +22,7 @@
<IdPagesSwitcher id={textekali.META.META_COMMUN.ID} />
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ textelr: textelrArray } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
TEXTELR
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -18,7 +18,7 @@
<IdPagesSwitcher id={textelr.META.META_COMMUN.ID} />
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
import { page } from "$app/stores"
@ -35,7 +34,7 @@
)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
Codes, lois et règlements
</h1>

View file

@ -56,7 +56,7 @@
<IdPagesSwitcher {id} />
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>

View file

@ -1,5 +1,4 @@
<script lang="ts">
// import searchIcon from "@iconify-icons/codicon/search"
import { TreeView } from "augmented-data-viewer"
// import { page } from "$app/stores"
@ -13,7 +12,7 @@
$: ({ versions: versionsWrapper } = data)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
VERSIONS
</h1>
@ -29,7 +28,7 @@
bind:value={q}
/>
<button class="btn btn-square" type="submit">
<iconify-icon icon={searchIcon} />
<Search />
</button>
</div>
</div>

View file

@ -19,7 +19,7 @@
)
</script>
<header class="prose my-6 max-w-full">
<header class="my-6 max-w-full">
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>