From a8855654be872be6e997f3c301649e765b6ccaac Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Fri, 16 May 2025 13:47:31 +1200 Subject: [PATCH 1/3] fix(title): replace title css with tailwind --- package-lock.json | 12 +++++++ package.json | 6 +++- src/components/Hero.astro | 4 +-- src/components/Title.astro | 18 ++++------ src/pages/[...locale]/404.astro | 6 ++-- src/pages/[...locale]/privacy-policy.astro | 40 +++++++++++----------- src/utils/merge.ts | 6 ++++ 7 files changed, 56 insertions(+), 36 deletions(-) create mode 100644 src/utils/merge.ts diff --git a/package-lock.json b/package-lock.json index 3185d16..6e0dc39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "astro": "^5.7.10", "astro-navbar": "^2.3.7", "autoprefixer": "10.4.14", + "clsx": "^2.1.1", "date-fns": "^4.1.0", "free-astro-components": "^1.1.1", "lucide-astro": "^0.460.0", @@ -29,6 +30,7 @@ "postcss": "^8.5.1", "preact": "^10.26.2", "sharp": "^0.33.5", + "tailwind-merge": "^3.3.0", "tailwindcss": "^3.4.15", "typescript": "^5.6.3" }, @@ -8405,6 +8407,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tailwind-merge": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.3.0.tgz", + "integrity": "sha512-fyW/pEfcQSiigd5SNn0nApUOxx0zB/dm6UDU/rEwc2c3sX2smWUNbapHv+QRqLGVp9GWX3THIa7MUGPo+YkDzQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "3.4.17", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", diff --git a/package.json b/package.json index 909318b..75ef3a5 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "astro": "^5.7.10", "astro-navbar": "^2.3.7", "autoprefixer": "10.4.14", + "clsx": "^2.1.1", "date-fns": "^4.1.0", "free-astro-components": "^1.1.1", "lucide-astro": "^0.460.0", @@ -35,6 +36,7 @@ "postcss": "^8.5.1", "preact": "^10.26.2", "sharp": "^0.33.5", + "tailwind-merge": "^3.3.0", "tailwindcss": "^3.4.15", "typescript": "^5.6.3" }, @@ -45,6 +47,8 @@ "wrangler": "^3.94.0" }, "lint-staged": { - "src/**/*.{ts,tsx,astro,js,jsx}": ["biome check --write ./src"] + "src/**/*.{ts,tsx,astro,js,jsx}": [ + "biome check --write ./src" + ] } } diff --git a/src/components/Hero.astro b/src/components/Hero.astro index d56c7be..5d2e893 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -69,13 +69,13 @@ const {
- - +
+

- \ No newline at end of file diff --git a/src/pages/[...locale]/404.astro b/src/pages/[...locale]/404.astro index 807838e..7549cef 100644 --- a/src/pages/[...locale]/404.astro +++ b/src/pages/[...locale]/404.astro @@ -17,7 +17,9 @@ const {
- 404 + + 404 +
{notFound.title} @@ -25,7 +27,7 @@ const {

{notFound.description}

-
diff --git a/src/pages/[...locale]/privacy-policy.astro b/src/pages/[...locale]/privacy-policy.astro index dd552b4..272b2a7 100644 --- a/src/pages/[...locale]/privacy-policy.astro +++ b/src/pages/[...locale]/privacy-policy.astro @@ -17,9 +17,9 @@ const { description={layout.privacyPolicy.description} >
- {privacyPolicy.title} + {privacyPolicy.title}
{privacyPolicy.lastUpdated}
- + <Title class="mt-16 text-4xl font-bold" id="introduction"> {privacyPolicy.sections.introduction.title}

{privacyPolicy.sections.introduction.body}

@@ -27,44 +27,44 @@ const { {privacyPolicy.sections.introduction.summary} {privacyPolicy.sections.noCollect.title}

{privacyPolicy.sections.noCollect.body}

-

+

{privacyPolicy.sections.noTelemetry.title}

{privacyPolicy.sections.noTelemetry.body}

{privacyPolicy.sections.noTelemetry.body2}

-

+

{privacyPolicy.sections.noPersonalData.title}

{privacyPolicy.sections.noPersonalData.body}

-

+

{privacyPolicy.sections.noThirdParty.title}

{privacyPolicy.sections.noThirdParty.body}

-

+

{privacyPolicy.sections.externalConnections.title}

{privacyPolicy.sections.externalConnections.body}

{privacyPolicy.sections.localStorage.title} -

+

{privacyPolicy.sections.browsingData.title} @@ -81,11 +81,11 @@ const { } -

+

{privacyPolicy.sections.settings.title}

{privacyPolicy.sections.settings.body}

- + <Title class="mt-16 text-4xl font-bold" id="3-sync-feature"> {privacyPolicy.sections.sync.title}

{privacyPolicy.sections.sync.body}

@@ -105,38 +105,38 @@ const { > - + <Title class="mt-16 text-4xl font-bold" id="4-add-ons-and-mods"> {privacyPolicy.sections.addons.title}

{privacyPolicy.sections.addons.body}

- + <Title class="mt-16 text-4xl font-bold" id="5-data-security"> {privacyPolicy.sections.security.title}

{privacyPolicy.sections.security.body}

  • {privacyPolicy.sections.security.note}
- + <Title class="mt-16 text-4xl font-bold" id="6-your-control"> {privacyPolicy.sections.control.title} -

+

{privacyPolicy.sections.control.deletionTitle}

{privacyPolicy.sections.control.deletionBody}

- + <Title class="mt-16 text-4xl font-bold" id="7-our-website-and-services"> {privacyPolicy.sections.website.title}

{privacyPolicy.sections.website.body}

-

{privacyPolicy.sections.website.externalLinksBody}

{privacyPolicy.sections.changes.title} @@ -145,7 +145,7 @@ const { {privacyPolicy.sections.changes.body} </p> <Title - class="mt-16 !text-4xl font-bold" + class="mt-16 text-4xl font-bold" id="9-other-telemetry-done-by-mozilla-firefox" > {privacyPolicy.sections.otherTelemetry.title} @@ -163,7 +163,7 @@ const { {privacyPolicy.sections.otherTelemetry.forMoreInformation} </li> </ul> - <Title class="mt-16 !text-4xl font-bold" id="10-contact-us"> + <Title class="mt-16 text-4xl font-bold" id="10-contact-us"> {privacyPolicy.sections.contact.title}

diff --git a/src/utils/merge.ts b/src/utils/merge.ts new file mode 100644 index 0000000..16a6562 --- /dev/null +++ b/src/utils/merge.ts @@ -0,0 +1,6 @@ +import { type ClassValue, clsx } from 'clsx' +import { twMerge } from 'tailwind-merge' + +export const cn = (...inputs: ClassValue[]) => { + return twMerge(clsx(inputs)) +} From aebea185d95564b8be0534c2215e7ebb527e4f0a Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Fri, 16 May 2025 13:48:57 +1200 Subject: [PATCH 2/3] chore(package): streamline lint-staged configuration in package.json --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 75ef3a5..a114ff8 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,6 @@ "wrangler": "^3.94.0" }, "lint-staged": { - "src/**/*.{ts,tsx,astro,js,jsx}": [ - "biome check --write ./src" - ] + "src/**/*.{ts,tsx,astro,js,jsx}": ["biome check --write ./src"] } } From 817f29e5817f9c1a0e1aeec3528d2c2815aed9fe Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Fri, 16 May 2025 13:50:09 +1200 Subject: [PATCH 3/3] fix(hero): remove unnecessary exclamation mark from title font class --- package.json | 2 +- src/components/Hero.astro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a114ff8..c574069 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,6 @@ "wrangler": "^3.94.0" }, "lint-staged": { - "src/**/*.{ts,tsx,astro,js,jsx}": ["biome check --write ./src"] + "src/**/*.{ts,tsx,astro,js,jsx}": ["biome check --write ."] } } diff --git a/src/components/Hero.astro b/src/components/Hero.astro index 5d2e893..e86d0a9 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -37,7 +37,7 @@ const { >

<motion.span client:load {...getHeroTitleAnimation()}> {hero.title[0]}