From 0bf6ac33a5ce0ee8a1a1164c6a67c06a1a071f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sat, 27 Sep 2025 17:29:12 -0500 Subject: [PATCH] feat: more promotion --- packages/i18n/strings/en.json | 6 +- .../src/components/BlitzKitTheme/index.tsx | 8 +- .../website/src/components/PWAPrompter.astro | 80 +++++++++++++------ packages/website/src/layouts/BaseLayout.astro | 7 ++ 4 files changed, 71 insertions(+), 30 deletions(-) diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index 90cb99401..461d55348 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -841,9 +841,9 @@ "title": "Install the BlitzKit App", "new": "NEW", "checking": "Checking compatibility...", - "incompatible": "Incompatible device.", - "incompatible_help": "Try manually.", - "install": "Install" + "instructions": "Instructions for Apple devices.", + "install": "Install", + "dismiss": "Dismiss" }, "discord": { diff --git a/packages/website/src/components/BlitzKitTheme/index.tsx b/packages/website/src/components/BlitzKitTheme/index.tsx index b695358b3..1087417b7 100644 --- a/packages/website/src/components/BlitzKitTheme/index.tsx +++ b/packages/website/src/components/BlitzKitTheme/index.tsx @@ -1,5 +1,5 @@ -import { Theme, type ThemeProps } from '@radix-ui/themes'; -import type { ReactNode } from 'react'; +import { Theme, type ThemeProps } from "@radix-ui/themes"; +import type { ReactNode } from "react"; interface BlitzKitThemeProps extends ThemeProps { children: ReactNode; @@ -13,13 +13,13 @@ export function BlitzKitTheme({ }: BlitzKitThemeProps) { return ( + #pwa-prompter[data-floating="true"] { + position: fixed; + bottom: var(--space-6); + right: var(--space-6); + z-index: 1; + } + + #pwa-prompter[data-floating="true"] .card { + box-shadow: var(--shadow-6); + } + .pwa-logo { width: 6rem; height: 6rem; @@ -35,28 +48,42 @@ const strings = getStrings(locale); } #pwa-install, - #pwa-incompatible { + #pwa-incompatible, + #pwa-prompter[data-floating="true"], + #pwa-dismiss { display: none; } html.pwa-enabled #pwa-install, - html.pwa-disabled #pwa-incompatible { + html.pwa-disabled #pwa-incompatible, + html.pwa-enabled #pwa-prompter[data-floating="true"], + #pwa-prompter[data-floating="true"] #pwa-dismiss { display: unset; } + + .pwa-actions button { + flex: 1; + } - - + + @@ -78,23 +105,30 @@ const strings = getStrings(locale); - - {strings.website.home.pwa.incompatible}{" "} - - {strings.website.home.pwa.incompatible_help} - - + + {strings.website.home.pwa.instructions} + - + + + + diff --git a/packages/website/src/layouts/BaseLayout.astro b/packages/website/src/layouts/BaseLayout.astro index e8eb693c3..b6241f5c4 100644 --- a/packages/website/src/layouts/BaseLayout.astro +++ b/packages/website/src/layouts/BaseLayout.astro @@ -10,6 +10,7 @@ import LocaleRedirector from "../components/LocaleRedirector.astro"; import Meta from "../components/Meta.astro"; import Navbar from "../components/Navbar.astro"; import PWA from "../components/PWA.astro"; +import PWAPrompter from "../components/PWAPrompter.astro"; import Servicing from "../components/Servicing.astro"; import "./base.css"; @@ -38,6 +39,12 @@ const locale = Astro.params.locale; + { + Astro.routePattern !== "/[...locale]" && ( + + ) + } +