Compare commits
2 commits
1c3f2565c7
...
f8c7d24cb5
| Author | SHA1 | Date | |
|---|---|---|---|
| f8c7d24cb5 | |||
| 89ac48df4c |
4 changed files with 46 additions and 38 deletions
13
fwt/components/HTML/HTML.sass
Normal file
13
fwt/components/HTML/HTML.sass
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@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
|
||||
28
fwt/components/HTML/HTML.tsx
Normal file
28
fwt/components/HTML/HTML.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import './HTML.sass'
|
||||
|
||||
interface Props {
|
||||
title: string
|
||||
name: string
|
||||
description: string
|
||||
children: any
|
||||
font?: string
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
|
||||
<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} />
|
||||
<title>{props.title}</title>
|
||||
</head>
|
||||
|
||||
<body class={props.font}>{props.children}</body>
|
||||
</html>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
interface Props {
|
||||
title: string
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
|
||||
<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} />
|
||||
<title>{props.title}</title>
|
||||
</head>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
@ -6,23 +6,10 @@ const websiteDescription = 'This is just a template.'
|
|||
|
||||
import Background from '../../fwt/components/Background/Background'
|
||||
import OptimizeBackground from '../../fwt/components/Optimizer/OptimizeBackground'
|
||||
import Head from '../../fwt/components/Head/Head'
|
||||
import HTML from '../../fwt/components/HTML/HTML'
|
||||
---
|
||||
|
||||
<html lang="en">
|
||||
<Head title={title} name={websiteName} description={websiteDescription} />
|
||||
|
||||
<body id="body">
|
||||
<Background color="#0c1b31" />
|
||||
<slot />
|
||||
|
||||
<style lang="sass">
|
||||
@use '/src/styles/variables.sass' as vars
|
||||
@use '/src/styles/fonts.sass' as fonts
|
||||
|
||||
#body
|
||||
font-family: fonts.$Inter
|
||||
color: vars.$textColor
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
<HTML title={title} name={websiteName} description={websiteDescription} font="inter">
|
||||
<Background color="#0c1b31" />
|
||||
<slot />
|
||||
</HTML>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue