Files
adamantium/slices/admin/templates/posts/show.html.slim

38 lines
1.9 KiB
Plaintext

div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200 bg-pink-100 p-4 rounded"
h3 Syndicated to
ul
- post.syndication_sources.to_a.each do |name, url|
li
a href=url
= name
= " — "
button hx-swap="afterend" hx-post="/admin/posts/#{post.id}/de_syndicate/#{name}" de-syndicate
form hx-post="/admin/posts/#{post.id}/syndicate/add_source"
span class="mr-2"
label for="syndication_source_name"
' Name:
select id="syndication_source_name" name="syndication_source_name"
option value="" (none)
option value="mastodon" Mastodon
option value="blue_sky" Blue Sky
span class="mr-2"
label for="syndication_source_url"
' URL:
input type="text" id="syndication_source_url" name="syndication_source_url"
button type="submit" Add source
button hx-post="/admin/posts/#{post.id}/syndicate/day_one" Send to Day One
// TODO: Add preview, fix sending to DayOne
article class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200 prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline prose-img:rounded"
a href="/post/#{post.slug}"
h1= post.name || "💬"
form action="/admin/post/#{post.id}/update" method="POST"
textarea name="body" class="text-gray-800 w-full border-blue-200 border-2 rounded p-2 mb-4" x-data="{ resize: () => { $el.style.height = '5px'; $el.style.height = $el.scrollHeight + 'px' } }" x-init="resize()" @input="resize()"
== markdown_body
fieldset class="mb-4 flex"
label for="tags" class="mr-2" Tags:
input type="text" name="tags" id="tags" class="w-full px-1 border rounded" value="#{post.tags.map(&:label).join(", ")}"
button class="rounded bg-blue-100 hover:bg-blue-200 text-blue-600 px-2 hover:cursor-pointer" type="submit"
= "Update"