diff --git a/assets/main.css b/assets/main.css index 62c4614..d3c7259 100644 --- a/assets/main.css +++ b/assets/main.css @@ -2,47 +2,6 @@ @tailwind components; @tailwind utilities; -html { - font-family: theme("fontFamily.main"); - font-size: theme("fontSize.2xl"); -} - -body { - min-height: 100vh; - display: flex; - flex-direction: column; -} - -/* Color scheme */ - -.color-scheme--sync .color-scheme--light-icon { - display: none; -} - -.color-scheme--sync .color-scheme--dark-icon { - display: block; -} - -@media (prefers-color-scheme: dark) { - .color-scheme--sync .color-scheme--light-icon { - display: block; - } - - .color-scheme--sync .color-scheme--dark-icon { - display: none; - } -} - -.color-scheme--dark .color-scheme--dark-icon, -.color-scheme--light .color-scheme--light-icon { - display: none; -} - -.color-scheme--dark .color-scheme--light-icon, -.color-scheme--light .color-scheme--dark-icon { - display: block; -} - /* Typography */ .prose :is(p, h1, h2, h3, h4, h5, h6, ul, ol, li, pre) { @@ -55,25 +14,10 @@ body { .link, .prose a { - @apply text-red-900 border-b-4 border-red-500/25; + @apply text-red-900 hover:text-red-600 dark:text-red-200 dark:hover:text-red-400 border-b-4 border-red-500/25 dark:border-red-200/25; transition: color 200ms; } -.link:hover, -.prose a:hover { - @apply text-red-600; -} - -.dark .link, -.dark .prose a { - @apply text-red-200 border-red-200/25; -} - -.dark .link:hover, -.dark .prose a:hover { - color: theme("colors.red.400"); -} - :is(.list, .prose ul) li { position: relative; margin-left: 1.5em; @@ -89,8 +33,7 @@ body { .subheading, .prose h3 { - @apply text-sm font-bold; - color: theme("colors.red.800"); + @apply text-sm font-bold text-red-800 dark:text-red-300; } :is(.subheading, .prose h3)::before { @@ -107,7 +50,7 @@ body { .code-block, pre { - @apply bg-gray-100; + @apply bg-gray-100 dark:bg-gray-800; border-radius: 0.25em; overflow-x: auto; padding: 1em; @@ -116,7 +59,7 @@ pre { .code-inline, code { - @apply bg-gray-100; + @apply bg-gray-100 dark:bg-gray-800; padding: 0.125em 0.25em; border-radius: 0.25em; font-size: 0.875em; @@ -148,6 +91,16 @@ code { border-radius: 100px; } -.button:hover { - background-color: theme("colors.gray.200"); +.button--opaque { + @apply bg-white dark:bg-gray-900; +} + +.button:hover { + background-color: theme(colors.gray.400 / 25%); +} + +/* Utils */ + +html:not(.dark) .light\:hidden { + display: none; } diff --git a/assets/main.js b/assets/main.js index c900c6b..16dd75d 100644 --- a/assets/main.js +++ b/assets/main.js @@ -1,15 +1,13 @@ import Alpine from "alpinejs"; -import persist from "@alpinejs/persist"; window.Alpine = Alpine; -Alpine.plugin(persist); Alpine.start(); /* Copy button component */ -const copyIcon = ``; -const checkIcon = ``; +const copyIcon = ``; +const checkIcon = ``; const defaultButtonLabel = `Zkopírovat text do schránky`; const copiedButtonLabel = `Text zkopírován`; const revertTimeout = 5_000; @@ -32,7 +30,7 @@ navigator.permissions .forEach((codeBlock) => { const button = document.createElement("button"); button.innerHTML = defaultButtonContent; - button.className = "button absolute top-3 right-3 bg-white"; + button.className = "button button--opaque absolute top-3 right-3"; button.addEventListener("click", () => { navigator.clipboard.writeText(codeBlock.innerHTML).then(() => { diff --git a/assets/style.css b/assets/style.css index 14d93d0..b96eea7 100644 --- a/assets/style.css +++ b/assets/style.css @@ -16,7 +16,7 @@ /* 2 */ border-style: solid; /* 2 */ - border-color: #e5e7eb; + border-color: #e4e4e7; /* 2 */ } @@ -351,7 +351,7 @@ textarea { input::-moz-placeholder, textarea::-moz-placeholder { opacity: 1; /* 1 */ - color: #9ca3af; + color: #a1a1aa; /* 2 */ } @@ -359,7 +359,7 @@ input::placeholder, textarea::placeholder { opacity: 1; /* 1 */ - color: #9ca3af; + color: #a1a1aa; /* 2 */ } @@ -704,6 +704,10 @@ video { display: none; } +.min-h-screen { + min-height: 100vh; +} + .max-w-screen-md { max-width: 768px; } @@ -782,14 +786,29 @@ video { background-color: rgb(185 28 28 / var(--tw-bg-opacity)); } -.bg-gray-100 { +.bg-gray-50 { --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); + background-color: rgb(250 250 250 / var(--tw-bg-opacity)); } -.bg-white { +.bg-gray-100 { --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + background-color: rgb(244 244 245 / var(--tw-bg-opacity)); +} + +.bg-red-800 { + --tw-bg-opacity: 1; + background-color: rgb(153 27 27 / var(--tw-bg-opacity)); +} + +.bg-red-900 { + --tw-bg-opacity: 1; + background-color: rgb(127 29 29 / var(--tw-bg-opacity)); +} + +.bg-gray-800 { + --tw-bg-opacity: 1; + background-color: rgb(39 39 42 / var(--tw-bg-opacity)); } .px-6 { @@ -812,6 +831,10 @@ video { padding-bottom: 1.5rem; } +.pt-6 { + padding-top: 1.5rem; +} + .pt-4 { padding-top: 1rem; } @@ -824,6 +847,15 @@ video { padding-bottom: 3rem; } +.font-main { + font-family: Spline Sans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + .text-sm { font-size: 0.875rem; line-height: 1.25rem; @@ -847,14 +879,22 @@ video { font-weight: 500; } +.leading-normal { + line-height: 1.5; +} + .text-white { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); } -.text-gray-500 { +.text-gray-900 { --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); + color: rgb(24 24 27 / var(--tw-text-opacity)); +} + +.text-gray-900\/50 { + color: rgb(24 24 27 / 0.5); } .transition-transform { @@ -863,47 +903,6 @@ video { transition-duration: 150ms; } -html { - font-family: Spline Sans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - font-size: 1.5rem; -} - -body { - min-height: 100vh; - display: flex; - flex-direction: column; -} - -/* Color scheme */ - -.color-scheme--sync .color-scheme--light-icon { - display: none; -} - -.color-scheme--sync .color-scheme--dark-icon { - display: block; -} - -@media (prefers-color-scheme: dark) { - .color-scheme--sync .color-scheme--light-icon { - display: block; - } - - .color-scheme--sync .color-scheme--dark-icon { - display: none; - } -} - -.color-scheme--dark .color-scheme--dark-icon, -.color-scheme--light .color-scheme--light-icon { - display: none; -} - -.color-scheme--dark .color-scheme--light-icon, -.color-scheme--light .color-scheme--dark-icon { - display: block; -} - /* Typography */ .prose :is(p, h1, h2, h3, h4, h5, h6, ul, ol, li, pre) { @@ -920,7 +919,6 @@ body { border-color: rgb(239 68 68 / 0.25); --tw-text-opacity: 1; color: rgb(127 29 29 / var(--tw-text-opacity)); - transition: color 200ms; } .link:hover, @@ -929,16 +927,22 @@ body { color: rgb(220 38 38 / var(--tw-text-opacity)); } -.dark .link, -.dark .prose a { +.dark .link,.dark +.prose a { border-color: rgb(254 202 202 / 0.25); --tw-text-opacity: 1; color: rgb(254 202 202 / var(--tw-text-opacity)); } -.dark .link:hover, -.dark .prose a:hover { - color: #f87171; +.dark .link:hover,.dark +.prose a:hover { + --tw-text-opacity: 1; + color: rgb(248 113 113 / var(--tw-text-opacity)); +} + +.link, +.prose a { + transition: color 200ms; } :is(.list, .prose ul) li { @@ -959,7 +963,14 @@ body { font-size: 0.875rem; line-height: 1.25rem; font-weight: 700; - color: #991b1b; + --tw-text-opacity: 1; + color: rgb(153 27 27 / var(--tw-text-opacity)); +} + +.dark .subheading,.dark +.prose h3 { + --tw-text-opacity: 1; + color: rgb(252 165 165 / var(--tw-text-opacity)); } :is(.subheading, .prose h3)::before { @@ -978,7 +989,17 @@ body { .code-block, pre { --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); + background-color: rgb(244 244 245 / var(--tw-bg-opacity)); +} + +.dark .code-block,.dark +pre { + --tw-bg-opacity: 1; + background-color: rgb(39 39 42 / var(--tw-bg-opacity)); +} + +.code-block, +pre { border-radius: 0.25em; overflow-x: auto; padding: 1em; @@ -988,7 +1009,17 @@ pre { .code-inline, code { --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); + background-color: rgb(244 244 245 / var(--tw-bg-opacity)); +} + +.dark .code-inline,.dark +code { + --tw-bg-opacity: 1; + background-color: rgb(39 39 42 / var(--tw-bg-opacity)); +} + +.code-inline, +code { padding: 0.125em 0.25em; border-radius: 0.25em; font-size: 0.875em; @@ -1008,7 +1039,7 @@ code { } } -@media (min-width: 1280px) { +@media (min-width: 1024px) { .clip-wedge { --wedge-skew: 5vw; } @@ -1021,8 +1052,52 @@ code { border-radius: 100px; } +.button--opaque { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.dark .button--opaque { + --tw-bg-opacity: 1; + background-color: rgb(24 24 27 / var(--tw-bg-opacity)); +} + .button:hover { - background-color: #e5e7eb; + background-color: rgb(161 161 170 / 25%); +} + +/* Utils */ + +html:not(.dark) .light\:hidden { + display: none; +} + +.dark .dark\:hidden { + display: none; +} + +.dark .dark\:border-gray-800 { + --tw-border-opacity: 1; + border-color: rgb(39 39 42 / var(--tw-border-opacity)); +} + +.dark .dark\:bg-gray-900 { + --tw-bg-opacity: 1; + background-color: rgb(24 24 27 / var(--tw-bg-opacity)); +} + +.dark .dark\:bg-gray-800 { + --tw-bg-opacity: 1; + background-color: rgb(39 39 42 / var(--tw-bg-opacity)); +} + +.dark .dark\:text-gray-50 { + --tw-text-opacity: 1; + color: rgb(250 250 250 / var(--tw-text-opacity)); +} + +.dark .dark\:text-gray-50\/50 { + color: rgb(250 250 250 / 0.5); } @media not all and (min-width: 1024px) { @@ -1109,4 +1184,8 @@ code { .lg\:pb-2 { padding-bottom: 0.5rem; } + + .dark .dark\:lg\:bg-transparent { + background-color: transparent; + } } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index cb1b474..809a7da 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - +
@@ -13,9 +13,9 @@