feat: add notes app
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
// Desktop only: a chevron on the sidebar's right border (or the window's left edge when the
|
||||
// sidebar is hidden) that appears on hover and shows/hides the note list
|
||||
const { open, toggle } = useNotesSidebar()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- The whole hover area is the button. It only reaches to the right of the line (never over the note list's
|
||||
delete buttons), as wide as the note's side padding (md:px-10), so it never covers the text either -->
|
||||
<button
|
||||
type="button"
|
||||
:title="`${open ? 'Hide' : 'Show'} notes (⌘E)`"
|
||||
:aria-label="open ? 'Hide notes' : 'Show notes'"
|
||||
class="group fixed inset-y-0 z-20 hidden w-10 cursor-pointer items-center focus:outline-none md:flex"
|
||||
:class="open ? 'left-72' : 'left-0'"
|
||||
@click="toggle"
|
||||
>
|
||||
<span
|
||||
class="flex size-6 items-center justify-center rounded-full bg-default text-muted opacity-0 shadow-sm ring-1 ring-accented transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 group-focus-visible:ring-2 group-focus-visible:ring-primary"
|
||||
:class="open ? '-translate-x-1/2' : 'ms-2'"
|
||||
>
|
||||
<UIcon :name="open ? 'i-lucide-chevron-left' : 'i-lucide-chevron-right'" class="size-4" />
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
Reference in New Issue
Block a user