Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,38 @@ export default defineConfig({
weights: [300, 400, 500, 600, 700],
display: "swap",
},
{
provider: fontProviders.google(),
name: "Noto Sans JP",
cssVariable: "--font-jp",
weights: ["100-900"],
fallbacks: ["Source Han Sans", "sans-serif"],
display: "swap",
},
{
provider: fontProviders.google(),
name: "Noto Sans HK",
cssVariable: "--font-hk",
weights: ["100-900"],
fallbacks: ["Source Han Sans HC", "sans-serif"],
display: "swap",
},
{
provider: fontProviders.google(),
name: "Noto Sans TC",
cssVariable: "--font-tw",
weights: ["100-900"],
fallbacks: ["Source Han Sans TC", "sans-serif"],
display: "swap",
},
{
provider: fontProviders.google(),
name: "Noto Sans SC",
cssVariable: "--font-cn",
weights: ["100-900"],
fallbacks: ["Source Han Sans SC", "sans-serif"],
display: "swap",
},
],

image: {
Expand Down
4 changes: 4 additions & 0 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const { title, description, image = "/og_img_um.png" } = Astro.props;

<!-- Fonts -->
<Font cssVariable="--font-switzer" preload />
{Astro.params.lang == "ja" && (<Font cssVariable="--font-jp" preload />)}
{Astro.params.lang == "zh_HK" && (<Font cssVariable="--font-hk" preload />)}
{Astro.params.lang == "zh_Hant" && (<Font cssVariable="--font-tw" preload />)}
{Astro.params.lang == "zh_Hans" && (<Font cssVariable="--font-cn" preload />)}

<!-- Analytics -->
<script
Expand Down
2 changes: 1 addition & 1 deletion src/components/DownloadLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const DownloadLinks = ({
href={getLocalizedPath(lang, thankYouLink)}
>
<DownloadIcon />
<span>{t("downloadLinks.download")}</span>
<span class="font-medium">{t("downloadLinks.download")}</span>
</a>
<a
href={link + ".sha256sum"}
Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const t = makeT(Astro.params.lang);
class="flex flex-row gap-2 items-center justify-center px-6 py-2 bg-accent-700 rounded-xl text-gray-50 hover:bg-accent-800 text-lg transition-colors"
>
<DownloadIcon />
<span>{t("hero.get")}</span>
<span class="font-medium">{t("hero.get")}</span>
</button>
</a>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
@config "../../tailwind.config.cjs";
@layer (utilities);

@custom-variant cjk (&:where([lang="zh_HK"] *),&:where([lang="zh_Hant"] *),&:where([lang="ja"] *));

@theme inline {
--font-sans: var(--font-switzer);
--font-sans: var(--font-switzer) var(--font-jp) var(--font-hk) var(--font-tw) var(--font-cn);
}

:root {
Expand Down