diff options
feat: initial commit
Diffstat (limited to 'src/lib/Titlebar.svelte')
-rw-r--r-- | src/lib/Titlebar.svelte | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/lib/Titlebar.svelte b/src/lib/Titlebar.svelte new file mode 100644 index 0000000..35cfd0d --- /dev/null +++ b/src/lib/Titlebar.svelte @@ -0,0 +1,55 @@ +<script lang="ts"> + import { S } from '$lib'; + import type { Snippet } from 'svelte'; + let { children }: { children?: Snippet } = $props(); +</script> + +<div class="rounded-tr-xl {S.window_topbar}"> + <!-- <div class="flex gap-2 w-max"> + <button + onclick={() => history.back()} + onkeypress={(e) => + e.key === 'Return' || e.key === 'Enter' + ? e.currentTarget.click() + : void 0} + aria-label="Back" + class={S.button('secondary')} + ><svg + height="16px" + viewBox="0 0 16 16" + width="16px" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="m 12 2 c 0 -0.265625 -0.105469 -0.519531 -0.292969 -0.707031 c -0.390625 -0.390625 -1.023437 -0.390625 -1.414062 0 l -6 6 c -0.1875 0.1875 -0.292969 0.441406 -0.292969 0.707031 s 0.105469 0.519531 0.292969 0.707031 l 6 6 c 0.390625 0.390625 1.023437 0.390625 1.414062 0 c 0.1875 -0.1875 0.292969 -0.441406 0.292969 -0.707031 s -0.105469 -0.519531 -0.292969 -0.707031 l -5.292969 -5.292969 l 5.292969 -5.292969 c 0.1875 -0.1875 0.292969 -0.441406 0.292969 -0.707031 z m 0 0" + fill="currentColor" + /> + </svg></button + > + <button + onclick={() => history.forward()} + onkeypress={(e) => + e.key === 'Return' || e.key === 'Enter' + ? e.currentTarget.click() + : void 0} + aria-label="Forward" + class={S.button('secondary')} + ><svg + height="16px" + viewBox="0 0 16 16" + width="16px" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="m 4 2 c 0 -0.265625 0.105469 -0.519531 0.292969 -0.707031 c 0.390625 -0.390625 1.023437 -0.390625 1.414062 0 l 6 6 c 0.1875 0.1875 0.292969 0.441406 0.292969 0.707031 s -0.105469 0.519531 -0.292969 0.707031 l -6 6 c -0.390625 0.390625 -1.023437 0.390625 -1.414062 0 c -0.1875 -0.1875 -0.292969 -0.441406 -0.292969 -0.707031 s 0.105469 -0.519531 0.292969 -0.707031 l 5.292969 -5.292969 l -5.292969 -5.292969 c -0.1875 -0.1875 -0.292969 -0.441406 -0.292969 -0.707031 z m 0 0" + fill="currentColor" + /> + </svg></button + > + </div> --> + <div + class="flex-1 rounded-tl-xl min-h-8 flex items-center justify-center gap-2" + > + {@render children?.()} + </div> +</div> |