defter 0.3.0

Self-hosted Zotero sync and file storage server, with metadata in SQLite and attachments in S3.
1
2
3
4
5
6
7
8
9
// Appended to htmx (vendor/) by build.rs; both run as one deferred script.

// The theme toggle. The button's label switches by CSS (dark:hidden), and an
// inline script in the page head applies the stored theme before first paint.
document.addEventListener('click', (event) => {
  if (!event.target.closest('[data-theme-toggle]')) return
  const dark = document.documentElement.classList.toggle('dark')
  localStorage.setItem('defter-dark', String(dark))
})