Update home

This commit is contained in:
2023-02-25 13:57:42 +11:00
parent 1af509ec60
commit a5e2cf28c8
3 changed files with 11 additions and 7 deletions

View File

@@ -41,15 +41,9 @@ html
span class="text-gray-400 dark:text-gray-600" span class="text-gray-400 dark:text-gray-600"
= "/" = "/"
a class="p-1 rounded text-gray-400 hover:bg-blue-100 hover:text-blue-400 dark:hover:bg-blue-200" href="/posts" Writing a class="p-1 rounded text-gray-400 hover:bg-blue-100 hover:text-blue-400 dark:hover:bg-blue-200" href="/posts" Writing
span class="text-gray-400 dark:text-gray-600"
= "/"
a class="p-1 rounded text-gray-400 hover:bg-yellow-100 hover:text-yellow-600 dark:hover:bg-yellow-200 #{link_active?('bookmarks') ? 'text-yellow-600 dark:text-yellow-600' : ''}" href="/bookmarks" Bookmarks
span class="text-gray-400 dark:text-gray-600" span class="text-gray-400 dark:text-gray-600"
= "/" = "/"
a class="p-1 rounded text-gray-400 hover:bg-orange-100 hover:text-orange-400 dark:hover:bg-orange-200" href="#{Hanami.app.settings.micropub_site_url}/feeds/rss" RSS a class="p-1 rounded text-gray-400 hover:bg-orange-100 hover:text-orange-400 dark:hover:bg-orange-200" href="#{Hanami.app.settings.micropub_site_url}/feeds/rss" RSS
// span class="text-gray-400 dark:text-gray-600"
= "/"
// a class="text-green-600 hover:text-gray-800 dark:hover:text-gray-200" href="/art-things" Art things
== yield == yield
div class="px-4 max-w-screen-md mx-auto pb-10" div class="px-4 max-w-screen-md mx-auto pb-10"
p class="text-gray-200 dark:text-gray-600" © 2023 Daniel Nitsikopoulos. All rights reserved. p class="text-gray-200 dark:text-gray-600" © 2023 Daniel Nitsikopoulos. All rights reserved.

View File

@@ -1,4 +1,4 @@
div class="h-card mb-12 max-w-prose mx-auto text-gray-800 dark:text-gray-200" div class="h-card prose dark:prose-invert mb-12 max-w-prose mx-auto text-gray-800 dark:text-gray-200"
p class="p-note" p class="p-note"
== home_content == home_content
@@ -12,4 +12,8 @@ div class="mb-12 max-w-prose mx-auto"
- posts.each do |post| - posts.each do |post|
== render :post, post: post == render :post, post: post
div class="grid grid-cols-3 gap-4 mb-4 max-w-prose mx-auto"
- photo_posts.each do |post|
== render :photo_post, post: post
div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600" div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"

View File

@@ -15,6 +15,12 @@ module Adamantium
Decorators::Posts::Decorator.new(post) Decorators::Posts::Decorator.new(post)
end end
end end
expose :photo_posts do
post_repo.photo_listing(limit: 12).map do |post|
Decorators::Posts::Decorator.new(post)
end
end
end end
end end
end end