Add more microformat tags
This commit is contained in:
@@ -50,6 +50,10 @@ module Adamantium
|
|||||||
truncate_html(content, 140, true)
|
truncate_html(content, 140, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def permalink
|
||||||
|
"#{Hanami.app.settings.micropub_site_url}/post/#{slug}"
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def truncate_html(content, len = 30, at_end = nil)
|
def truncate_html(content, len = 30, at_end = nil)
|
||||||
|
@@ -1,25 +1,33 @@
|
|||||||
div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200"
|
article class="h-entry"
|
||||||
h1 = post.display_title
|
div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200"
|
||||||
|
a class="u-url" href=post.permalink
|
||||||
|
h1 class="p-name" = post.display_title
|
||||||
|
|
||||||
article class="h-entry 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"
|
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"
|
||||||
- if post.photos?
|
- if post.photos?
|
||||||
- post.photos.each do |photo|
|
- post.photos.each do |photo|
|
||||||
figure
|
figure
|
||||||
img src=photo["value"] alt=photo["alt"]
|
img src=photo["value"] alt=photo["alt"]
|
||||||
figcaption
|
figcaption
|
||||||
= photo["alt"]
|
= photo["alt"]
|
||||||
== post.content
|
div class="e-content"
|
||||||
|
== post.content
|
||||||
|
|
||||||
div class="mb-4 max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
|
div class="mb-4 max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
|
||||||
|
|
||||||
div class="max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
|
div class="max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
|
||||||
div class=""
|
div class=""
|
||||||
= "Published #{post.display_published_at}"
|
= "Published "
|
||||||
span class="text-right flex-1"
|
time class="dt-published" datetime=post.published_at
|
||||||
== render :tags, tags: post.tags
|
= post.display_published_at
|
||||||
div class="mb-2 max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
|
p
|
||||||
- if post.syndicated?
|
a class="p-author h-card" href=Hanami.app.settings.micropub_site_url
|
||||||
span Also on:
|
= "by #{Hanami.app.settings.site_name}"
|
||||||
- post.syndicated_to.each do |loc|
|
span class="text-right flex-1"
|
||||||
a href=loc[:url]
|
== render :tags, tags: post.tags
|
||||||
== render loc[:location]
|
div class="mb-2 max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
|
||||||
|
- if post.syndicated?
|
||||||
|
span Also on:
|
||||||
|
- post.syndicated_to.each do |loc|
|
||||||
|
a rel="syndication" class="u-syndication" href=loc[:url]
|
||||||
|
== render loc[:location]
|
||||||
|
@@ -4,5 +4,5 @@
|
|||||||
= "Tagged: "
|
= "Tagged: "
|
||||||
- tags.each do |tag|
|
- tags.each do |tag|
|
||||||
span
|
span
|
||||||
a class="rounded p-1 mr-1 text-xsm u-url bg-yellow-200/60 hover:bg-yellow-200 dark:bg-yellow-400 dark:hover:bg-yellow-400/80 dark:text-yellow-800 dark:hover:text-yellow-100 text-gray-600" href="/tagged/#{tag.slug}"
|
a class="p-category rounded p-1 mr-1 text-xsm u-url bg-yellow-200/60 hover:bg-yellow-200 dark:bg-yellow-400 dark:hover:bg-yellow-400/80 dark:text-yellow-800 dark:hover:text-yellow-100 text-gray-600" href="/tagged/#{tag.slug}"
|
||||||
= tag.label
|
= tag.label
|
||||||
|
Reference in New Issue
Block a user