Skip to content

Commit

Permalink
Fixed fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
jzongker committed Jan 8, 2025
1 parent 01cf940 commit 881774f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/[sdSlug]/admin/site/styles/StylesClientWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function StylesClientWrapper(props: WrapperPageProps) {
return (
<AdminWrapper config={props.config}>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@500&family=Lato&family=Montserrat:wght@500&family=Open+Sans:wght@500&family=Oswald:wght@500&family=Playfair+Display:wght@500&family=Poppins:wght@500&family=Raleway:wght@500&family=Roboto:wght@500&display=swap" rel="stylesheet"></link>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400&family=Lato&family=Montserrat:wght@400&family=Open+Sans:wght@400&family=Oswald:wght@400&family=Playfair+Display:wght@400&family=Poppins:wght@400&family=Raleway:wght@400&family=Roboto:wght@400&display=swap" rel="stylesheet"></link>
<Banner><h1>Manage Global Styles</h1></Banner>
<div id="mainContent">
<Grid container spacing={3}>
Expand Down
5 changes: 3 additions & 2 deletions src/components/Theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export const Theme: React.FC<Props> = (props) => {

if (googleFonts.length > 0) {
const fontList:string[] = [];
googleFonts.forEach(f => fontList.push(f.replace(" ","+") + ":wght@500"));
googleFonts.forEach(f => fontList.push(f.replace(" ","+") + ":wght@400"));

fontLink = <link href={"https://fonts.googleapis.com/css2?family=" + fontList.join("&") + "&display=swap"} rel="stylesheet"></link>
fontLink = <link href={"https://fonts.googleapis.com/css2?family=" + fontList.join("&family=") + "&display=swap"} rel="stylesheet"></link>
}

if (props?.globalStyles?.customJS) customJs = <div dangerouslySetInnerHTML={{__html:props.globalStyles.customJS}} />
Expand All @@ -58,6 +58,7 @@ export const Theme: React.FC<Props> = (props) => {
const favicon = props.config?.appearance?.favicon_16x16 && AppearanceHelper.getFavicon(props.config.appearance, "16");
const ogImage = props.config?.appearance?.ogImage && props.config.appearance.ogImage;

console.log("************FONTLINK", fontLink);

return (<>
{fontLink}
Expand Down

0 comments on commit 881774f

Please sign in to comment.