mirror of
https://github.com/aziis98/template-go-vitejs.git
synced 2026-10-06 13:04:50 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/styles/main.scss">
|
||||
<title>Notes</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Router, route } from 'preact-router'
|
||||
import { render } from 'preact'
|
||||
import { useEffect } from 'preact/hooks'
|
||||
import { PageHomepage } from './pages.jsx'
|
||||
|
||||
const Redirect = ({ to }) => {
|
||||
useEffect(() => {
|
||||
route(to, true)
|
||||
}, [])
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
const Main = ({}) => {
|
||||
return (
|
||||
<Router>
|
||||
<PageHomepage path="/" />
|
||||
<Redirect default to="/" />
|
||||
</Router>
|
||||
)
|
||||
}
|
||||
|
||||
render(<Main />, document.body)
|
||||
@@ -0,0 +1,3 @@
|
||||
import { Masonry } from './components/Masonry.jsx'
|
||||
|
||||
export const PageHomepage = ({}) => <main></main>
|
||||
@@ -0,0 +1,19 @@
|
||||
// Reset
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
|
||||
font: inherit;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
input,
|
||||
button {
|
||||
background: unset;
|
||||
border: unset;
|
||||
border-radius: 0;
|
||||
outline: none;
|
||||
}
|
||||
Reference in New Issue
Block a user