From 9b44b88f7c7fb4b5a2934ad49f579150350f942b Mon Sep 17 00:00:00 2001 From: AnnyFigueira Date: Mon, 16 Jan 2023 19:11:27 -0300 Subject: [PATCH] :bug: fix build --- i18n/en-US/components/Post.yml | 0 package.json | 2 +- src/Translatable.njs | 22 +-- tailwind.css | 312 +++++++-------------------------- 4 files changed, 77 insertions(+), 259 deletions(-) delete mode 100644 i18n/en-US/components/Post.yml diff --git a/i18n/en-US/components/Post.yml b/i18n/en-US/components/Post.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/package.json b/package.json index 7690297a..e3467233 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "ISC", "devDependencies": { "concurrently": "^7.2.0", - "nullstack": "~0.16.0", + "nullstack": "~0.17.2", "tailwindcss": "^3.0.0" }, "scripts": { diff --git a/src/Translatable.njs b/src/Translatable.njs index dd2ecd63..ccf500d1 100644 --- a/src/Translatable.njs +++ b/src/Translatable.njs @@ -1,13 +1,16 @@ -import { readFileSync } from 'fs'; -import Nullstack from 'nullstack'; -import YAML from 'yaml'; +import { existsSync, readFileSync } from "fs"; +import Nullstack from "nullstack"; +import YAML from "yaml"; class Translatable extends Nullstack { - static async geti18nByLocale({ locale }) { - const [name] = this.name.split('_'); - const file = readFileSync(`i18n/${locale}/components/${name}.yml`, 'utf-8'); - return YAML.parse(file); + const [name] = this.name.split("_"); + const translationPath = `i18n/${locale}/components/${name}.yml`; + if (existsSync(translationPath)) { + const file = readFileSync(translationPath, "utf-8"); + return YAML.parse(file); + } + return {}; } async initiate({ page, locale }) { @@ -15,7 +18,7 @@ class Translatable extends Nullstack { this.i18n = await this.geti18nByLocale({ locale }); if (this.i18n.title) { page.description = this.i18n.description; - page.locale = locale || 'en-US'; + page.locale = locale || "en-US"; } } @@ -30,7 +33,6 @@ class Translatable extends Nullstack { this.initiate(); } } - } -export default Translatable; \ No newline at end of file +export default Translatable; diff --git a/tailwind.css b/tailwind.css index ca6e0780..b8ed70e1 100644 --- a/tailwind.css +++ b/tailwind.css @@ -1,5 +1,5 @@ /* -! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com +! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com */ /* @@ -30,6 +30,7 @@ 2. Prevent adjustments of font size after orientation changes in iOS. 3. Use a more readable tab size. 4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. */ html { @@ -44,6 +45,8 @@ html { /* 3 */ font-family: 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"; /* 4 */ + font-feature-settings: normal; + /* 5 */ } /* @@ -410,54 +413,13 @@ video { height: auto; } -*, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden] { + display: none; } -::-webkit-backdrop { +*, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; @@ -590,6 +552,11 @@ video { max-width: 65ch; } +.prose :where(p):not(:where([class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; +} + .prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) { color: var(--tw-prose-lead); font-size: 1.25em; @@ -931,11 +898,6 @@ video { line-height: 1.75; } -.prose :where(p):not(:where([class~="not-prose"] *)) { - margin-top: 1.25em; - margin-bottom: 1.25em; -} - .prose :where(video):not(:where([class~="not-prose"] *)) { margin-top: 2em; margin-bottom: 2em; @@ -1036,151 +998,6 @@ video { scroll-margin-top: 8rem; } -.prose-sm :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { - margin-top: 0.5714286em; - margin-bottom: 0.5714286em; -} - -.prose-sm :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.1428571em; -} - -.prose-sm :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.1428571em; -} - -.prose-sm :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.1428571em; -} - -.prose-sm :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.1428571em; -} - -.prose-sm :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { - margin-top: 0; -} - -.prose-sm :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 0; -} - -.prose-base :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { - margin-top: 0.75em; - margin-bottom: 0.75em; -} - -.prose-base :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.25em; -} - -.prose-base :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.25em; -} - -.prose-base :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.25em; -} - -.prose-base :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.25em; -} - -.prose-base :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { - margin-top: 0; -} - -.prose-base :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 0; -} - -.prose-lg :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { - margin-top: 0.8888889em; - margin-bottom: 0.8888889em; -} - -.prose-lg :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.3333333em; -} - -.prose-lg :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.3333333em; -} - -.prose-lg :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.3333333em; -} - -.prose-lg :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.3333333em; -} - -.prose-lg :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { - margin-top: 0; -} - -.prose-lg :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 0; -} - -.prose-xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { - margin-top: 0.8em; - margin-bottom: 0.8em; -} - -.prose-xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.2em; -} - -.prose-xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.2em; -} - -.prose-xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.2em; -} - -.prose-xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.2em; -} - -.prose-xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { - margin-top: 0; -} - -.prose-xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 0; -} - -.prose-2xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { - margin-top: 0.8333333em; - margin-bottom: 0.8333333em; -} - -.prose-2xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.3333333em; -} - -.prose-2xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.3333333em; -} - -.prose-2xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { - margin-top: 1.3333333em; -} - -.prose-2xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 1.3333333em; -} - -.prose-2xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { - margin-top: 0; -} - -.prose-2xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { - margin-bottom: 0; -} - .static { position: static; } @@ -1767,8 +1584,7 @@ video { } .underline { - -webkit-text-decoration-line: underline; - text-decoration-line: underline; + text-decoration-line: underline; } .opacity-80 { @@ -1800,9 +1616,9 @@ video { } .transition { - transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } @@ -1843,53 +1659,6 @@ video { color: rgb(255 255 255 / var(--tw-text-opacity)); } -.dark .dark\:prose-dark { - color: #d1d5db; -} - -.dark .dark\:prose-dark :where(blockquote):not(:where([class~="not-prose"] *)) { - border-left-color: #374151; - color: #d1d5db; -} - -.dark .dark\:prose-dark :where(a):not(:where([class~="not-prose"] *)) { - color: #d1d5db; -} - -.dark .dark\:prose-dark :where(code):not(:where([class~="not-prose"] *)) { - background-color: #1f2937; - color: #d1d5db; -} - -.dark .dark\:prose-dark :where(h2,h3,h4):not(:where([class~="not-prose"] *)) { - color: #f3f4f6; - scroll-margin-top: 8rem; -} - -.dark .dark\:prose-dark :where(hr):not(:where([class~="not-prose"] *)) { - border-color: #374151; -} - -.dark .dark\:prose-dark :where(ol):not(:where([class~="not-prose"] *)) li:before { - color: #6b7280; -} - -.dark .dark\:prose-dark :where(ul):not(:where([class~="not-prose"] *)) li:before { - background-color: #6b7280; -} - -.dark .dark\:prose-dark :where(strong):not(:where([class~="not-prose"] *)) { - color: #d1d5db; -} - -.dark .dark\:prose-dark :where(thead):not(:where([class~="not-prose"] *)) { - color: #f3f4f6; -} - -.dark .dark\:prose-dark :where(tbody):not(:where([class~="not-prose"] *)) tr { - border-bottom-color: #374151; -} - .dark .dark\:border-gray-800 { --tw-border-opacity: 1; border-color: rgb(31 41 55 / var(--tw-border-opacity)); @@ -1910,6 +1679,15 @@ video { background-color: rgb(254 240 138 / var(--tw-bg-opacity)); } +.dark .dark\:prose-dark { + color: #d1d5db; +} + +.dark .dark\:prose-dark :where(blockquote):not(:where([class~="not-prose"] *)) { + border-left-color: #374151; + color: #d1d5db; +} + .dark .dark\:text-white { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); @@ -1930,6 +1708,10 @@ video { color: rgb(209 213 219 / var(--tw-text-opacity)); } +.dark .dark\:prose-dark :where(a):not(:where([class~="not-prose"] *)) { + color: #d1d5db; +} + .dark .dark\:text-yellow-900 { --tw-text-opacity: 1; color: rgb(113 63 18 / var(--tw-text-opacity)); @@ -1940,6 +1722,40 @@ video { color: rgb(219 39 119 / var(--tw-text-opacity)); } +.dark .dark\:prose-dark :where(code):not(:where([class~="not-prose"] *)) { + background-color: #1f2937; + color: #d1d5db; +} + +.dark .dark\:prose-dark :where(h2,h3,h4):not(:where([class~="not-prose"] *)) { + color: #f3f4f6; + scroll-margin-top: 8rem; +} + +.dark .dark\:prose-dark :where(hr):not(:where([class~="not-prose"] *)) { + border-color: #374151; +} + +.dark .dark\:prose-dark :where(ol):not(:where([class~="not-prose"] *)) li:before { + color: #6b7280; +} + +.dark .dark\:prose-dark :where(ul):not(:where([class~="not-prose"] *)) li:before { + background-color: #6b7280; +} + +.dark .dark\:prose-dark :where(strong):not(:where([class~="not-prose"] *)) { + color: #d1d5db; +} + +.dark .dark\:prose-dark :where(thead):not(:where([class~="not-prose"] *)) { + color: #f3f4f6; +} + +.dark .dark\:prose-dark :where(tbody):not(:where([class~="not-prose"] *)) tr { + border-bottom-color: #374151; +} + .dark .dark\:opacity-10 { opacity: 0.1; }