Skip to content

Commit b85da90

Browse files
committed
feat: update styles and improve mastodon link
* add new color variables for dark mode * update mastodon link icon to use color variant * enhance comment section styles Signed-off-by: Charles Chin <[email protected]>
1 parent 2c88238 commit b85da90

File tree

5 files changed

+39
-9
lines changed

5 files changed

+39
-9
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"friendslinks",
2727
"Geeker",
2828
"goldmark",
29+
"gotosocial",
2930
"hasard",
3031
"hugomod",
3132
"HUGOMODS",

assets/css/main.css

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@
77
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
88
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
99
"Courier New", monospace;
10-
--color-red-400: oklch(70.4% 0.191 22.216);
1110
--color-red-500: oklch(63.7% 0.237 25.331);
1211
--color-orange-600: oklch(64.6% 0.222 41.116);
1312
--color-yellow-400: oklch(85.2% 0.199 91.936);
14-
--color-green-100: oklch(96.2% 0.044 156.743);
15-
--color-green-400: oklch(79.2% 0.209 151.711);
1613
--color-green-500: oklch(72.3% 0.219 149.579);
17-
--color-green-800: oklch(44.8% 0.119 151.328);
1814
--color-blue-100: oklch(93.2% 0.032 255.585);
1915
--color-blue-300: oklch(80.9% 0.105 251.813);
2016
--color-blue-400: oklch(70.7% 0.165 254.624);
@@ -2021,6 +2017,9 @@
20212017
.text-zinc-700 {
20222018
color: var(--color-zinc-700);
20232019
}
2020+
.text-zinc-800 {
2021+
color: var(--color-zinc-800);
2022+
}
20242023
.text-zinc-900 {
20252024
color: var(--color-zinc-900);
20262025
}
@@ -2468,6 +2467,13 @@
24682467
}
24692468
}
24702469
}
2470+
.hover\:text-zinc-950 {
2471+
&:hover {
2472+
@media (hover: hover) {
2473+
color: var(--color-zinc-950);
2474+
}
2475+
}
2476+
}
24712477
.hover\:underline {
24722478
&:hover {
24732479
@media (hover: hover) {
@@ -3177,6 +3183,11 @@
31773183
color: #adbac7;
31783184
}
31793185
}
3186+
.dark\:text-\[\#e7e9eb\] {
3187+
&:where(.dark, .dark *) {
3188+
color: #e7e9eb;
3189+
}
3190+
}
31803191
.dark\:text-gray-400 {
31813192
&:where(.dark, .dark *) {
31823193
color: var(--color-gray-400);
@@ -3295,6 +3306,24 @@
32953306
}
32963307
}
32973308
}
3309+
.dark\:hover\:text-\[\#e7e9eb\] {
3310+
&:where(.dark, .dark *) {
3311+
&:hover {
3312+
@media (hover: hover) {
3313+
color: #e7e9eb;
3314+
}
3315+
}
3316+
}
3317+
}
3318+
.dark\:hover\:text-\[\#fff\] {
3319+
&:where(.dark, .dark *) {
3320+
&:hover {
3321+
@media (hover: hover) {
3322+
color: #fff;
3323+
}
3324+
}
3325+
}
3326+
}
32983327
.dark\:hover\:text-zinc-800 {
32993328
&:where(.dark, .dark *) {
33003329
&:hover {

layouts/_default/mastodon.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,12 @@ <h1 id="title" class="text-4xl font-bold leading-normal">{{ .Title }}</h1>
431431
</div>
432432
<div class="flex-1 flex flex-row items-start min-w-0">
433433
<div class="flex flex-col flex-wrap items-start gap-0 mb-1">
434-
<span class="mt-accout-name font-semibold hover:font-extrabold text-zinc-700-700 hover:text-zinc-900">${post.reblog ? post.reblog.account.display_name : 'Charles Chin'}</span>
435-
<a href="https://e5n.cc/@eallion" target="_blank" rel="noopener noreferrer" class="mt-accout-id text-base decoration-auto no-underline hover:underline">${post.reblog ? post.reblog.account.acct : '@[email protected]'}</a>
434+
<span class="mt-accout-name font-semibold hover:font-extrabold text-zinc-700 dark:text-[#e7e9eb] hover:text-zinc-900 dark:hover:text-[#fff]">${post.reblog ? post.reblog.account.display_name : 'Charles Chin'}</span>
435+
<a href="https://e5n.cc/@eallion" target="_blank" rel="noopener noreferrer" class="mt-accout-id text-base decoration-auto no-underline hover:underline text-zinc-800 dark:text-[#adbac7] hover:text-zinc-950 dark:hover:text-[#e7e9eb]">${post.reblog ? post.reblog.account.acct : '@[email protected]'}</a>
436436
</div>
437437
<div class="inline md:hidden px-2 py-1.5 text-zinc-700 hover:text-zinc-900 text-sm ml-auto">
438438
<span class="mt-footer-date" data-created-at="${post.created_at}">
439-
<a href="${post.url || 'https://e5n.cc/@eallion'}" target="_blank" rel="noopener noreferrer" class="no-underline text-zinc-600 hover:text-zinc-900-700">-</a>
439+
<a href="${post.url || 'https://e5n.cc/@eallion'}" target="_blank" rel="noopener noreferrer" class="no-underline text-zinc-600 hover:text-zinc-900">-</a>
440440
</span>
441441
</div>
442442
<div class="hidden md:flex flex-row items-center gap-1.5 ml-auto px-2 text-sm ">

layouts/partials/comments.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h2 class="text-xl font-semibold">评论</h2>
1212
<div id="load-giscus-desc" class="block md:inline-block text-sm md:text-base lowercase md:capitalize mx-4">或者</div>
1313
<div id="link-to-mastodon" class="flex items-center relative border dark:border-[#cdd9e51a] bg-white dark:bg-[#22272e] rounded-full px-4 py-2 hover:bg-zinc-200 dark:hover:bg-[#252a33]">
1414
<span class="cursor-pointer"></span>
15-
<span class="ml-2 mr-1 cursor-pointer"><span class="relative block icon">{{ partial "icon.html" (dict "name" "mastodon-purple" "class" "") }}</span></span>
15+
<span class="ml-2 mr-1 cursor-pointer"><span class="relative block icon">{{ partial "icon.html" (dict "name" "mastodon-color" "class" "") }}</span></span>
1616
<span class='ml-1 opacity-75 hover:opacity-100 cursor-pointer duration-300 ease-in-out'>
1717
<a href="https://api.eallion.com/gts/{{ .Params.slug | default .File.TranslationBaseName }}" target="_blank" rel="noopener">Mastodon</a>
1818
</span>

0 commit comments

Comments
 (0)