mirror of
https://github.com/Steffo99/steffoweb.git
synced 2024-11-21 23:54:30 +00:00
idk stuff
This commit is contained in:
parent
3c73b3b51e
commit
1838793eb0
5 changed files with 667 additions and 409 deletions
1027
package-lock.json
generated
1027
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -21,7 +21,7 @@
|
||||||
"@fortawesome/react-fontawesome": "^0.1.9",
|
"@fortawesome/react-fontawesome": "^0.1.9",
|
||||||
"@sentry/browser": "^5.15.5",
|
"@sentry/browser": "^5.15.5",
|
||||||
"@sentry/integrations": "^5.15.5",
|
"@sentry/integrations": "^5.15.5",
|
||||||
"bluelib": "^0.13.14",
|
"bluelib": "^0.14.2",
|
||||||
"css-loader": "^3.5.2",
|
"css-loader": "^3.5.2",
|
||||||
"file-loader": "^5.1.0",
|
"file-loader": "^5.1.0",
|
||||||
"history": "^4.10.1",
|
"history": "^4.10.1",
|
||||||
|
|
20
src/index.js
20
src/index.js
|
@ -1,4 +1,6 @@
|
||||||
// Import debugging tools
|
// Import debugging tools
|
||||||
|
import {useState} from "preact/hooks";
|
||||||
|
|
||||||
let Sentry = null;
|
let Sentry = null;
|
||||||
if(process.env.NODE_ENV === "development") {
|
if(process.env.NODE_ENV === "development") {
|
||||||
console.debug("Initializing Preact Debugger...")
|
console.debug("Initializing Preact Debugger...")
|
||||||
|
@ -27,7 +29,6 @@ import Home from "./routes/Home";
|
||||||
|
|
||||||
// noinspection ES6UnusedImports
|
// noinspection ES6UnusedImports
|
||||||
import "bluelib/dist/index.css";
|
import "bluelib/dist/index.css";
|
||||||
import {theme} from "bluelib";
|
|
||||||
import './meta/manifest.json';
|
import './meta/manifest.json';
|
||||||
import './meta/CNAME';
|
import './meta/CNAME';
|
||||||
import './meta/.nojekyll';
|
import './meta/.nojekyll';
|
||||||
|
@ -36,15 +37,20 @@ import './meta/favicon.ico';
|
||||||
import Router from 'preact-router';
|
import Router from 'preact-router';
|
||||||
import {createHashHistory} from "history";
|
import {createHashHistory} from "history";
|
||||||
|
|
||||||
|
import { theme, BasicContainer } from 'bluelib';
|
||||||
|
|
||||||
// noinspection JSUnusedGlobalSymbols
|
// noinspection JSUnusedGlobalSymbols
|
||||||
export default function(props) {
|
export default function(props) {
|
||||||
|
let [currentPage, setCurrentPage] = useState(window.location.hash.substr(1));
|
||||||
|
const onPageChange = (event) => {
|
||||||
|
setCurrentPage(event.url);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="app" class={theme.bluelib}>
|
<div id="app" className={theme.bluelib}>
|
||||||
<BasicContainer>
|
<Router history={createHashHistory()} onChange={onPageChange}>
|
||||||
<Router history={createHashHistory()}>
|
<Home path={"/"}/>
|
||||||
<Home path={"/"}/>
|
</Router>
|
||||||
</Router>
|
|
||||||
</BasicContainer>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
import {Panel} from "bluelib";
|
import style from "./Home.less";
|
||||||
|
|
||||||
export default function (props) {
|
export default function (props) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div class={style.container}>
|
||||||
<h1>
|
<div class={style.content}>
|
||||||
Steffo<small>'s website</small>
|
hello there general kenobi
|
||||||
</h1>
|
</div>
|
||||||
<Panel title={"Hello there!"}>
|
|
||||||
Hi! Welcome to my website!
|
|
||||||
</Panel>
|
|
||||||
<Panel title={"Under construction"}>
|
|
||||||
This website is currently under (re)construction. Come back another time!
|
|
||||||
</Panel>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
11
src/routes/Home.less
Normal file
11
src/routes/Home.less
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
}
|
Loading…
Reference in a new issue