Update dark view

This commit is contained in:
2023-10-30 19:22:25 +11:00
parent 23909b9e29
commit 65539fa039
13 changed files with 2933 additions and 27 deletions

View File

@@ -4,7 +4,7 @@ div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:
h1 = bookmark.name
div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200" x-data="{ open: false }"
a class="text-blue-600 no-underline hover:underline" href=bookmark.url
a class="text-blue-600 dark:text-amber-500 no-underline hover:underline" href=bookmark.url
p class="text-xl text-ellipsis overflow-hidden"
= bookmark.url

View File

@@ -21,7 +21,7 @@ html
link rel="me" href=Hanami.app.settings.mastodon_url
link rel="me" href=Hanami.app.settings.github_url
link rel="stylesheet" href=assets["index.css"]
link rel="stylesheet" href=context.asset_by_name("index.css")
link rel="icon" type="image/x-icon" href="/assets/favicon.ico"
script data-domain="dnitza.com" src="https://stats.dnitza.com/js/script.js" defer="true"
@@ -36,7 +36,7 @@ html
- if Hanami.app.settings.micropub_pub_key
link rel="pgpkey" href="/key"
body class="bg-white dark:bg-black selection:bg-blue-100 selection:text-blue-900 dark:selection:bg-blue-600 dark:selection:text-blue-100" x-data="{ imgModal : false, imgModalSrc : '', imgModalDesc : '' }" x-on:keydown.escape="imgModal=false"
body class="bg-white dark:bg-indigo-950 selection:bg-blue-100 selection:text-blue-900 dark:selection:bg-blue-600 dark:selection:text-blue-100" x-data="{ imgModal : false, imgModalSrc : '', imgModalDesc : '' }" x-on:keydown.escape="imgModal=false"
main class="pb-8 px-4 pt-4 md:pt-8"
header class="mb-12 max-w-screen-md mx-auto"
div class="flex items-center mb-8 md:mb-12 text-lg md:text-xl text-gray-400 dark:text-gray-600"
@@ -55,7 +55,7 @@ html
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
== yield
div class="px-4 max-w-screen-md mx-auto pb-10"
p class="float-left text-gray-200 dark:text-gray-600" © 2023 Daniel Nitsikopoulos. All rights reserved.
p class="float-left text-gray-200 dark:text-indigo-900" © 2023 Daniel Nitsikopoulos. All rights reserved.
p class="float-right text-gray-200 dark:text-gray-600"
a href="https://xn--sr8hvo.ws/%F0%9F%8D%93%E2%9E%97%F0%9F%8E%B0/previous" ←
a href="https://xn--sr8hvo.ws" 🕸💍

View File

@@ -1,7 +1,7 @@
- context.content_for(:title, "")
- context.content_for(:highlight_code, false)
article class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200 prose-em:font-bold prose-em:not-italic prose-em:bg-blue-600 prose-em:px-1 prose-em:rounded prose-a:text-blue-600 prose-a:p-0.5 prose-a:rounded-sm prose-a:no-underline hover:prose-a:underline prose-em:text-blue-100"
article class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200 prose-em:font-bold prose-em:not-italic prose-em:bg-blue-600 prose-em:px-1 prose-em:rounded prose-a:text-blue-600 prose-a:dark:text-indigo-300 prose-a:p-0.5 prose-a:rounded-sm prose-a:no-underline hover:prose-a:underline prose-em:text-blue-100"
== page_content
div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"

View File

@@ -70,7 +70,7 @@ article class="h-entry"
- if past_movies.count > 0
div class="max-w-prose mx-auto text-gray-600 dark:text-gray-200 mb-4"
h3 class="text-xl" Movies watched for the first time
h3 class="text-xl" Movies watched for the first time this week
div class="flex gap-4 pb-4 mt-4"
- past_movies.map do |movie|
a href=movie.url
@@ -110,13 +110,13 @@ article class="h-entry"
p
span in 
- if post.posted_in == :posts
a class="hover:underline text-blue-400 dark:text-blue-600" href="/posts" posts
a class="hover:underline text-blue-400 dark:text-indigo-300" href="/posts" posts
- if post.posted_in == :places
a class="hover:underline text-blue-400 dark:text-blue-600" href="/places" places
a class="hover:underline text-blue-400 dark:text-indigo-300" href="/places" places
- if post.posted_in == :statuses
a class="hover:underline text-blue-400 dark:text-blue-600" href="/statuses" statuses
a class="hover:underline text-blue-400 dark:text-indigo-300" href="/statuses" statuses
- if post.posted_in == :bookshelf
a class="hover:underline text-blue-400 dark:text-blue-600" href="/bookshelf" bookshelf
a class="hover:underline text-blue-400 dark:text-indigo-300" href="/bookshelf" bookshelf
span class="text-right flex-1 leading-6"
== render "shared/tags", tags: post.tags
div class="mb-2 max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"

View File

@@ -1,7 +1,7 @@
div class="mb-4"
div class="mb-4"
h3 class="text-xl text-blue-600"
a class="u-url border-b-2 border-transparent hover:border-blue-600 hover:border-b-2" href="/bookmark/#{bookmark.slug}"
h3 class="text-xl text-blue-600 dark:text-slate-200 mb-2"
a class="u-url border-b-2 border-transparent hover:border-blue-600 hover:dark:border-slate-200 hover:border-b-2" href="/bookmark/#{bookmark.slug}"
= "#{bookmark.name} "
small class="text-gray-400 hover:text-gray-600"

View File

@@ -1,14 +1,14 @@
div class="mb-2 h-entry relative"
- if !first
div class="-top-4 absolute rounded-full border-2 bg-orange-100 border-orange-200 p-1 w-1 h-2 inline-block dark:border-orange-400 dark:bg-orange-400"
div class="-top-4 absolute rounded-full border-2 bg-orange-100 border-orange-200 p-1 w-1 h-2 inline-block dark:border-amber-400 dark:bg-amber-400"
- if first
div class="inline-block mb-2"
div class="inline-block mb-2 dark:text-indigo-400"
span class="mr-2"
= "🛬"
= trip.start_date
div class="ml-[5] #{ last ? '' : 'mb-[20]'} pl-6 border-solid border-l-2 border-orange-200 dark:border-orange-400"
h3 class="text-xl font-semibold text-blue-600"
div class="ml-[5] #{ last ? '' : 'mb-[20]'} pl-6 border-solid border-l-2 border-orange-200 dark:border-amber-400"
h3 class="text-xl font-semibold text-blue-600 dark:text-indigo-300"
a class="border-b-2 border-transparent hover:border-blue-600 hover:border-b-2" href="/post/#{post.slug}"
= post.name
div class="e-content prose-p:mb-0 prose-img:my-2 prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline p-name text-base prose prose-ul:list-none prose-ul:pl-0 prose-li:pl-0 text-gray-800 dark:text-gray-200 prose-a:dark:text-gray-100"
@@ -17,12 +17,12 @@ div class="mb-2 h-entry relative"
-post.photos.each do |photo|
img class="w-44 h-44 object-cover rounded" src=photo["value"]
p class="text-sm text-blue-400"
p class="text-sm text-blue-400 dark:text-indigo-50"
a class="u-url" href="#{post.permalink}"
time class="dt-published" datetime=post.machine_published_at
= post.display_published_at
- if last
div class="inline-block mb-6"
div class="inline-block mb-6 dark:text-indigo-400"
span class="mr-2"
= "🛫"
= trip.end_date

View File

@@ -1,6 +1,6 @@
div class="mb-8 h-entry"
h3 class="text-xl text-blue-600 mb-2"
a class="border-b-2 border-transparent hover:border-blue-600 hover:border-b-2" href="/post/#{post.slug}"
h3 class="text-xl text-blue-600 dark:text-indigo-300 mb-2"
a class="border-b-2 border-transparent hover:border-blue-600 hover:dark:border-indigo-300 hover:border-b-2" href="/post/#{post.slug}"
= post.display_title
div class="e-content prose-p:mb-0 prose-img:my-2 prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline p-name text-base prose prose-ul:list-none prose-ul:pl-0 prose-li:pl-0 text-gray-800 dark:text-gray-200 prose-a:dark:text-gray-100"
== post.excerpt
@@ -9,7 +9,7 @@ div class="mb-8 h-entry"
img class="w-44 h-44 object-cover rounded" src=photo["value"]
/ == render "shared/tags", tags: post.tags
p class="text-sm text-blue-400"
p class="text-sm text-blue-400 dark:text-indigo-400"
a class="u-url" href="#{post.permalink}"
time class="dt-published" datetime=post.machine_published_at
= post.display_published_at

View File

@@ -1,4 +1,4 @@
div class="mb-8 h-entry border border-gray-200 m-2 p-4 bg-gray-50 hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:hover:bg-gray-900 hover:dark:border-gray-800 rounded"
div class="mb-8 h-entry border border-gray-200 m-2 p-4 bg-gray-50 hover:bg-gray-100 dark:border-slate-800 dark:bg-slate-900 dark:hover:bg-slate-950 hover:dark:border-slate-900 rounded"
a class="border-b-2 border-transparent hover:border-blue-600 hover:border-b-2" href="/post/#{post.slug}"
div class="e-content prose-p:mb-0 prose-img:my-2 prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline p-name text-base prose prose-ul:list-none prose-ul:pl-0 prose-li:pl-0 text-gray-800 dark:text-gray-200 prose-a:dark:text-gray-100 mb-4"
= " 💬 #{post.raw_content}"
@@ -8,7 +8,7 @@ div class="mb-8 h-entry border border-gray-200 m-2 p-4 bg-gray-50 hover:bg-gray-
== render "shared/tags", tags: post.tags
div class="mb-8"
p class="text-sm text-blue-400"
p class="text-sm text-blue-400 dark:text-indigo-400"
a class="u-url float-left mr-0" href="#{post.permalink}"
time class="dt-published" datetime=post.machine_published_at
= post.display_published_at

View File

@@ -4,5 +4,5 @@
= "Tagged: "
- tags.each do |post_tag|
span
a class="p-category rounded p-1 mr-1 text-xsm u-url bg-yellow-100/60 hover:bg-yellow-200 dark:bg-yellow-400/60 dark:hover:bg-yellow-400/80 dark:text-yellow-100 dark:hover:text-yellow-100 text-gray-600" href="/tagged/#{post_tag.slug}"
a class="p-category rounded p-1 mr-1 text-xsm u-url bg-yellow-100/60 hover:bg-yellow-200 dark:bg-amber-400/60 dark:hover:bg-amber-400/80 dark:text-amber-100 dark:hover:text-yellow-100 text-gray-600" href="/tagged/#{post_tag.slug}"
= post_tag.label

View File

@@ -9,7 +9,7 @@ div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:
- tags.each do |post_tag|
span class="inline-block mb-2"
a class="p-category no-underline rounded p-1 mr-1 text-xsm u-url bg-yellow-100/60 hover:bg-yellow-200 dark:bg-yellow-400/60 dark:hover:bg-yellow-400/80 dark:text-yellow-50 dark:hover:text-yellow-100 text-gray-600" href="/tagged/#{post_tag.slug}"
a class="p-category no-underline rounded p-1 mr-1 text-xsm u-url bg-yellow-100/60 hover:bg-yellow-200 dark:bg-amber-400/60 dark:hover:bg-amber-400/80 dark:text-amber-50 dark:hover:text-amber-100 text-gray-600" href="/tagged/#{post_tag.slug}"
= post_tag.label
div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"

View File

@@ -14,7 +14,7 @@ div class="mb-4 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:t
td
a class="block" href="/trips/#{trip.id}"
= trip.name
span class="text-right text-sm text-gray-400 dark:text-gray-600 break-normal"
span class="text-right text-sm text-gray-400 dark:text-indigo-300 break-normal"
= "#{trip.start_date.strftime("%d %b")} — #{trip.end_date.strftime("%d %b")}"
td
= trip.subtitle

View File

@@ -0,0 +1,20 @@
module Adamantium
module Views
class Context < Hanami::View::Context
include Hanami::View::ContextHelpers::ContentHelpers
def initialize(**options)
@options = options
super(**options)
end
def asset_by_name(name)
if Hanami.env == :development
"/assets/#{name}"
else
assets[name]
end
end
end
end
end

File diff suppressed because one or more lines are too long