From c555a762c98b9036b0ca636a22749604e5fbe017 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Fri, 3 Nov 2023 16:55:33 +0900 Subject: [PATCH] (enhance) fonts in mainland china --- app.vue | 8 +++++++- nuxt.config.ts | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app.vue b/app.vue index e1265a70..5522bd3f 100644 --- a/app.vue +++ b/app.vue @@ -76,8 +76,14 @@ const head = useLocaleHead({ * fonts.googleapis.com → fonts.googleapis.cn **/ const cnHead = (locale.value === 'cn') ? [ + { rel: 'preconnect', href: 'https://fonts.googleapis.cn' }, + { rel: 'preconnect', href: 'https://fonts.gstatic.cn' }, { rel: 'stylesheet', href: 'https://fonts.googleapis.cn/css2?family=Capriola&family=Nunito:ital,wght@0,400;0,700;1,400;1,700&display=swap' } -] : []; +] : [ + { rel: 'preconnect', href: 'https://fonts.googleapis.com' }, + { rel: 'preconnect', href: 'https://fonts.gstatic.com' }, + { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Capriola&family=Nunito:ital,wght@0,400;0,700;1,400;1,700&display=swap' }, +]; useHead((): Record => ({ htmlAttrs: { diff --git a/nuxt.config.ts b/nuxt.config.ts index 18b75c71..aa12bda6 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -40,9 +40,6 @@ export default defineNuxtConfig({ app: { head: { link: [ - { rel: 'preconnect', href: 'https://fonts.googleapis.com' }, - { rel: 'preconnect', href: 'https://fonts.gstatic.com' }, - { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Capriola&family=Nunito:ital,wght@0,400;0,700;1,400;1,700&display=swap' }, { rel: 'stylesheet', href: '/fonts/fonts.css' }, ], },