Add bookmark admin

This commit is contained in:
2023-05-07 11:31:15 +10:00
parent fa146fbfb3
commit 3fddc1757e
17 changed files with 186 additions and 2 deletions

View File

@@ -1,13 +1,20 @@
div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200"
h1 = bookmark.name
div class="mb-12 prose max-w-prose mx-auto text-gray-800 dark:text-gray-200"
div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200" x-data="{ open: false }"
a class="text-blue-600 no-underline hover:underline" href=bookmark.url
p class="text-xl"
= bookmark.url
== bookmark.content
- unless bookmark.cached_content.nil?
button @click="open = ! open" Toggle cached version
span x-show="open"
div class="rounded bg-blue-50 px-4 py-2"
== bookmark.cached_content
div class="prose max-w-prose mx-auto text-gray-800 dark:text-gray-200 grid grid-cols-5 gap-2" hx-get="/bookmarks/metadata/#{bookmark.id}" hx-trigger="load"
div class="mb-8 max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"

View File

@@ -28,6 +28,7 @@ html
script src="/assets/index.js"
script src="https://unpkg.com/htmx.org@1.8.4" integrity="sha384-wg5Y/JwF7VxGk4zLsJEcAojRtlVp1FKKdGy1qN+OMtdq72WRvX/EdRdqg/LOhYeV" crossorigin="anonymous"
script src="https://cdn.jsdelivr.net/npm/alpinejs@3.12.0/dist/cdn.min.js" defer="true"
script src="https://api.mapbox.com/mapbox-gl-js/v2.9.1/mapbox-gl.js"
link href="https://api.mapbox.com/mapbox-gl-js/v2.9.1/mapbox-gl.css" rel="stylesheet"