diff --git a/src/lib/components/notes/Notes.svelte b/src/lib/components/notes/Notes.svelte index 0280e0454e..b598e0d686 100644 --- a/src/lib/components/notes/Notes.svelte +++ b/src/lib/components/notes/Notes.svelte @@ -61,8 +61,10 @@ }; const createNoteHandler = async () => { + // $i18n.t('New Note'), const res = await createNewNote(localStorage.token, { - title: $i18n.t('New Note'), + // YYYY-MM-DD + title: dayjs().format('YYYY-MM-DD'), data: { content: { json: null, diff --git a/src/tailwind.css b/src/tailwind.css index bf191262ff..98f06de1c6 100644 --- a/src/tailwind.css +++ b/src/tailwind.css @@ -40,6 +40,35 @@ textarea::placeholder { color: theme(--color-gray-400); } + + input[type='checkbox'] { + @apply appearance-none size-3.5 align-middle bg-white border border-gray-300 rounded transition cursor-pointer focus:ring-2 focus:ring-blue-500 focus:outline-none dark:bg-gray-800 dark:border-gray-600 self-center; + /* Center the custom mark */ + display: inline-block; + position: relative; + } + input[type='checkbox']:checked { + @apply bg-blue-600 border-blue-600; + } + input[type='checkbox']:after { + content: ''; + display: block; + width: 100%; + height: 100%; + /* Hide by default */ + opacity: 0; + transition: opacity 0.2s; + position: absolute; + top: 0; + left: 0; + pointer-events: none; + /* SVG checkmark as background image */ + background: url('data:image/svg+xml;utf8,') + center/80% no-repeat; + } + input[type='checkbox']:checked:after { + opacity: 1; + } } @custom-variant hover (&:hover);