aboutsummaryrefslogtreecommitdiff
path: root/packages/anastasis-webui/src/components
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-10-13 19:32:14 +0200
committerFlorian Dold <florian@dold.me>2021-10-13 19:32:26 +0200
commit3aad5e774dc44fc0d757f6c22152fcbb2b54ca1b (patch)
tree4839cb4a87ac838f0485ce068237c5067e3ea6fa /packages/anastasis-webui/src/components
parentfbf501e727ffe37c30a0ebe038dfb8ae900be749 (diff)
downloadwallet-core-3aad5e774dc44fc0d757f6c22152fcbb2b54ca1b.tar.xz
common anstasis frame
Diffstat (limited to 'packages/anastasis-webui/src/components')
-rw-r--r--packages/anastasis-webui/src/components/app.tsx24
-rw-r--r--packages/anastasis-webui/src/components/header/index.tsx24
-rw-r--r--packages/anastasis-webui/src/components/header/style.css48
3 files changed, 7 insertions, 89 deletions
diff --git a/packages/anastasis-webui/src/components/app.tsx b/packages/anastasis-webui/src/components/app.tsx
index 5abb12a3d..45c9035f0 100644
--- a/packages/anastasis-webui/src/components/app.tsx
+++ b/packages/anastasis-webui/src/components/app.tsx
@@ -1,23 +1,13 @@
-import { FunctionalComponent, h } from 'preact';
-import { Route, Router } from 'preact-router';
+import { FunctionalComponent, h } from "preact";
-import Home from '../routes/home';
-import Profile from '../routes/profile';
-import NotFoundPage from '../routes/notfound';
-import Header from './header';
+import AnastasisClient from "../routes/home";
const App: FunctionalComponent = () => {
- return (
- <div id="preact_root">
- <Header />
- <Router>
- <Route path="/" component={Home} />
- <Route path="/profile/" component={Profile} user="me" />
- <Route path="/profile/:user" component={Profile} />
- <NotFoundPage default />
- </Router>
- </div>
- );
+ return (
+ <div id="preact_root">
+ <AnastasisClient />
+ </div>
+ );
};
export default App;
diff --git a/packages/anastasis-webui/src/components/header/index.tsx b/packages/anastasis-webui/src/components/header/index.tsx
deleted file mode 100644
index f2b6fe8ad..000000000
--- a/packages/anastasis-webui/src/components/header/index.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { FunctionalComponent, h } from 'preact';
-import { Link } from 'preact-router/match';
-import style from './style.css';
-
-const Header: FunctionalComponent = () => {
- return (
- <header class={style.header}>
- <h1>Preact App</h1>
- <nav>
- <Link activeClassName={style.active} href="/">
- Home
- </Link>
- <Link activeClassName={style.active} href="/profile">
- Me
- </Link>
- <Link activeClassName={style.active} href="/profile/john">
- John
- </Link>
- </nav>
- </header>
- );
-};
-
-export default Header;
diff --git a/packages/anastasis-webui/src/components/header/style.css b/packages/anastasis-webui/src/components/header/style.css
deleted file mode 100644
index f08fda702..000000000
--- a/packages/anastasis-webui/src/components/header/style.css
+++ /dev/null
@@ -1,48 +0,0 @@
-.header {
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- height: 56px;
- padding: 0;
- background: #673AB7;
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
- z-index: 50;
-}
-
-.header h1 {
- float: left;
- margin: 0;
- padding: 0 15px;
- font-size: 24px;
- line-height: 56px;
- font-weight: 400;
- color: #FFF;
-}
-
-.header nav {
- float: right;
- font-size: 100%;
-}
-
-.header nav a {
- display: inline-block;
- height: 56px;
- line-height: 56px;
- padding: 0 15px;
- min-width: 50px;
- text-align: center;
- background: rgba(255,255,255,0);
- text-decoration: none;
- color: #FFF;
- will-change: background-color;
-}
-
-.header nav a:hover,
-.header nav a:active {
- background: rgba(0,0,0,0.2);
-}
-
-.header nav a.active {
- background: rgba(0,0,0,0.4);
-}