Refactor app in to its own slice
This commit is contained in:
60
slices/main/templates/site/home.html.slim
Normal file
60
slices/main/templates/site/home.html.slim
Normal file
@@ -0,0 +1,60 @@
|
||||
- context.content_for(:title, "")
|
||||
|
||||
div class="h-card prose dark:prose-invert mb-12 prose-a:decoration-wavy hover:prose-a:text-blue-400 max-w-prose mx-auto text-gray-800 dark:text-gray-200"
|
||||
p class="p-note"
|
||||
== home_content
|
||||
|
||||
div class="mb-8 max-w-screen-md mx-auto border-t border-solid border-gray-200 dark:border-gray-600"
|
||||
|
||||
- if latest_status
|
||||
div class="h-entry mb-12 p-2 grid grid-cols-7 gap-4 min-h-16 max-w-prose mx-auto bg-fuchsia-100 dark:bg-fuchsia-800 dark:text-gray-200 rounded"
|
||||
div class="col-span-7 sm:col-span-6 text-left"
|
||||
a class="u-url block my-auto hover:underline decoration-wavy" href=latest_status.permalink
|
||||
span class="e-content status-body"
|
||||
- if latest_status.key_image
|
||||
img class="float-start max-w-32 rounded mr-2" src=latest_status.key_image
|
||||
p
|
||||
== latest_status.raw_content
|
||||
- latest_status.syndicated_to.each do |loc|
|
||||
small class="text-fuchsia-900 dark:text-fuchsia-300"
|
||||
a rel="syndication" class="u-syndication" href=loc[:url] Read on #{loc[:location]}
|
||||
a class="col-span-7 sm:col-span-1 px-2 text-center transition-colors rounded bg-fuchsia-50 hover:bg-fuchsia-200 dark:bg-fuchsia-900 dark:hover:bg-fuchsia-700 inline-block grid content-center max-h-12 my-auto" href="/statuses"
|
||||
p See all
|
||||
|
||||
div class="flex justify-between max-w-prose mx-auto mb-2"
|
||||
h2 class="text-xl text-amber-600 dark:text-amber-200" Weekly posts
|
||||
a class="rounded px-2 text-amber-600 hover:dark:bg-amber-900 hover:dark:text-amber-100 dark:text-amber-200 hover:text-amber-600 hover:bg-amber-100" href="/tagged/weekly" See all →
|
||||
|
||||
div class="mb-12 max-w-prose mx-auto bg-amber-100 rounded dark:bg-amber-900 dark:text-gray-100"
|
||||
ul class="columns-1"
|
||||
- week_posts.each do |post|
|
||||
li class=""
|
||||
a class="block content-justify hover:bg-amber-200 decoration-wavy rounded py-1.5 px-2" href="/post/#{post.slug}"
|
||||
div class="flex justify-between"
|
||||
span class="grow-0 inline-block pr-2" = post.name
|
||||
span class="border-b border-amber-400 dark:border-amber-600 -top-3 relative border-dashed grow inline-block"
|
||||
span class="grow-0 inline-block pl-2" = post.display_published_at
|
||||
|
||||
div class="flex justify-between max-w-prose mx-auto mb-2"
|
||||
h2 class="text-xl text-blue-600 dark:text-blue-200" 📯 Posts
|
||||
a class="rounded px-2 h-6 text-blue-600 hover:dark:bg-blue-900 hover:dark:text-blue-100 dark:text-blue-200 hover:text-blue-600 hover:bg-blue-100" href="/posts" See all →
|
||||
|
||||
div class="h-feed mb-12 max-w-prose mx-auto"
|
||||
- posts.each do |post|
|
||||
== render "shared/post", post: post
|
||||
|
||||
div class="flex justify-between max-w-prose mx-auto mb-2"
|
||||
h2 class="text-xl text-blue-600 dark:text-blue-200" 📸 Photos
|
||||
a class="rounded px-2 h-6 text-blue-600 hover:dark:bg-blue-900 hover:dark:text-blue-100 dark:text-blue-200 hover:text-blue-600 hover:bg-blue-100" href="/photos" See all →
|
||||
|
||||
div class="grid grid-cols-3 gap-4 max-w-prose mx-auto"
|
||||
- photo_posts.each do |post|
|
||||
== render "shared/photo_post", post: post, extended: false
|
||||
|
||||
- if last_location
|
||||
div class="mb-12 mt-6 max-w-prose mx-auto text-gray-600 dark:text-gray-200 rounded p-2 bg-blue-50 dark:bg-blue-900/60"
|
||||
div
|
||||
= "🗺️ Last seen at "
|
||||
a class="text-blue-400 hover:text-blue-600" href=last_location.permalink
|
||||
= last_location.display_title
|
||||
div class="max-w-screen-md mx-auto border-t border-solid border-gray-200 dark:border-gray-600"
|
Reference in New Issue
Block a user