Added fwt components
This commit is contained in:
parent
b7409d1c13
commit
b2cbd947c5
30 changed files with 852 additions and 0 deletions
25
fwt/components/HTML/HTML.sass
Normal file
25
fwt/components/HTML/HTML.sass
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
@use '/src/styles/variables.sass' as vars
|
||||
@use '/src/styles/fonts.sass' as fonts
|
||||
|
||||
.body
|
||||
color: vars.$textColor
|
||||
|
||||
.inter
|
||||
@extend .body
|
||||
font-family: fonts.$Inter
|
||||
|
||||
.roboto
|
||||
@extend .body
|
||||
font-family: fonts.$Roboto
|
||||
|
||||
.montserrat
|
||||
@extend .body
|
||||
font-family: fonts.$Montserrat
|
||||
|
||||
.open-sans
|
||||
@extend .body
|
||||
font-family: fonts.$OpenSans
|
||||
|
||||
.public-sans
|
||||
@extend .body
|
||||
font-family: fonts.$PublicSans
|
||||
35
fwt/components/HTML/HTML.tsx
Normal file
35
fwt/components/HTML/HTML.tsx
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import './HTML.sass'
|
||||
import { type JSXElement, Show } from 'solid-js'
|
||||
|
||||
interface Props {
|
||||
title: string
|
||||
name: string
|
||||
description: string
|
||||
children: JSXElement
|
||||
font?: 'roboto' | 'inter' | 'montserrat' | 'open-sans' | 'public-sans'
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/" />
|
||||
<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="name" content={props.name} />
|
||||
<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>
|
||||
</head>
|
||||
|
||||
<body class={props.font}>{props.children}</body>
|
||||
</html>
|
||||
s
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue