Update ids for the preview modal in the admin panel.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<p id="read-drawer-label-content" class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">
|
||||
<p id="read-drawer-content" class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">
|
||||
{{ article.content }}
|
||||
</p>
|
||||
</p>
|
||||
|
||||
@@ -129,21 +129,21 @@
|
||||
</div>
|
||||
|
||||
<!-- Preview Drawer -->
|
||||
<div id="drawer-read-product-advanced"
|
||||
<div id="drawer-read-article-advanced"
|
||||
x-data="{ title: '', created: '' }"
|
||||
@preview_article.window="title = $event.detail.title; created = $event.detail.created;"
|
||||
class="overflow-y-auto fixed top-0 left-0 z-40 p-4 w-full max-w-lg h-screen bg-white transition-transform -translate-x-full dark:bg-gray-800" tabindex="-1" aria-labelledby="drawer-label" aria-hidden="true">
|
||||
<div>
|
||||
<h4 id="read-drawer-label" class="mb-1.5 leading-none text-xl font-semibold text-gray-900 dark:text-white" x-text="title"></h4>
|
||||
</div>
|
||||
<button type="button" data-drawer-dismiss="drawer-read-product-advanced" aria-controls="drawer-read-product-advanced" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white">
|
||||
<button type="button" data-drawer-dismiss="drawer-read-article-advanced" aria-controls="drawer-read-article-advanced" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white">
|
||||
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
<span class="sr-only">Close menu</span>
|
||||
</button>
|
||||
<h2 class="mb-2 font-semibold leading-none text-gray-900 dark:text-white" x-text="created"></h2>
|
||||
<p id="read-drawer-label-content" class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">
|
||||
<p id="read-drawer-content" class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
Edit
|
||||
</button>
|
||||
<button type="button"
|
||||
@click="$dispatch('preview_article', { title: '{{ article.title }}', created: created })"
|
||||
@click="$dispatch('preview_article', { title: title, created: created })"
|
||||
hx-get="/htmx/admin/modals/article/content/{{ article.id }}/"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#read-drawer-label-content"
|
||||
data-drawer-target="drawer-read-product-advanced"
|
||||
data-drawer-show="drawer-read-product-advanced"
|
||||
hx-target="#read-drawer-content"
|
||||
data-drawer-target="drawer-read-article-advanced"
|
||||
data-drawer-show="drawer-read-article-advanced"
|
||||
class="py-2 px-3 flex items-center text-sm font-medium text-center text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="currentColor" class="w-4 h-4 mr-2 -ml-0.5">
|
||||
<path d="M12 15a3 3 0 100-6 3 3 0 000 6z" />
|
||||
|
||||
Reference in New Issue
Block a user