feat(fonts): allow PageTitle to have its own font subset (#1848)

* fix(explorer): vertically center the Explorer toggle under mobile view

* Added a separate title font configuration

* Added googleSubFontHref function

* Applied --titleFont to PageTitle

* Made googleFontHref return array of URLs

* Dealing with empty and undefined title

* Minor update

* Dealing with empty and undefined title

* Refined font inclusion logic

* Adopted the googleFontHref + googleFontSubsetHref method

* Adaptively include font subset for PageTitle

* Restored default config

* Minor changes on configuration docs

* Formatted source code
This commit is contained in:
Felix Nie
2025-03-19 12:43:32 +08:00
committed by GitHub
parent 9818e1ad57
commit 25979ab216
5 changed files with 39 additions and 10 deletions

View File

@ -17,6 +17,7 @@ PageTitle.css = `
.page-title {
font-size: 1.75rem;
margin: 0;
font-family: var(--titleFont);
}
`