diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..ce3783e --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +VITE_APP_URL= \ No newline at end of file diff --git a/app.d.ts b/app.d.ts new file mode 100644 index 0000000..161703c --- /dev/null +++ b/app.d.ts @@ -0,0 +1,13 @@ +/// + +// See https://kit.svelte.dev/docs#typescript +// for information about these interfaces +declare namespace App { + interface Locals {} + + interface Platform {} + + interface Session {} + + interface Stuff {} +} diff --git a/src/lib/commissions/Accordion.svelte b/src/lib/commissions/Accordion.svelte index 66ec782..29d6167 100644 --- a/src/lib/commissions/Accordion.svelte +++ b/src/lib/commissions/Accordion.svelte @@ -2,22 +2,23 @@ import { onMount } from "svelte"; export let title; - export let open = ""; + export let autoOpen = false; export let id; + export let note = null; onMount(() => { - if(open == "true") { + if(window.location.hash == "#" + id || autoOpen == true) { openAccordion(); } }); function openAccordion() { - let content = document.querySelector("#content"); - content.classList.toggle("block"); + let content = document.querySelector("#" + id + "-content"); + content.classList.toggle("flex"); content.classList.toggle("hidden"); - let trigger = document.querySelector("#trigger"); - if(content.classList.contains("block")) { + let trigger = document.querySelector("#" + id + "-trigger"); + if(content.classList.contains("flex")) { trigger.innerHTML = "⬇️"; } else { trigger.innerHTML = "➡️"; @@ -25,14 +26,20 @@ } -
+

{title}

- +
-