fix: visual height inconsistency between chinese and english title font

This commit is contained in:
radishzzz 2025-03-15 21:55:06 +00:00
parent dc260f3f6c
commit 26a3cce66e
5 changed files with 11 additions and 11 deletions

View file

@ -19,7 +19,7 @@ const marginBottom = {
---
<header class="mb-10.625 lg:hidden">
<h3 class={`${marginBottom} mt-2.9375 text-5.375 c-secondary font-bold font-title`}>
<h3 class={`${marginBottom} mt-3 text-5.375 c-secondary font-bold font-title`}>
<!-- Fix text cropping issues during view transition on ios by adding a div tag -->
<div
class="box-content inline-block pr-1.25"

View file

@ -1,5 +1,5 @@
---
import { getNextLangUrl, getPostNextLangUrl } from '@/i18n/path'
import { getNextLangUrl, getNextSupportedLangUrl } from '@/i18n/path'
import { isPostPage, isTagPage } from '@/utils/page'
interface Props {
@ -11,13 +11,13 @@ const currentPath = Astro.url.pathname
const isPost = isPostPage(currentPath)
const isTag = isTagPage(currentPath)
// 检查是否应使用受限的语言列表
const useFilteredLangs = isPost || (isTag && supportedLangs.length > 0)
// Check if only the supported language switch list is used
const useSupportedLangs = isPost || (isTag && supportedLangs.length > 0)
// 根据页面类型选择合适的语言切换方式
const nextUrl = useFilteredLangs
? getPostNextLangUrl(currentPath, supportedLangs) // 只在有内容的语言间切换
: getNextLangUrl(currentPath) // 在所有语言间切换
// Choose a language switch list according to the page type
const nextUrl = useSupportedLangs
? getNextSupportedLangUrl(currentPath, supportedLangs) // Switch between supported languages
: getNextLangUrl(currentPath) // Switch between all languages
---
<a