Updated html component
This commit is contained in:
parent
ec2ddd719c
commit
11f7309f57
2 changed files with 12 additions and 6 deletions
|
|
@ -16,10 +16,10 @@
|
||||||
@extend .body
|
@extend .body
|
||||||
font-family: fonts.$Montserrat
|
font-family: fonts.$Montserrat
|
||||||
|
|
||||||
.opensans
|
.open-sans
|
||||||
@extend .body
|
@extend .body
|
||||||
font-family: fonts.$OpenSans
|
font-family: fonts.$OpenSans
|
||||||
|
|
||||||
.publicsans
|
.public-sans
|
||||||
@extend .body
|
@extend .body
|
||||||
font-family: fonts.$PublicSans
|
font-family: fonts.$PublicSans
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import './HTML.sass'
|
import './HTML.sass'
|
||||||
import type { JSXElement } from 'solid-js'
|
import { type JSXElement, Show } from 'solid-js'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string
|
title: string
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
children: JSXElement
|
children: JSXElement
|
||||||
font?: string
|
font?: 'roboto' | 'inter' | 'montserrat' | 'open-sans' | 'public-sans'
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
|
|
@ -14,16 +14,22 @@ export default (props: Props) => {
|
||||||
<>
|
<>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<base href="/" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover" />
|
||||||
<meta name="name" content={props.name} />
|
<meta name="name" content={props.name} />
|
||||||
<meta name="description" content={props.description} />
|
<meta name="description" content={props.description} />
|
||||||
|
<meta property="og:title" content={props.name} />
|
||||||
|
<meta property="og:description" content={props.description} />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
|
||||||
|
<link rel="preload" href={`https://cdn.jsdelivr.net/fontsource/fonts/${props.font}:vf@latest/latin-wght-normal.woff2`} crossorigin="anonymous" as="font" type="font/woff2" />
|
||||||
<title>{props.title}</title>
|
<title>{props.title}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class={props.font}>{props.children}</body>
|
<body class={props.font}>{props.children}</body>
|
||||||
</html>
|
</html>
|
||||||
|
s
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue