some more changes
parent
cb992c955a
commit
c6bef04c73
@ -1,23 +1,24 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="preload" href="/src/fonts/font.ttf" as="font"/>
|
||||
<title>WokAble</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,31 +1,30 @@
|
||||
{
|
||||
"name": "assets",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.4.0",
|
||||
"@types/node": "17.0.13",
|
||||
"solid-js": "^1.3.4",
|
||||
"typescript": "4.5.5"
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||
"axios": "^0.25.0",
|
||||
"bulma": "^0.9.3",
|
||||
"sass": "^1.49.0",
|
||||
"solid-app-router": "^0.2.1",
|
||||
"solid-scripts": "^0.0.61"
|
||||
"@fortawesome/fontawesome-svg-core": "^1.3.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.0.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.0.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.17",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-router-dom": "^6.2.2",
|
||||
"styled-components": "^5.3.3",
|
||||
"wired-elements-react": "^0.1.5"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "solid-scripts start",
|
||||
"build": "solid-scripts build",
|
||||
"test": "solid-scripts test"
|
||||
},
|
||||
"browserslist": [
|
||||
"Chrome 74",
|
||||
"Firefox 63",
|
||||
"Safari 11",
|
||||
"Edge 17",
|
||||
"Node 10"
|
||||
]
|
||||
}
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.33",
|
||||
"@types/react-dom": "^17.0.10",
|
||||
"@types/styled-components": "^5.1.24",
|
||||
"@vitejs/plugin-react": "^1.0.7",
|
||||
"axios": "^0.26.1",
|
||||
"typescript": "^4.5.4",
|
||||
"vite": "^2.8.0"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
@ -1,43 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<script src="https://kit.fontawesome.com/a6eecf466d.js" crossorigin="anonymous"></script>
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>Wok-Able</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,15 +0,0 @@
|
||||
{
|
||||
"short_name": "Solid App",
|
||||
"name": "Create Solid App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
import React, { Suspense, useEffect, useState } from "react";
|
||||
import {
|
||||
HashRouter as Router,
|
||||
Routes,
|
||||
Route,
|
||||
Navigate,
|
||||
} from "react-router-dom";
|
||||
|
||||
import RequiresAuthentication from "./components/AuthenticatedComponent";
|
||||
import { GlobalStyles } from "./styles/GlobalStyles";
|
||||
|
||||
const Login = React.lazy(() => import("./pages/login"));
|
||||
const Register = React.lazy(() => import("./pages/register"));
|
||||
const Learn = React.lazy(() => import("./pages/Learn/Learn"));
|
||||
const BaseLayout = React.lazy(() => import("./layouts/Base/Base"));
|
||||
const Loading = () => <p>Loading</p>;
|
||||
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<>
|
||||
<GlobalStyles />
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route
|
||||
path="login"
|
||||
element={
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Login />
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="register"
|
||||
element={
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Register />
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="app"
|
||||
element={
|
||||
<RequiresAuthentication>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<BaseLayout />
|
||||
</Suspense>
|
||||
</RequiresAuthentication>
|
||||
}
|
||||
>
|
||||
<Route
|
||||
index
|
||||
element={
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Learn />
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="learn"
|
||||
element={
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Learn />
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route path="*" element={<div>NotFound</div>} />
|
||||
</Route>
|
||||
<Route path="*" element={<Navigate to="app" replace />} />
|
||||
</Routes>
|
||||
</Router>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
@ -1,17 +0,0 @@
|
||||
import type { Component } from "solid-js";
|
||||
import { useRoutes, useLocation } from "solid-app-router";
|
||||
|
||||
import { routes } from "./routes"
|
||||
|
||||
const App: Component = () => {
|
||||
const location = useLocation();
|
||||
const Route = useRoutes(routes);
|
||||
document.title += location.pathname
|
||||
return (
|
||||
<div>
|
||||
<Route />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default App;
|
@ -0,0 +1,12 @@
|
||||
import React from "react";
|
||||
import { Navigate, useLocation } from "react-router-dom";
|
||||
import { useAuthUser } from "../providers/AuthUser";
|
||||
|
||||
const AuthenticatedComponent = ({ children }: { children: any }) => {
|
||||
const { authenticated } = useAuthUser();
|
||||
const { pathname } = useLocation();
|
||||
if (authenticated) return children;
|
||||
return <Navigate to="/login" replace state={{ path: pathname }} />;
|
||||
};
|
||||
|
||||
export default AuthenticatedComponent;
|
@ -0,0 +1,16 @@
|
||||
import React from "react";
|
||||
import { AvatarWrapper } from "./styled";
|
||||
|
||||
export interface IAvatar {
|
||||
alt: string;
|
||||
src?: string;
|
||||
}
|
||||
const Avatar: React.FC<IAvatar> = ({ alt, src }) => {
|
||||
return (
|
||||
<AvatarWrapper src={src}>
|
||||
<div>{!src && <p>{alt[0]}</p>}</div>
|
||||
</AvatarWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default Avatar;
|
@ -0,0 +1,24 @@
|
||||
import styled from "styled-components";
|
||||
interface IAvatarWrapper {
|
||||
src?: string;
|
||||
}
|
||||
export const AvatarWrapper = styled.div<IAvatarWrapper>`
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
border-radius: 50%;
|
||||
background-color: black;
|
||||
color: white;
|
||||
position: relative;
|
||||
& > div {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
`;
|
@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
import { DividerWrapper, HeaderWrapper } from "./styled";
|
||||
|
||||
import { WiredDivider } from "wired-elements-react";
|
||||
|
||||
export interface IWrapper {
|
||||
title: string;
|
||||
}
|
||||
const Header: React.FC<IWrapper> = ({ title }) => {
|
||||
return (
|
||||
<>
|
||||
<HeaderWrapper>
|
||||
<h1>{title}</h1>
|
||||
<DividerWrapper>
|
||||
<WiredDivider />
|
||||
</DividerWrapper>
|
||||
</HeaderWrapper>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
@ -0,0 +1,23 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export const HeaderWrapper = styled.div`
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: var(--navbar-width);
|
||||
height: var(--toolbar-height);
|
||||
width: 100%;
|
||||
& > h1 {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const DividerWrapper = styled.div`
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: calc(100% + var(--navbar-width));
|
||||
left: calc(0px - var(--navbar-width));
|
||||
z-index: 999999999;
|
||||
`;
|
@ -0,0 +1,79 @@
|
||||
import React from "react";
|
||||
import {
|
||||
NavbarFooter,
|
||||
NavbarLogo,
|
||||
NavbarWrapper,
|
||||
NavbarAction,
|
||||
NavbarProfile,
|
||||
NavbarLogout,
|
||||
NavbarNavigation,
|
||||
NavbarNavigationList,
|
||||
} from "./styled";
|
||||
import Avatar from "../Avatar/Avatar";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import {
|
||||
faPowerOff,
|
||||
faUserGraduate,
|
||||
faBoxArchive,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { WiredDivider } from "wired-elements-react";
|
||||
import { useAuthUser } from "../../providers/AuthUser";
|
||||
|
||||
const Navbar = () => {
|
||||
const { user, logout } = useAuthUser();
|
||||
const name = user?.username ?? "Fallback";
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleLogout = async () => {
|
||||
await logout();
|
||||
navigate("/login");
|
||||
};
|
||||
return (
|
||||
<NavbarWrapper>
|
||||
<Link to="">
|
||||
<NavbarLogo>
|
||||
<NavbarAction>
|
||||
<Avatar alt="Logo" />
|
||||
</NavbarAction>
|
||||
<h1>Logo</h1>
|
||||
</NavbarLogo>
|
||||
</Link>
|
||||
<NavbarNavigationList>
|
||||
<Link to="learn">
|
||||
<NavbarNavigation>
|
||||
<NavbarAction>
|
||||
<FontAwesomeIcon icon={faUserGraduate} size="2x" />
|
||||
</NavbarAction>
|
||||
<div>Lernen</div>
|
||||
</NavbarNavigation>
|
||||
</Link>
|
||||
<Link to="decks">
|
||||
<NavbarNavigation>
|
||||
<NavbarAction>
|
||||
<FontAwesomeIcon icon={faBoxArchive} size="2x" />
|
||||
</NavbarAction>
|
||||
<div>Stapel</div>
|
||||
</NavbarNavigation>
|
||||
</Link>
|
||||
</NavbarNavigationList>
|
||||
<Link to="profile">
|
||||
<WiredDivider />
|
||||
<NavbarFooter>
|
||||
<NavbarAction>
|
||||
<Avatar alt={name} />
|
||||
</NavbarAction>
|
||||
<NavbarProfile>
|
||||
<div>{name}</div>
|
||||
<div>Profile</div>
|
||||
</NavbarProfile>
|
||||
<NavbarLogout onClick={handleLogout}>
|
||||
<FontAwesomeIcon icon={faPowerOff} size="2x" />
|
||||
</NavbarLogout>
|
||||
</NavbarFooter>
|
||||
</Link>
|
||||
</NavbarWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default Navbar;
|
@ -0,0 +1,62 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export const NavbarWrapper = styled.aside`
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
width: var(--navbar-width);
|
||||
background-color: lightgray;
|
||||
height: 100%;
|
||||
max-height: calc(100% + 0px);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
`;
|
||||
export const NavbarLogo = styled.nav`
|
||||
height: var(--toolbar-height);
|
||||
padding: 0 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
export const NavbarFooter = styled.footer`
|
||||
height: var(--toolbar-height);
|
||||
padding: 0 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
export const NavbarAction = styled.div`
|
||||
-webkit-pack: start;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
min-width: 56px;
|
||||
`;
|
||||
|
||||
export const NavbarProfile = styled.div`
|
||||
align-items: flex-start;
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
& > div {
|
||||
font-size: 14px;
|
||||
}
|
||||
`;
|
||||
|
||||
export const NavbarLogout = styled.div`
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
min-width: 56px;
|
||||
`;
|
||||
|
||||
export const NavbarNavigationList = styled.nav`
|
||||
flex-grow: 1;
|
||||
`;
|
||||
|
||||
export const NavbarNavigation = styled.div`
|
||||
display: flex;
|
||||
height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
`;
|
@ -0,0 +1,41 @@
|
||||
import React from "react";
|
||||
import WiredCard from "../WiredCard/WiredCard";
|
||||
import { TextareaWithLabelWrapper } from "./styled";
|
||||
|
||||
export interface ITextareaWithLabel {
|
||||
label: string;
|
||||
value?: any;
|
||||
placeholder?: string | undefined;
|
||||
disabled?: boolean | undefined;
|
||||
rows?: number;
|
||||
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
||||
}
|
||||
|
||||
const TextareaWithLabel: React.FC<ITextareaWithLabel> = ({
|
||||
label,
|
||||
value,
|
||||
placeholder,
|
||||
disabled,
|
||||
onChange,
|
||||
rows,
|
||||
}) => {
|
||||
return (
|
||||
<TextareaWithLabelWrapper>
|
||||
<label htmlFor={label}>{label}</label>
|
||||
<WiredCard>
|
||||
<textarea
|
||||
className="textbox"
|
||||
id={label}
|
||||
role="textbox"
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
disabled={disabled}
|
||||
rows={rows ? rows : 4}
|
||||
></textarea>
|
||||
</WiredCard>
|
||||
</TextareaWithLabelWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default TextareaWithLabel;
|
@ -0,0 +1,30 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export const TextareaWithLabelWrapper = styled.div`
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: center;
|
||||
& > label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 48px;
|
||||
margin-left: 10px;
|
||||
font-size: 18.72px;
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
.textbox {
|
||||
outline: none !important;
|
||||
border: none;
|
||||
resize: none;
|
||||
background: transparent;
|
||||
font-size: 1em;
|
||||
font-family: var(--font-main);
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
color: black;
|
||||
:disabled {
|
||||
color: gray;
|
||||
}
|
||||
}
|
||||
`;
|
@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
import { WiredCard as Card } from "wired-elements-react";
|
||||
|
||||
const WiredCard: React.FC = ({ children }) => {
|
||||
var childrenWithType = children as HTMLCollection & React.ReactNode;
|
||||
return <Card>{childrenWithType}</Card>;
|
||||
};
|
||||
|
||||
export default WiredCard;
|
@ -1,18 +0,0 @@
|
||||
import axios from "axios";
|
||||
|
||||
const API_URL = "/api/auth"
|
||||
|
||||
const register = async (username: string, email: string, password: string) => {
|
||||
axios.post(API_URL + "/register", {
|
||||
username,
|
||||
email,
|
||||
password
|
||||
}).then(
|
||||
responce => {
|
||||
if (responce.data.username) {
|
||||
|
||||
}
|
||||
return responce
|
||||
}
|
||||
);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
import { Component, ComponentProps, JSX } from 'solid-js';
|
||||
|
||||
interface burgerProps extends ComponentProps<'span'> {
|
||||
datatarget: string
|
||||
}
|
||||
|
||||
const handelClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (e) => {
|
||||
var menu = document.querySelector("#" + e.currentTarget.dataset.target);
|
||||
e.currentTarget.classList.toggle("is-active");
|
||||
menu?.classList.toggle("is-active");
|
||||
}
|
||||
|
||||
const Burger: Component<burgerProps> = (props: burgerProps) => {
|
||||
return (
|
||||
<span onClick={handelClick} class="navbar-burger burger" data-target={props.datatarget} >
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
export default Burger;
|
@ -1,54 +0,0 @@
|
||||
import { Component } from 'solid-js';
|
||||
import { Link } from "solid-app-router";
|
||||
import Burger from './burger';
|
||||
|
||||
const Navbar: Component = () => {
|
||||
return (
|
||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="/">
|
||||
<h1 class="is-size-2">WOK ABLE</h1>
|
||||
</a>
|
||||
<Burger datatarget='navbarMenu' />
|
||||
</div>
|
||||
<div id="navbarMenu" class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<Link class="navbar-item" href="/">
|
||||
<span class="icon">
|
||||
<i class="fa fa-home"></i>
|
||||
</span>
|
||||
<span>Home</span>
|
||||
</Link>
|
||||
<a class="navbar-item" href='https://spahl.ddns.net/jasper'>
|
||||
<span class="icon">
|
||||
<i class="fa-brands fa-git-alt"></i>
|
||||
</span>
|
||||
<span>View Source</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-end">
|
||||
<span class="navbar-item">
|
||||
<Link class="button is-dark" href="/register">
|
||||
<span class="icon">
|
||||
<i class="fa fa-user-plus"></i>
|
||||
</span>
|
||||
<span>Register</span>
|
||||
</Link>
|
||||
</span>
|
||||
<span class="navbar-item">
|
||||
<Link class="button is-info" href="/login">
|
||||
<span class="icon">
|
||||
<i class="fa fa-arrow-right-to-bracket"></i>
|
||||
</span>
|
||||
<span>Login</span>
|
||||
</Link>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
|
||||
export default Navbar;
|
@ -0,0 +1,15 @@
|
||||
<svg width="410" height="404" viewBox="0 0 410 404" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z" fill="url(#paint0_linear)"/>
|
||||
<path d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z" fill="url(#paint1_linear)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#41D1FF"/>
|
||||
<stop offset="1" stop-color="#BD34FE"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFEA83"/>
|
||||
<stop offset="0.0833333" stop-color="#FFDD35"/>
|
||||
<stop offset="1" stop-color="#FFA800"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
@ -0,0 +1,141 @@
|
||||
const Books: React.FC = () => {
|
||||
return (
|
||||
<svg
|
||||
data-name="Layer 1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="100%"
|
||||
height="100%"
|
||||
viewBox="0 0 1036 569.97133"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<title>Books</title>
|
||||
<path
|
||||
d="M275.03638,460.85116c0,105.97579-85.91829,191.89415-191.89415,191.89415V268.957C189.11809,268.957,275.03638,354.87529,275.03638,460.85116Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M924.96362,460.85116c0,105.97579,85.91829,191.89415,191.89415,191.89415V268.957C1010.88191,268.957,924.96362,354.87529,924.96362,460.85116Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M269.23657,245.89659a13.70673,13.70673,0,1,1,13.70672-13.70673A13.72244,13.72244,0,0,1,269.23657,245.89659Zm0-25.129a11.42227,11.42227,0,1,0,11.42227,11.42227A11.435,11.435,0,0,0,269.23657,220.76759Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M878.989,601.46031H856.4401V578.91144H878.989Zm-20.81434-1.73453h19.07982V580.646H858.17463Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M341.73544,580.99169l-15.38019-16.48943,16.48943-15.3802,15.38019,16.48944Zm-12.92868-16.40411,13.014,13.9526,13.95259-13.014-13.014-13.9526Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M82,165.01433V734.98567H1118V165.01433ZM1115.71555,732.70121H84.28445V167.29879h1031.4311Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M856.89787,734.41455q-37.04832-5.79987-71.24294-9.86652l8.77843-17.55692c-3.047-1.01568-16.25092,9.14115-16.25092,9.14115L789.355,665.34811c-15.23525,2.03136-22.345,53.8312-22.345,53.8312L749.74331,701.9127l8.49959,19.549c-69.7584-7.32985-129.95337-9.61731-180.55371-9.09267l7.51347-15.02689c-3.047-1.01568-16.25092,9.14115-16.25092,9.14115l11.17251-50.78415c-15.23525,2.03137-22.345,53.8312-22.345,53.8312l-17.26661-17.26661,9.00241,20.70557a1013.49859,1013.49859,0,0,0-103.6226,8.34474c7.49729-23.35644,33.67921-45.80908,33.67921-45.80908-20.1314,6.26309-30.6047,16.46666-36.02556,25.9249a407.85873,407.85873,0,0,1,21.806-141.20492s-40.62732,91.41147-34.53322,152.35245l.77323,10.82523c-35.34514,5.51391-53.08091,11.01195-53.08091,11.01195Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<circle
|
||||
className="primary"
|
||||
cx="524.42503"
|
||||
cy="287.85888"
|
||||
r="158.76957"
|
||||
opacity="0.3"
|
||||
/>
|
||||
<polygon
|
||||
className="primary"
|
||||
points="459.223 85.873 353.51 214.137 509.965 398.782 614.268 276.156 459.223 85.873"
|
||||
/>
|
||||
<polygon
|
||||
points="459.223 85.873 353.51 214.137 509.965 398.782 614.268 276.156 459.223 85.873"
|
||||
opacity="0.1"
|
||||
/>
|
||||
<path
|
||||
d="M439.73866,380.56133h0a53.13136,53.13136,0,0,1,8.61915-11.50844l97.09359-98.43281s33.82807-5.638,40.87559,11.276L462.29072,383.38033Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#f2f2f2"
|
||||
/>
|
||||
<path
|
||||
className="primary"
|
||||
d="M434.8054,378.44707l143.76933,219.8825s14.095,9.86653,28.19007,4.22851l147.29308-99.37L597.603,266.39156,456.6527,376.33282Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
/>
|
||||
<rect
|
||||
x="480.03892"
|
||||
y="332.90544"
|
||||
width="111.09199"
|
||||
height="2.28426"
|
||||
transform="translate(-176.28508 210.29789) rotate(-35.7003)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="545.71885"
|
||||
y="372.62133"
|
||||
width="2.28442"
|
||||
height="214.62012"
|
||||
transform="translate(-256.01839 216.30687) rotate(-33.48132)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="608.59471"
|
||||
y="538.69279"
|
||||
width="118.96652"
|
||||
height="2.285"
|
||||
transform="translate(-271.96473 335.92317) rotate(-36.34406)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="656.36553"
|
||||
y="285.21166"
|
||||
width="2.28364"
|
||||
height="214.66085"
|
||||
transform="translate(-188.39818 280.94637) rotate(-34.83794)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="428.26937"
|
||||
y="320.21875"
|
||||
width="151.38646"
|
||||
height="1.4087"
|
||||
transform="translate(-166.32865 260.23205) rotate(-42.54484)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="432.98129"
|
||||
y="321.37736"
|
||||
width="155.49191"
|
||||
height="1.41013"
|
||||
transform="translate(-167.30716 253.62067) rotate(-41.43847)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="437.01734"
|
||||
y="322.42031"
|
||||
width="157.53272"
|
||||
height="1.41026"
|
||||
transform="translate(-169.30193 240.15132) rotate(-39.81273)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M1080.3065,460.85116c-6.48742-2.40493-14.53662-6.512-19.52606-10.86231l3.51655,9.72008h-62.80416v2.28445h62.80423l-3.51662,9.72232C1065.76988,467.36542,1073.81908,463.25831,1080.3065,460.85116Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#fff"
|
||||
/>
|
||||
<path
|
||||
d="M199.64939,459.70893H136.84517l3.51661-9.72232c-4.98943,4.35028-13.03863,8.45739-19.52606,10.86455,6.48743,2.40492,14.53663,6.512,19.52606,10.86231l-3.51654-9.72009h62.80415Z"
|
||||
transform="translate(-82 -165.01433)"
|
||||
fill="#fff"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
export default Books;
|
@ -0,0 +1,156 @@
|
||||
export default () => (
|
||||
<svg
|
||||
data-name="Layer 1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="100%"
|
||||
height="100%"
|
||||
viewBox="0 0 1077.38187 752.8614"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<title>learning</title>
|
||||
<ellipse cx="455" cy="681.8614" rx="455" ry="23" fill="#3f3d56" />
|
||||
<ellipse cx="899.33839" cy="721" rx="178.04348" ry="9" fill="#3f3d56" />
|
||||
<ellipse
|
||||
cx="396.05573"
|
||||
cy="743.8614"
|
||||
rx="178.04348"
|
||||
ry="9"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M894.39081,547.00164l15.975-11.10408,33.10933-42.6179a5.803,5.803,0,0,0-1.02243-8.1427h0a5.803,5.803,0,0,0-8.1427,1.02243l-33.10933,42.6179Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<path
|
||||
d="M1036.98725,141.8572s-20.09094-18.01257-47.10979,15.93419-69.2791,50.57374-78.97817,63.73677c0,0,40.18187-16.627,54.03769-23.55489s13.163-5.54233,13.163-5.54233S959.39466,205.594,955.9307,218.757s-.69279,24.24768-6.92791,37.41071,119.16,9.00628,119.16,9.00628,12.47024-21.47652,9.00628-43.64583S1075.78354,144.62836,1036.98725,141.8572Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<path
|
||||
d="M997.49816,195.20211s4.84954,33.94675-15.93419,41.56745-13.163,18.01257-13.163,18.01257l31.17559,15.2414,33.254-10.39186,11.08466-16.627s-18.01257-4.15674-13.163-16.627,6.23512-16.627,6.23512-16.627Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#ffb9b9"
|
||||
/>
|
||||
<path
|
||||
d="M997.49816,195.20211s4.84954,33.94675-15.93419,41.56745-13.163,18.01257-13.163,18.01257l31.17559,15.2414,33.254-10.39186,11.08466-16.627s-18.01257-4.15674-13.163-16.627,6.23512-16.627,6.23512-16.627Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
opacity="0.1"
|
||||
/>
|
||||
<path
|
||||
d="M1084.78982,292.19284s-4.84953,63.73677-3.464,66.50794,0,99.0691,0,99.0691,9.69907,51.95933-2.77117,54.73049-9.69907-58.19444-9.69907-58.19444l-12.47024-80.36375,1.38558-79.671Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#ffb9b9"
|
||||
/>
|
||||
<path
|
||||
d="M1084.78982,292.19284s-4.84953,63.73677-3.464,66.50794,0,99.0691,0,99.0691,9.69907,51.95933-2.77117,54.73049-9.69907-58.19444-9.69907-58.19444l-12.47024-80.36375,1.38558-79.671Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
opacity="0.1"
|
||||
/>
|
||||
<path
|
||||
d="M949.69558,484.09594s-22.8621,86.59887-22.16931,128.85912,9.69908,101.14749,9.69908,101.14749,1.38558,25.63326-.6928,28.40443,10.39187,14.54861,10.39187,14.54861l13.163-7.6207,4.84953-5.54233V739.043s-7.6207-23.55489-1.38558-42.26025,9.69908-65.81514,3.464-80.36375l42.953-127.47354Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#ffb9b9"
|
||||
/>
|
||||
<path
|
||||
d="M948.31,745.97093s-8.31349-10.39186-13.85582-6.92791-14.54861,27.01885-14.54861,27.01885-31.17559,29.79-9.00628,31.17559,31.86838-6.23512,34.63955-11.77744,28.40443-20.09094,28.40443-20.09094-2.77117-26.32606-6.92791-27.01885-10.39187,10.39186-10.39187,10.39186Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<path
|
||||
d="M1025.2098,489.63827v85.90608a265.61637,265.61637,0,0,0,2.07837,31.17559c2.07837,15.24141-11.77744,128.85913-11.77744,128.85913l1.38558,20.09093,17.31977-1.38558,2.07837-17.31977,24.94048-76.207s8.31349-46.417,4.15675-63.73677,21.47652-128.16633,21.47652-128.16633Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#ffb9b9"
|
||||
/>
|
||||
<path
|
||||
d="M1011.354,750.82047l5.13095-1.1155s3.87533-8.58358,8.72487-6.5052a52.29963,52.29963,0,0,1,9.64308,5.778l2.13437,3.921s4.84953,10.39186,11.08465,17.31977,13.163,22.16932,2.77117,23.5549-24.24769,2.07837-28.40443-1.38558-1.38559-9.00629-5.54233-10.39187-7.6207-5.54233-6.92791-6.92791S1011.354,750.82047,1011.354,750.82047Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<circle cx="963.90073" cy="114.70489" r="33.25397" fill="#ffb9b9" />
|
||||
<path
|
||||
d="M967.01536,242.31189l9.15108-3.19485s-3.60876,5.966,15.78939,9.43,39.48716,4.69031,48.4944-6.66113c0,0,3.46493-1.65236,8.31446,3.19718s7.6207,3.464,7.6207,3.464l-3.46395,18.01257-6.92791,33.254-9.00628,24.94048-25.63327-5.54233-27.71164-20.09094L973.25048,272.1019V247.16143Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M1051.53586,252.011l6.92791-4.84954s23.55489,4.15674,24.94047,15.2414l-18.01256,34.63955a39.43665,39.43665,0,0,1-.6928,29.79c-6.92791,15.93419-6.23511,19.39815-6.23511,19.39815l-4.84954,20.78373-87.98445,6.92791s-3.464-8.31349-4.84954-9.69908-1.38558-6.23512,0-6.23512,0-2.07837-1.38558-4.15674-2.07838-2.77117,0-5.54233-3.464-27.71164-3.464-27.71164V293.57842l-23.55489-31.17559s8.31349-12.47024,12.47024-13.85582,23.93018-6.84988,23.93018-6.84988l4.47425,6.588,6.23511,50.14279,9.00629,30.4828,37.921-6.4431,14.73113-24.73249,9.69908-29.09722Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M1077.86191,258.24608l5.54233,4.15675s4.84954,38.79629,3.464,41.56746-25.63327,5.54233-26.32606,4.15674S1077.86191,258.24608,1077.86191,258.24608Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M927.52627,300.50633s4.84954,63.73677,3.464,66.50794,0,99.06911,0,99.06911-9.69908,51.95932,2.77116,54.73048,9.69907-58.19444,9.69907-58.19444l12.47024-80.36375-1.38558-79.671Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#ffb9b9"
|
||||
/>
|
||||
<path
|
||||
d="M963.5514,238.84794l6.92791,45.7242s-6.23512,67.89352-4.84953,81.74934l1.38558,4.15674s-2.77117-1.38558-3.464,1.38558,0,11.77745,0,11.77745-4.15674,4.15675-5.54233,27.01885-18.01256,77.59259-11.77744,79.671,43.64583,12.47024,63.73677,10.39187,92.1412-26.32606,91.44841-32.56118-35.33234-94.21957-35.33234-94.21957-6.23512-10.39187-6.23512-11.77745,8.31349-6.92791,6.23512-12.47024-13.163-63.73677-13.163-63.73677l7.6207-41.56746-10.39187-2.77116-7.6207,40.18188s-29.79,14.54861-60.9656,1.38558l-6.92791-47.10979Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<path
|
||||
d="M937.91814,260.32446l-5.54233,2.07837s-10.39187,43.64583-7.6207,43.64583,36.02513,4.15675,36.02513,2.77117-6.23512-35.33234-6.23512-35.33234Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M998.88374,159.177s51.26653,35.33234,65.12235,19.39815-24.24768-29.79-24.24768-29.79l-31.86839-3.464Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<path
|
||||
d="M200.92177,73.5693v676h581v-676Zm31,620a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,693.5693Zm0-49a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,644.5693Zm0-48a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,596.5693Zm0-49a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,547.5693Zm0-49a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,498.5693Zm0-48a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,450.5693Zm0-49a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,401.5693Zm0-49a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,352.5693Zm0-48a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,304.5693Zm0-49a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,255.5693Zm0-49a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,206.5693Zm0-47a10,10,0,1,1,10-10A10,10,0,0,1,231.92177,159.5693Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#f2f2f2"
|
||||
/>
|
||||
<polygon
|
||||
points="720.613 51.338 720.613 49.338 208.369 49.338 208.369 0 206.369 0 206.369 49.338 139.613 49.338 139.613 51.338 206.369 51.338 206.369 98 139.613 98 139.613 100 206.369 100 206.369 146.662 139.613 146.662 139.613 148.662 206.369 148.662 206.369 195.323 139.613 195.323 139.613 197.323 206.369 197.323 206.369 243.984 139.613 243.984 139.613 245.984 206.369 245.984 206.369 292.646 139.613 292.646 139.613 294.646 206.369 294.646 206.369 341.307 139.613 341.307 139.613 343.307 206.369 343.307 206.369 389.969 139.613 389.969 139.613 391.969 206.369 391.969 206.369 438.63 139.613 438.63 139.613 440.63 206.369 440.63 206.369 487.291 139.613 487.291 139.613 489.291 206.369 489.291 206.369 535.953 139.613 535.953 139.613 537.953 206.369 537.953 206.369 584.614 139.613 584.614 139.613 586.614 206.369 586.614 206.369 633.275 139.613 633.275 139.613 635.275 206.369 635.275 206.369 676 208.369 676 208.369 635.275 720.613 635.275 720.613 633.275 208.369 633.275 208.369 586.614 720.613 586.614 720.613 584.614 208.369 584.614 208.369 537.953 720.613 537.953 720.613 535.953 208.369 535.953 208.369 489.291 720.613 489.291 720.613 487.291 208.369 487.291 208.369 440.63 720.613 440.63 720.613 438.63 208.369 438.63 208.369 391.969 720.613 391.969 720.613 389.969 208.369 389.969 208.369 343.307 720.613 343.307 720.613 341.307 208.369 341.307 208.369 294.646 720.613 294.646 720.613 292.646 208.369 292.646 208.369 245.984 720.613 245.984 720.613 243.984 208.369 243.984 208.369 197.323 720.613 197.323 720.613 195.323 208.369 195.323 208.369 148.662 720.613 148.662 720.613 146.662 208.369 146.662 208.369 100 720.613 100 720.613 98 208.369 98 208.369 51.338 720.613 51.338"
|
||||
fill="#3f3d56"
|
||||
opacity="0.3"
|
||||
/>
|
||||
<path
|
||||
d="M330.708,246.74812A115.52164,115.52164,0,0,1,311.3301,258.8944c-4.42374,2.19545-9.332,4.14965-14.184,3.22885s-9.20857-5.87908-7.72695-10.59016a8.37291,8.37291,0,0,1,6.45035-5.32576,14.82177,14.82177,0,0,1,8.56019,1.23515,24.614,24.614,0,0,1,11.61812,10.30863c1.3557,2.36085,2.41819,5.06806,4.66927,6.59912a13.26556,13.26556,0,0,0,5.92919,1.71587c4.90385.613,9.936,1.21989,14.74016.0606s9.40688-4.48312,10.63233-9.27079"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="none"
|
||||
stroke="#3f3d56"
|
||||
stroke-miterlimit="10"
|
||||
stroke-width="2"
|
||||
/>
|
||||
<path
|
||||
d="M367.77212,223.93324q.5697,22.03112-.6164,44.061l10.422-1.96912c3.84158-.72583,8.21217-1.8346,9.94821-5.33756,1.61855-3.26589.07816-7.38857-2.61649-9.84307s-6.28526-3.62586-9.7586-4.73115l-5.68956-1.81052"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="none"
|
||||
stroke="#3f3d56"
|
||||
stroke-miterlimit="10"
|
||||
stroke-width="2"
|
||||
/>
|
||||
<path
|
||||
d="M423.94585,240.12547c-3.80521-.52743-7.68742-1.03211-11.46876-.3544s-7.51209,2.73639-9.25544,6.15962c-3.22011,6.323,1.71343,14.10944,7.96549,17.46516a25.7699,25.7699,0,0,0,16.99049,2.55775"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="none"
|
||||
stroke="#3f3d56"
|
||||
stroke-miterlimit="10"
|
||||
stroke-width="2"
|
||||
/>
|
||||
<path
|
||||
d="M340.27594,189.821q-14.35418,13.49653-28.70834,0a39.49152,39.49152,0,0,1-12.14583-28.83483V73.5693h53v87.41691A39.49152,39.49152,0,0,1,340.27594,189.821Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M636.62178,500.29928c0,81.83-48.64,110.4-108.65,110.4-1.39,0-2.78-.02-4.16-.05-2.78-.06-5.54-.18994-8.26-.38-54.16-3.83-96.23-33.87-96.23-109.97,0-78.74,100.62-178.11,108.2-185.48a.0098.0098,0,0,1,.01-.01c.29-.29.44-.43.44-.43S636.62178,418.47927,636.62178,500.29928Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M524.0118,598.17929l39.74-55.52-39.84,61.62-.1,6.37c-2.78-.06-5.54-.18994-8.26-.38l4.28-81.86-.03-.64.07-.11.41-7.74-39.93994-61.77,40.05994,55.97.1,1.64,3.23-61.85-34.19-63.83,34.61,52.98,3.37-128.24.01-.44v.43l-.56,101.12,34.04-40.09-34.18006,48.80005-.9,55.38,31.79-53.15-31.92,61.3-.5,30.79,46.13-73.98005-46.31,84.72Z"
|
||||
transform="translate(-61.30906 -73.5693)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
</svg>
|
||||
);
|
@ -0,0 +1,440 @@
|
||||
export default () => (
|
||||
<svg
|
||||
data-name="Layer 1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="100%"
|
||||
height="100%"
|
||||
viewBox="0 0 849.27339 842.0024"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<path
|
||||
d="M1017.36324,449.9988a420.16054,420.16054,0,0,1-24.06988,140.65c-.01.03-.02.05-.03.08-.07.21-.14.4-.22.61005v.01q-5.115,14.36993-11.24,28.26a420.75416,420.75416,0,0,1-37.06,66.82q-5.22,7.71-10.81,15.17-6.15,8.25-12.69,16.17-6.02994,7.305-12.38,14.33-7.545,8.36993-15.54,16.31a421.1605,421.1605,0,0,1-39.88,35q-3.68994,2.865-7.46,5.63-8.775,6.47992-17.9,12.5a417.43693,417.43693,0,0,1-41.57,24.16c-2.47,1.26-4.96,2.5-7.46,3.7q-14.505,7.005-29.6,12.89c-2.87,1.12994-5.75,2.22-8.66,3.27-.49.19-.98.37-1.48.54a418.30469,418.30469,0,0,1-107.06,23.37994q-3.81.34506-7.63.58-4.05.285-8.11.46c-2.14.11-4.27.19-6.42.25-.44.02-.89.04-1.33.04q-4.335.135-8.7.17c-1.23.01-2.46.02-3.7.02-.58,0-1.16,0-1.74-.01q-12.58494-.045-24.98-.82c-.17-.01-.34-.03-.51-.03-2.96-.2-5.91-.41-8.85-.67q-15.705-1.32-31.07-3.80005-3.54-.555-7.06-1.19995-15.285-2.70008-30.17-6.51-4.425-1.125-8.8-2.35a416.97535,416.97535,0,0,1-49.47-17.18q-13.875-5.82-27.23-12.58-6.015-3.045-11.91-6.28c-1.07-.58-2.13-1.17-3.19-1.76q-11.61-6.48-22.74-13.66-9.12-5.865-17.9-12.2c-.72-.5-1.43-1.02-2.13995-1.54q-6.73507-4.905-13.25-10.06-14.175-11.23507-27.34-23.61-9.105-8.54992-17.68-17.63995a421.7005,421.7005,0,0,1-79.77-120.33q-6.21-14.175-11.4-28.87a.1852.1852,0,0,1-.02-.07,420.34592,420.34592,0,0,1-23.78-139.83c0-176.76,108.94-328.08,263.34-390.48a422.11757,422.11757,0,0,1,344,12.87C921.74331,141.1188,1017.36324,284.39882,1017.36324,449.9988Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#f2f2f2"
|
||||
/>
|
||||
<path
|
||||
d="M782.70333,72.38882v532.01h-344v-544.88a422.11757,422.11757,0,0,1,344,12.87Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#fff"
|
||||
/>
|
||||
<path
|
||||
d="M521.485,314.99758c9.3319-15.43417,20.38981-31.91327,37.70741-36.953,20.055-5.83628,40.65646,5.75771,58.13126,17.19859A1693.94636,1693.94636,0,0,1,768.07446,406.31451l-.0527.59912q-56.24626-3.87885-112.4924-7.75763c-27.092-1.86831-55.11468-3.99432-79.05647-16.81052-9.0851-4.86325-17.9411-11.35959-28.236-11.81227-12.79047-.56236-23.94295,8.37051-32.70725,17.70329C463.686,443.443,448.68343,527.86682,390.52,576.36982A1845.84726,1845.84726,0,0,1,521.485,314.99758Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#f2f2f2"
|
||||
/>
|
||||
<path
|
||||
d="M807.86486,85.95834c-.87-.58-1.75-1.13-2.62-1.69a380.24064,380.24064,0,0,0-80.31-38.93l-6.54,90.22h-41.46v-103.39c-2.61-.54-5.24-1.05-7.87-1.53v104.92H619.79475A102.26991,102.26991,0,0,1,517.52484,33.28846v-.0001c-2.64.57-5.26,1.18-7.88,1.83v100.44h-40.13l-6.23-86.03a380.85838,380.85838,0,0,0-81.94,43.53c-.44.3-.88.61-1.31.91-2.21,1.55-4.39,3.13-6.56,4.73005v502.19h118.27l-2.09-28.95-11.5-316.95h231.59l-11.5,316.95-2.09,28.95h116.96v-511.45Q810.50479,87.66839,807.86486,85.95834Zm-298.22,142.78h-33.39l-6.17-85.3h39.56Zm159.42,0H612.98486v-1.69a6.17976,6.17976,0,0,0-6.19-6.18h-24.38a6.17757,6.17757,0,0,0-6.18,6.18v1.69h-58.71v-85.3h151.54Zm7.87,0v-85.3h40.89l-6.17,85.3Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M993.29435,590.64659c-.01.03-.01995.05005-.03.08-.07.21-.14.4-.22.61v.01q-5.115,14.37-11.24,28.26l-771.24-.84q-6.21-14.17492-11.4-28.87a.185.185,0,0,1-.02-.06995Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect x="394.71108" y="564.93783" width="135" height="18" fill="#fff" />
|
||||
<path
|
||||
d="M391.37332,770.20882q.72006-6.34506,1.99-12.61a146.2005,146.2005,0,0,1,28.98-61.94c8.25.46,15.48-.8,16.17-16.78.13-2.84,2.24-5.31,2.7-8.11-.78.11-1.59.17-2.37.22-.25.01-.51.03-.75.04h-.09a4.48911,4.48911,0,0,1-3.69-7.32c.34-.41.68-.83,1.02-1.25.51-.65,1.04-1.28,1.56-1.92.06-.07.11-.13.17-.2.59-.73,1.18-1.46,1.78-2.19a13.00546,13.00546,0,0,0-4.26-4.12c-5.95-3.49-14.16-1.07-18.46,4.31-4.31,5.38-5.13,12.94-3.63,19.66,1.28,5.76,4.07,11.04,7.2,16.06-.32.41-.66.81-.98,1.23a147.30448,147.30448,0,0,0-15.35,24.31995c1.22-9.53-13.69-43.93-19.46-51.22-6.93-8.75-21.13-4.93-22.35,6.17-.01.1-.03.21-.04.32.86.48,1.7.99,2.52,1.54a6.1491,6.1491,0,0,1-2.48,11.19l-.13.02c-11.46,16.37,25.29,58.98,34.5,49.42a145.10452,145.10452,0,0,0-5.53,19.94,147.47532,147.47532,0,0,0-2.56,18.09,142.31363,142.31363,0,0,0,.11,22.99,2.51,2.51,0,0,1-.04-.27c-2.05-16.66-37.12-41.43-47.36-39.37-5.9,1.19-11.71.92-10.81,6.87.01.1.03.19.04.29a39.40435,39.40435,0,0,1,4.63,2.23c.86.48,1.7,1,2.52,1.54a6.15739,6.15739,0,0,1-1.56994,10.99q6.525,5.145,13.25,10.06c.71.52,1.42,1.04,2.13995,1.54q8.77506,6.33,17.9,12.2,11.13,7.17,22.74,13.66c1.06.59,2.12,1.18,3.19,1.76a143.52854,143.52854,0,0,1-4.06-33.81A139.72284,139.72284,0,0,1,391.37332,770.20882Zm5.47-35.73.02-.03a.07626.07626,0,0,1-.02.05Zm-7.97,71.91-.31-.69c.01-.51.01-1.01,0-1.53,0-.13995-.03-.28-.03-.42.12.89.22,1.78.35,2.67Zm45.93,1.36c.11-.46.2-.78.31-1.24-.04-.1-.08-.2-.12-.29-3.33-7.93-20.91,8.06-28.51,19.63q13.35,6.75,27.23,12.58c.62-.78,1.26-1.55,1.89-2.33.06-.07.11-.13.16-.2,1.36-1.68,2.73-3.34,4.08-5.02.01-.33.01-.66.01-.98a60.25046,60.25046,0,0,0-1.76-14.29A4.53593,4.53593,0,0,1,434.80331,807.7488Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#fff"
|
||||
/>
|
||||
<path
|
||||
d="M651.12082,599.6243a19.952,19.952,0,0,0,29.48674-8.15653l70.59455,6.603-17.33122-32.51408L669.49015,564.271a20.06011,20.06011,0,0,0-18.36928,35.35313Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#ffb6b6"
|
||||
/>
|
||||
<path
|
||||
d="M722.70333,597.39882l97.69042,10.952.33663-.43078c.64425-.82344,64.56564-82.64615,75.30539-102.12391a58.89048,58.89048,0,0,0,6.81965-38.57106l-.07326-.32417-.25427-.215a29.885,29.885,0,0,0-37.36866-.8194,211.683,211.683,0,0,0-61.088,75.48336l-8.07961,16.821-73.28832,7.22795Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M643.44574,826.24119l-18.82,43.82q-4.05.285-8.11.46c-2.14.11-4.27.19-6.42005.25l-.73.23-.6-.19q-4.335.13494-8.7.17c-1.23.01-2.46.02-3.7.02-.58,0-1.16,0-1.74-.01l1.25-4.28,1.47-5.06995,5.84-20.08,8.43-28.99,12.54,5.38Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#ffb6b6"
|
||||
/>
|
||||
<path
|
||||
d="M779.05572,829.40116q-14.505,7.00507-29.6,12.89l-9.84-16.55,31.72-13.93Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#ffb6b6"
|
||||
/>
|
||||
<path
|
||||
d="M845.98572,754.18119v34.86q-8.775,6.48-17.9,12.5v-47.36Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#cacaca"
|
||||
/>
|
||||
<path
|
||||
d="M908.86572,732.10118q-7.545,8.37-15.54,16.31a421.16821,421.16821,0,0,1-39.88,35h-79.8a14.87932,14.87932,0,0,1-11.19-5.07l-.01-.03a14.72686,14.72686,0,0,1-3.36005-6.6l-.01-.02a15.30172,15.30172,0,0,1-.34-3.2v-21.47a14.92992,14.92992,0,0,1,14.91-14.92Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M941.74573,648.30119l-8.65,37.06a77.90193,77.90193,0,0,1,.84,16.24q-6.15006,8.25-12.69,16.17-6.03,7.30507-12.38,14.33-7.545,8.37-15.54,16.31c-13.88,4.36-30.24,6.14-47.34,6.26-5.9.05-11.89-.11-17.9-.43-24.37-1.28-49.02-5.19-69.21-9.25-5.34-1.06-10.36-2.14-14.98-3.19-8.75-1.97-16.07-3.81-21.37006-5.21-5.97-1.56-9.37-2.57-9.37-2.57l-22.71,38.03-20.62,34.52-26.57,33.91q-3.81006.345-7.63.58-4.05.285-8.11.46c-2.14.11-4.27.19-6.42005.25l-.73.23-.6-.19-9.64-3.07-3.25-1.03-11.69-3.72s2.61-8.22,7.18-21.93c1.68-5.03,13.58-42.22,26.03-74.69,3.68994-9.64,7.51-19.42,11.43994-29.15,3.22-7.99,6.5-15.95,9.82-23.8,5.77-13.61,33.65-20.95,66.48-24.8,1.67-.19,3.35-.38,5.04-.56,16.73-1.76,34.48-2.67,51.08-3.09,8.31-.21,16.33-.29,23.79-.3q3.61506,0,7.03.02h.01c6.15.03,11.81006.12,16.79.22.97.02,1.91.05,2.83.07h.01c.62.01,1.23.03,1.83.04,10.89.28,17.57.62,17.57.62l2.59-20.32.53-4.1.5-3.9v-.01l.06-.49.41-.01,7.2-.14,60.52-1.18,25.77761-1.09237Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<path
|
||||
d="M777.51575,812.70121c-2.47,1.26-4.96,2.5-7.46,3.7q-14.505,7.00507-29.6,12.89c-2.87006,1.13-5.75,2.22-8.66,3.27-.32-.45-.65-.9-.98-1.35-13.88-19.05-22.52-31.19-40.37-59.16-7.47-11.7-14.98-23.9-22.27-36.36l52.78-24.64,5.92-2.76,17.02,33.51,15.18,29.89,3.38,6.65Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<circle cx="687.76443" cy="331.42827" r="48.62546" fill="#ffb6b6" />
|
||||
<path
|
||||
d="M949.92572,511.57121c-.4-40.16.78-28.53-2.4-42.36-8.54-37.18-43.99-43.96-50.17-44.8a13.64475,13.64475,0,0,0-18.45-7.61l-11.83132,6.13544c-11.47,5.25-4.50865,12.83453-8.46867,24.80456l-4.16,12.7-34.09,94.23,6.9,35.85.01.02,4.65,24.15,13.78762,15.70762-.25759-2.50761-.31.48-.01.01-.8,1.19c1.11.61,2.21,1.21,3.29,1.81q4.2,2.31,8.19,4.53c.64.36,1.27.71,1.9,1.07h.01c.4.22.80005.44,1.19.66,9.98,5.58-26.96,15.74-18.75,20.51,1.14.66,2.27,1.32,3.38,1.97,37.8,22.11,67.96,49.65,77.71,57.65q6.54-7.92,12.69-16.17,5.58-7.455,10.81-15.17c.61-4.02,1.02-8.04,1.42-11.98.48-4.74-2.02-48.65-1.18-53.48.37-2.14-1.05-4.17-2.42-6.13-1.27-1.83-2.47-3.55-2.22-5.17.26-1.67,2.1-3.49,3.89-5.26,1.95-1.94,3.97-3.94,4.26-6.05.8-5.88-2.49-11.78-1.87-17.7q1.53-14.445,2.35-28.98Q950.13074,531.61119,949.92572,511.57121Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M675.66113,610.0611a19.952,19.952,0,0,1,30.53533,1.89492l67.71168-21.03135-10.24723,35.39111-62.72916,14.546a20.06012,20.06012,0,0,1-25.27055-30.80056Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#ffb6b6"
|
||||
/>
|
||||
<path
|
||||
d="M757.75092,629.64l125.68249-25.91161-32.61794,8.07909c.36985-.97793,37.02907-98.12215,41.48215-119.91425a58.89049,58.89049,0,0,0-4.97429-38.85217l-.16646-.28765-.30674-.12951a29.885,29.885,0,0,0-35.91772,10.34437,211.68306,211.68306,0,0,0-35.84187,90.24876l-2.70466,18.46373-44.3115,13.25584Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M523.5256,590.06885a6.4162,6.4162,0,0,0,6.1831,4.331l26.49183-.68178a6.32848,6.32848,0,0,0,5.98085-4.657l3.74888-40.08721a9.79394,9.79394,0,0,0,4.23793.87078,9.66133,9.66133,0,0,0-.4849-19.31658,8.18458,8.18458,0,0,0-1.73618.18057,6.54764,6.54764,0,0,0-4.874-2.103l-40.75051,1.05229a5.85307,5.85307,0,0,0-1.00519.1248,6.36455,6.36455,0,0,0-4.87318,8.26464ZM566.69906,546.252l2.66763-9.55274a6.50649,6.50649,0,0,0,.02037-3.37458c.12943-.00034.24362-.06169.37306-.062a6.91049,6.91049,0,0,1,.32357,13.81714A6.50522,6.50522,0,0,1,566.69906,546.252Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<path
|
||||
d="M521.31736,529.78271c.86818,4.96412,10.62909,8.45387,22.36585,7.84729,10.79271-.49726,19.61746-4.287,21.23421-8.7785a6.02511,6.02511,0,0,0-1.84436-.24588l-40.75051,1.05229A5.85307,5.85307,0,0,0,521.31736,529.78271Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M344.10608,493.49293v85.704a4.12233,4.12233,0,0,0,4.11906,4.11907H475.22963a4.12231,4.12231,0,0,0,4.11906-4.11907v-85.704a4.12431,4.12431,0,0,0-4.11906-4.11452H348.22514A4.12433,4.12433,0,0,0,344.10608,493.49293Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M347.08554,494.55929v83.58039a2.20523,2.20523,0,0,0,2.20141,2.20141H474.1724a2.20521,2.20521,0,0,0,2.20141-2.20141V494.55929a2.20621,2.20621,0,0,0-2.20141-2.206H349.287A2.20623,2.20623,0,0,0,347.08554,494.55929Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="var(--primary)"
|
||||
/>
|
||||
<path
|
||||
d="M341.4499,595.91146a2.46988,2.46988,0,0,0,1.94347.92984H479.38532a2.50242,2.50242,0,0,0,2.44606-3.0157l-2.111-10.02722a2.50694,2.50694,0,0,0-1.55811-1.81784,2.42471,2.42471,0,0,0-.888-.1675H345.496a2.42455,2.42455,0,0,0-.888.1675,2.5067,2.5067,0,0,0-1.5581,1.81784l-2.111,10.02722A2.50049,2.50049,0,0,0,341.4499,595.91146Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
<rect
|
||||
x="472.11993"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(773.06505 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="463.74295"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(756.31109 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="455.36597"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(739.55713 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="446.98899"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(722.80316 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="438.61201"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(706.0492 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="430.23502"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(689.29523 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="421.85804"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(672.54127 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="413.48106"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(655.78731 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="405.10408"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(639.03334 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="396.7271"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(622.27938 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="388.35012"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(605.52542 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="379.97313"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(588.77145 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="371.59615"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(572.01749 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="363.21917"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(555.26352 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="354.84219"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(538.50956 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="346.46521"
|
||||
y="583.61891"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(521.7556 1140.75211) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="472.21892"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(773.26303 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="463.84194"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(756.50906 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="455.46496"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(739.7551 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="447.08797"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(723.00113 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="438.71099"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(706.24717 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="430.33401"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(689.49321 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="421.95703"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(672.73924 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="413.58005"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(655.98528 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="405.20306"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(639.23132 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="396.82608"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(622.47735 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="388.4491"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(605.72339 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="380.07212"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(588.96942 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="371.69514"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(572.21546 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="363.31816"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(555.4615 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="354.94117"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(538.70753 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="346.56419"
|
||||
y="587.8074"
|
||||
width="4.18849"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(521.95357 1149.12909) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<rect
|
||||
x="402.68997"
|
||||
y="592.83359"
|
||||
width="33.50793"
|
||||
height="2.51309"
|
||||
rx="0.48819"
|
||||
transform="translate(663.52456 1159.18147) rotate(-180)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M648.32293,591.25093l56.83985-49.69388c2.70269-2.3629-2.45138,4.67679-.0884,7.37958s11.34765.04451,8.645,2.40741l-56.83985,49.69388-14.39438,3.28664Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M648.32293,591.25093l1.37767-1.20447a15.76262,15.76262,0,0,1,4.83,3.74695,15.92864,15.92864,0,0,1,3.39531,6.32961l-1.04646.9149-11.47226,2.618-2.92212.66866,1.21839-2.73887Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#ccc"
|
||||
/>
|
||||
<path
|
||||
d="M643.7035,601.58569a2.97777,2.97777,0,0,1,1.70373,2.07021l-2.92212.66866Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#3f3d56"
|
||||
/>
|
||||
<path
|
||||
d="M1019.18331,431.97878c-5.36,8.02-13.94,13.57-23.18,16.32a48.48669,48.48669,0,0,1-11.54,1.96,43.63174,43.63174,0,0,0-3.43-12.82,36.02165,36.02165,0,0,1-1.78,12.79,42.8682,42.8682,0,0,1-16.87-4.52c-10.25-5.25-18.14-15.29-19.89-26.68-2.06-13.30005,3.97-26.36,6.15-39.64,2.19-13.28-1.92-30.1-14.92-33.59-9.9-2.66-8.79-1.51-17.02,4.6,8.56092,12.65821-23.05963,59.045-36,55-7.31622-2.28695-12-9-13.51-9-10.17,17.52,8.98,47.04-10.32,53.17l1.59-1.59c11.65-14.33-12.7-44.66-1.05-58.99,3.25-4.01,6.71-8.76,5.75-13.83-.91-4.82-8.56-7.37-10.8-3.41,4.03-9.23-1.92-21.55-11.77-23.92-8.75-2.11-8.59.49-17.37,1.62a43.57308,43.57308,0,0,0-3.19-11.01,35.72529,35.72529,0,0,1-1.31,11.22,14.08849,14.08849,0,0,1-8.52-3.08c-7.16-5.77-5.71-17.89.68-24.5,6.4-6.61,15.91-8.99,24.98-10.53,2.63665-18.36081,53.29522-20.27612,60.01-1.93,2.86-13.7,20.01-20.81,33.34-16.56s22.58,16.7,27.45,29.82c4.87,13.11,6.23,27.22,9.23,40.88s8.07,27.57,18.51,36.88c10.44,9.3,27.45,12.38,38.45,3.74C1026.32333,413.37881,1024.53341,423.94881,1019.18331,431.97878Z"
|
||||
transform="translate(-175.36331 -28.9988)"
|
||||
fill="#2f2e41"
|
||||
/>
|
||||
</svg>
|
||||
);
|
@ -1,10 +0,0 @@
|
||||
@charset "utf-8";
|
||||
|
||||
body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@import "../node_modules/bulma/bulma.sass";
|
||||
|
||||
$schema-main: $white;
|
||||
$schema-inverted: $black;
|
@ -1,20 +0,0 @@
|
||||
import "solid-js";
|
||||
import { render } from 'solid-js/web';
|
||||
import { Router } from "solid-app-router";
|
||||
import App from './app';
|
||||
|
||||
import "./index.scss"
|
||||
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
|
||||
render(() => (
|
||||
<Router>
|
||||
<App />
|
||||
</Router>
|
||||
),
|
||||
document.getElementById('root') as Node);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||
serviceWorker.unregister();
|
@ -0,0 +1,15 @@
|
||||
import React from "react";
|
||||
import { Outlet } from "react-router-dom";
|
||||
import { BaseLayoutWrapper } from "./styled";
|
||||
import Navbar from "../../components/Navbar/Navbar";
|
||||
|
||||
const Base: React.FC = () => {
|
||||
return (
|
||||
<BaseLayoutWrapper>
|
||||
<Navbar />
|
||||
<Outlet />
|
||||
</BaseLayoutWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default Base;
|
@ -0,0 +1,9 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export const BaseLayoutWrapper = styled.div`
|
||||
display: flex;
|
||||
padding: 0 0 0 var(--navbar-width);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
`;
|
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 155.3"><path d="M163 35S110-4 69 5l-3 1c-6 2-11 5-14 9l-2 3-15 26 26 5c11 7 25 10 38 7l46 9 18-30z" fill="#76b3e1"/><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="27.5" y1="3" x2="152" y2="63.5"><stop offset=".1" stop-color="#76b3e1"/><stop offset=".3" stop-color="#dcf2fd"/><stop offset="1" stop-color="#76b3e1"/></linearGradient><path d="M163 35S110-4 69 5l-3 1c-6 2-11 5-14 9l-2 3-15 26 26 5c11 7 25 10 38 7l46 9 18-30z" opacity=".3" fill="url(#a)"/><path d="M52 35l-4 1c-17 5-22 21-13 35 10 13 31 20 48 15l62-21S92 26 52 35z" fill="#518ac8"/><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="95.8" y1="32.6" x2="74" y2="105.2"><stop offset="0" stop-color="#76b3e1"/><stop offset=".5" stop-color="#4377bb"/><stop offset="1" stop-color="#1f3b77"/></linearGradient><path d="M52 35l-4 1c-17 5-22 21-13 35 10 13 31 20 48 15l62-21S92 26 52 35z" opacity=".3" fill="url(#b)"/><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="18.4" y1="64.2" x2="144.3" y2="149.8"><stop offset="0" stop-color="#315aa9"/><stop offset=".5" stop-color="#518ac8"/><stop offset="1" stop-color="#315aa9"/></linearGradient><path d="M134 80a45 45 0 00-48-15L24 85 4 120l112 19 20-36c4-7 3-15-2-23z" fill="url(#c)"/><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="75.2" y1="74.5" x2="24.4" y2="260.8"><stop offset="0" stop-color="#4377bb"/><stop offset=".5" stop-color="#1a336b"/><stop offset="1" stop-color="#1a336b"/></linearGradient><path d="M114 115a45 45 0 00-48-15L4 120s53 40 94 30l3-1c17-5 23-21 13-34z" fill="url(#d)"/></svg>
|
Before Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,15 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import App from "./App";
|
||||
import { AuthUserProvider } from "./providers/AuthUser";
|
||||
import GlobalStyles from "./styles/GlobalStyles";
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<GlobalStyles />
|
||||
<AuthUserProvider>
|
||||
<App />
|
||||
</AuthUserProvider>
|
||||
</React.StrictMode>,
|
||||
document.getElementById("root")
|
||||
);
|
@ -0,0 +1,6 @@
|
||||
interface User {
|
||||
username: string,
|
||||
email: string,
|
||||
}
|
||||
|
||||
export default User
|
@ -0,0 +1,39 @@
|
||||
import React, { useState } from "react";
|
||||
import { WiredCard, WiredTextarea } from "wired-elements-react";
|
||||
|
||||
import { LearnOuterWrapper, LearnInnerWrapper } from "./styled";
|
||||
|
||||
import Header from "../../components/Header/Header";
|
||||
import TextareaWithLabel from "../../components/TextareaWithLabel/TextareaWithLabel";
|
||||
|
||||
const Learn: React.FC = () => {
|
||||
const [back, setBack] = useState("");
|
||||
const onChangeFront: React.ChangeEventHandler<HTMLTextAreaElement> = (e) => {
|
||||
setBack(e.target.value);
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Header title="Lernen" />
|
||||
<LearnOuterWrapper>
|
||||
<LearnInnerWrapper>
|
||||
<TextareaWithLabel
|
||||
label="Vorderseite"
|
||||
value={"Front"}
|
||||
onChange={onChangeFront}
|
||||
disabled
|
||||
/>
|
||||
<TextareaWithLabel
|
||||
label="Rückseite"
|
||||
value={back}
|
||||
placeholder={"answer here"}
|
||||
onChange={onChangeFront}
|
||||
/>
|
||||
<WiredCard />
|
||||
<WiredCard />
|
||||
</LearnInnerWrapper>
|
||||
</LearnOuterWrapper>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Learn;
|
@ -0,0 +1,21 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export const LearnOuterWrapper = styled.div`
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding-top: calc(48px + var(--toolbar-height));
|
||||
padding-bottom: var(--toolbar-height);
|
||||
`;
|
||||
|
||||
export const LearnInnerWrapper = styled.div`
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
grid-template-areas:
|
||||
"frond back"
|
||||
"tip answer";
|
||||
gap: 16px;
|
||||
padding: 0 16px;
|
||||
`;
|
@ -1,16 +0,0 @@
|
||||
.coolbg {
|
||||
background: linear-gradient(
|
||||
rgba(0, 0, 0, 0.5),
|
||||
rgba(0, 0, 0, 0.5)
|
||||
), url('https://unsplash.it/1200/900?random') no-repeat center center fixed;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
.isomatrix {
|
||||
position: relative;
|
||||
transform-style: preserve-3d;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
transform: rotate(-30deg) skew(30deg)
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
.hero .nav, .hero.is-success .nav {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.hero .subtitle {
|
||||
padding: 3rem 0;
|
||||
line-height: 1.5;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
import { Link } from 'solid-app-router';
|
||||
import { Component } from 'solid-js';
|
||||
import Navbar from "../componets/navbar";
|
||||
import styles from "./home.module.scss";
|
||||
import "./home.scss";
|
||||
|
||||
const Home: Component = () => {
|
||||
return (
|
||||
<>
|
||||
<section class={`hero is-info ${styles.coolbg}`}>
|
||||
<div class={`hero-body`}>
|
||||
<div class="container has-text-centered">
|
||||
<div class="column is-6 is-offset-3">
|
||||
<h1 class="title">
|
||||
Wok Able
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
The easy to use vacabulary learing system
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<Navbar />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Home;
|
@ -0,0 +1,42 @@
|
||||
import React, { useCallback, useState } from "react";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { useAuthUser } from "../providers/AuthUser";
|
||||
|
||||
const Login: React.FC = () => {
|
||||
const { login } = useAuthUser();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [username, setUsername] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const handleLogin = () => {
|
||||
console.log("handeling login");
|
||||
console.log(username);
|
||||
console.log(password);
|
||||
login({ username, password }).then((res) => {
|
||||
res ? navigate("/app") : alert("Someting went wrong");
|
||||
});
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor="username"></label>
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
id="username"
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
/>
|
||||
<label htmlFor="password"></label>
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
id="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
/>
|
||||
<input type="submit" value="Login" onClick={handleLogin} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Login;
|
@ -0,0 +1,62 @@
|
||||
import React, { useCallback, useState } from "react";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { useAuthUser } from "../providers/AuthUser";
|
||||
|
||||
const Register: React.FC = () => {
|
||||
const { register } = useAuthUser();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [username, setUsername] = useState("");
|
||||
const [email, setEmail] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const [passwordcheck, setPasswordcheck] = useState("");
|
||||
const handleRegister = () => {
|
||||
if (password !== passwordcheck) {
|
||||
alert("password doesn't match");
|
||||
return;
|
||||
}
|
||||
|
||||
register({ email, username, password }).then((res) => {
|
||||
res ? navigate("/app") : alert("Someting went wrong");
|
||||
});
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor="username">Username</label>
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
id="username"
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
/>
|
||||
<label htmlFor="email">Email</label>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
id="email"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
/>
|
||||
<label htmlFor="password">Password</label>
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
id="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
/>
|
||||
<label htmlFor="passwordcheck">Reenter Password</label>
|
||||
<input
|
||||
type="password"
|
||||
name="passwordcheck"
|
||||
id="passwordcheck"
|
||||
value={passwordcheck}
|
||||
onChange={(e) => setPasswordcheck(e.target.value)}
|
||||
/>
|
||||
<input type="submit" value="Login" onClick={handleRegister} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Register;
|
@ -0,0 +1,95 @@
|
||||
import {
|
||||
createContext,
|
||||
useCallback,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState,
|
||||
} from "react";
|
||||
import axios from "axios";
|
||||
import User from "../models/User";
|
||||
|
||||
interface IAuthUserContext {
|
||||
authenticated: boolean;
|
||||
user?: User | undefined;
|
||||
login: (user: AuthCredentials) => Promise<boolean>;
|
||||
logout: () => Promise<void>;
|
||||
register: (user: RegisterCredentials) => Promise<boolean>;
|
||||
}
|
||||
const AuthUserContext = createContext<null | IAuthUserContext>(null);
|
||||
|
||||
export interface AuthCredentials {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface RegisterCredentials extends AuthCredentials {
|
||||
email: string;
|
||||
}
|
||||
|
||||
export const AuthUserProvider: React.FC = ({ children }) => {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [authenticated, setAuthenticated] = useState<boolean>(false);
|
||||
const [user, setUser] = useState<User>();
|
||||
const login = useCallback(async (user: AuthCredentials) => {
|
||||
try {
|
||||
const res = await axios.post<User>("/api/auth/login", user);
|
||||
setUser(res.data);
|
||||
setAuthenticated(true);
|
||||
return true;
|
||||
} catch {
|
||||
setAuthenticated(false);
|
||||
return false;
|
||||
}
|
||||
}, []);
|
||||
const logout = useCallback(async () => {
|
||||
await axios.get("/api/auth/logout");
|
||||
setAuthenticated(false);
|
||||
setUser(undefined);
|
||||
}, []);
|
||||
|
||||
const register = useCallback(async (user: RegisterCredentials) => {
|
||||
try {
|
||||
const res = await axios.post<User>("/api/auth/register", user);
|
||||
setUser(res.data);
|
||||
setAuthenticated(true);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const verify = async () => {
|
||||
try {
|
||||
const res = await axios.get<User>("/api/auth/verify");
|
||||
setUser(res.data);
|
||||
setAuthenticated(true);
|
||||
} catch {
|
||||
setAuthenticated(false);
|
||||
setUser(undefined);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
verify();
|
||||
}, []);
|
||||
|
||||
return loading ? (
|
||||
<h1>Loading...</h1>
|
||||
) : (
|
||||
<AuthUserContext.Provider
|
||||
value={{ authenticated, user, login, logout, register }}
|
||||
>
|
||||
{children}
|
||||
</AuthUserContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export const useAuthUser = () => {
|
||||
const context = useContext(AuthUserContext);
|
||||
|
||||
if (!context)
|
||||
throw new Error("useAuthUser can only be used inside AuthContextProvider");
|
||||
|
||||
return context;
|
||||
};
|
@ -1,11 +0,0 @@
|
||||
import { lazy } from "solid-js";
|
||||
import type { RouteDefinition } from "solid-app-router";
|
||||
|
||||
import Home from "./pages/home"
|
||||
|
||||
export const routes: RouteDefinition[] = [
|
||||
{
|
||||
path: "/",
|
||||
component: Home
|
||||
}
|
||||
]
|
@ -1,135 +0,0 @@
|
||||
// This optional code is used to register a service worker.
|
||||
// register() is not called by default.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
// it offline capabilities. However, it also means that developers (and users)
|
||||
// will only see deployed updates on subsequent visits to a page, after all the
|
||||
// existing tabs open on the page have been closed, since previously cached
|
||||
// resources are updated in the background.
|
||||
|
||||
// To learn more about the benefits of this model and instructions on how to
|
||||
// opt-in, read https://bit.ly/CRA-PWA
|
||||
|
||||
const isLocalhost = Boolean(
|
||||
window.location.hostname === 'localhost' ||
|
||||
// [::1] is the IPv6 localhost address.
|
||||
window.location.hostname === '[::1]' ||
|
||||
// 127.0.0.1/8 is considered localhost for IPv4.
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
);
|
||||
|
||||
export function register(config) {
|
||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||
// The URL constructor is available in all browsers that support SW.
|
||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
||||
if (publicUrl.origin !== window.location.origin) {
|
||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||
// from what our page is served on. This might happen if a CDN is used to
|
||||
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
||||
|
||||
if (isLocalhost) {
|
||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||
checkValidServiceWorker(swUrl, config);
|
||||
|
||||
// Add some additional logging to localhost, pointing developers to the
|
||||
// service worker/PWA documentation.
|
||||
navigator.serviceWorker.ready.then(() => {
|
||||
console.log(
|
||||
'This web app is being served cache-first by a service ' +
|
||||
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
// Is not localhost. Just register service worker
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function registerValidSW(swUrl, config) {
|
||||
navigator.serviceWorker
|
||||
.register(swUrl)
|
||||
.then(registration => {
|
||||
registration.onupdatefound = () => {
|
||||
const installingWorker = registration.installing;
|
||||
if (installingWorker == null) {
|
||||
return;
|
||||
}
|
||||
installingWorker.onstatechange = () => {
|
||||
if (installingWorker.state === 'installed') {
|
||||
if (navigator.serviceWorker.controller) {
|
||||
// At this point, the updated precached content has been fetched,
|
||||
// but the previous service worker will still serve the older
|
||||
// content until all client tabs are closed.
|
||||
console.log(
|
||||
'New content is available and will be used when all ' +
|
||||
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
||||
);
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onUpdate) {
|
||||
config.onUpdate(registration);
|
||||
}
|
||||
} else {
|
||||
// At this point, everything has been precached.
|
||||
// It's the perfect time to display a
|
||||
// "Content is cached for offline use." message.
|
||||
console.log('Content is cached for offline use.');
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onSuccess) {
|
||||
config.onSuccess(registration);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error during service worker registration:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkValidServiceWorker(swUrl, config) {
|
||||
// Check if the service worker can be found. If it can't reload the page.
|
||||
fetch(swUrl)
|
||||
.then(response => {
|
||||
// Ensure service worker exists, and that we really are getting a JS file.
|
||||
const contentType = response.headers.get('content-type');
|
||||
if (
|
||||
response.status === 404 ||
|
||||
(contentType != null && contentType.indexOf('javascript') === -1)
|
||||
) {
|
||||
// No service worker found. Probably a different app. Reload the page.
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister().then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// Service worker found. Proceed as normal.
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(
|
||||
'No internet connection found. App is running in offline mode.'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function unregister() {
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister();
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
import { createGlobalStyle } from 'styled-components';
|
||||
import Variables from './Variables';
|
||||
|
||||
export const GlobalStyles = createGlobalStyle`
|
||||
${Variables};
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
html{
|
||||
scroll-behavior: smooth;
|
||||
box-sizing: inherit;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: calc(100% + 0px);
|
||||
}
|
||||
#root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
// Scrollbar styles
|
||||
body::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
body::-webkit-scrollbar-thumb {
|
||||
background-color: var(--black);
|
||||
border-radius: 10px;
|
||||
}
|
||||
body {
|
||||
margin: 0 auto;
|
||||
font-family: var(--font-main);
|
||||
background-color: var(--white);
|
||||
color: var(--black);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: calc(100% + 0px);
|
||||
}
|
||||
ul, li, ol {
|
||||
list-style: none;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--black);
|
||||
transition: var(--transition);
|
||||
:hover {
|
||||
color: var(--blue)
|
||||
}
|
||||
}
|
||||
.link {
|
||||
position: relative;
|
||||
:hover::after {
|
||||
width: 100%;
|
||||
}
|
||||
::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 2px;
|
||||
border-radius: 1px;
|
||||
width: 0px;
|
||||
background-color: var(--blue);
|
||||
transition: var(--transition);
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default GlobalStyles;
|
@ -0,0 +1,17 @@
|
||||
import {css} from "styled-components";
|
||||
|
||||
const Variables = css`
|
||||
:root {
|
||||
--font-main: 'Gloria Hallelujah', cursive;
|
||||
--navbar-width: 200px;
|
||||
--toolbar-height: 64px;
|
||||
|
||||
--size-2: 64px;
|
||||
--size-3: 32px;
|
||||
|
||||
--background: white;
|
||||
--foreground: black;
|
||||
}
|
||||
`;
|
||||
|
||||
export default Variables;
|
@ -1,9 +0,0 @@
|
||||
import { createEffect } from "solid-js";
|
||||
import { Store, SetStoreFunction, createStore } from "solid-js/store"
|
||||
|
||||
export function createLocalStore<T>(initState: T, name: string): [Store<T>, SetStoreFunction<T>] {
|
||||
const [state, setState] = createStore(initState);
|
||||
if (localStorage[name]) setState(JSON.parse(localStorage[name]))
|
||||
createEffect(() => (localStorage[name] = JSON.stringify(state)))
|
||||
return [state, setState]
|
||||
}
|
@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
@ -1,24 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2015",
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"target": "ESNext",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"allowJs": false,
|
||||
"skipLibCheck": false,
|
||||
"esModuleInterop": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
"jsxImportSource": "solid-js"
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"files": [
|
||||
"./node_modules/solid-scripts/types/solid-app.d.ts"
|
||||
],
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
"include": ["src"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node"
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [ react()]
|
||||
})
|
Loading…
Reference in New Issue