feat: add css
This commit is contained in:
parent
9b3b209874
commit
910ae2ba2e
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"tasks": {
|
||||
"serve": "deno run --allow-env --allow-read --allow-write --allow-net --watch=./client,./script.tsx ./server.tsx"
|
||||
"serve": "deno run --allow-env --allow-read --allow-write --allow-net --watch=./client,./script.tsx,./style.css ./server.tsx"
|
||||
},
|
||||
"fmt": {
|
||||
"singleQuote": true,
|
||||
|
|
|
@ -13,6 +13,8 @@ const script = await bundle('./script.tsx', {
|
|||
'importMap': { imports: denoConfig.imports },
|
||||
})
|
||||
|
||||
const css = await Deno.readTextFile('./style.css')
|
||||
|
||||
/**
|
||||
* Page template
|
||||
*/
|
||||
|
@ -22,6 +24,7 @@ function Template() {
|
|||
<head>
|
||||
<title>Démo</title>
|
||||
</head>
|
||||
<style>{css}</style>
|
||||
<body>
|
||||
</body>
|
||||
<script type='module' dangerouslySetInnerHTML={{ __html: script.code }}>
|
||||
|
|
33
style.css
Normal file
33
style.css
Normal file
|
@ -0,0 +1,33 @@
|
|||
html {
|
||||
scroll-behavior: smooth;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
||||
Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
|
||||
sans-serif;
|
||||
display: block;
|
||||
}
|
||||
|
||||
main {
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
color: white;
|
||||
background-color: #97c2fc;
|
||||
box-shadow: 0 0 0.4rem 0.2rem rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.graph {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
Loading…
Reference in a new issue