Formatting #48
13 changed files with 30 additions and 40 deletions
|
@ -8,9 +8,9 @@
|
||||||
:root {
|
:root {
|
||||||
--primary: rgb(41, 63, 87);
|
--primary: rgb(41, 63, 87);
|
||||||
--primary-contr: rgb(9, 11, 46);
|
--primary-contr: rgb(9, 11, 46);
|
||||||
--secondary: rgb(218,218,218);
|
--secondary: rgb(218, 218, 218);
|
||||||
--third: rgb(171, 183, 183);
|
--third: rgb(171, 183, 183);
|
||||||
--forth: rgb(255,255,255);
|
--forth: rgb(255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
.home,
|
.home,
|
||||||
|
|
|
@ -3,7 +3,6 @@ import Navbar from "./components/Navbar";
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
|
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
|
||||||
import Home from "./components/pages/Home";
|
import Home from "./components/pages/Home";
|
||||||
import SignUp from "./components/pages/SignUp";
|
|
||||||
import Ueber from "./components/pages/Ueber";
|
import Ueber from "./components/pages/Ueber";
|
||||||
import Lizenzen from "./components/pages/lizenzen";
|
import Lizenzen from "./components/pages/lizenzen";
|
||||||
import Privacy from "./components/pages/Privacy";
|
import Privacy from "./components/pages/Privacy";
|
||||||
|
@ -21,7 +20,6 @@ function App() {
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path="/" exact component={Home} />
|
<Route path="/" exact component={Home} />
|
||||||
<Route path="/services" component={Ueber} />
|
<Route path="/services" component={Ueber} />
|
||||||
<Route path="/sign-up" component={SignUp} />
|
|
||||||
<Route path="/lizenzen" component={Lizenzen} />
|
<Route path="/lizenzen" component={Lizenzen} />
|
||||||
<Route path="/privacy" component={Privacy} />
|
<Route path="/privacy" component={Privacy} />
|
||||||
<Route path="/login" component={Login} />
|
<Route path="/login" component={Login} />
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
import { createAuthProvider } from "react-token-auth";
|
import { createAuthProvider } from "react-token-auth";
|
||||||
|
|
||||||
export const [useAuth, authFetch, login, logout] =
|
export const [useAuth, authFetch, login, logout] = createAuthProvider({
|
||||||
createAuthProvider({
|
accessTokenKey: "access_token",
|
||||||
accessTokenKey: 'access_token',
|
onUpdateToken: (token) =>
|
||||||
onUpdateToken: (token) => fetch('/api/refresh', {
|
fetch("/api/refresh", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
body: token.access_token
|
body: token.access_token,
|
||||||
})
|
}).then((r) => r.json()),
|
||||||
.then(r => r.json())
|
});
|
||||||
})
|
|
||||||
|
|
|
@ -14,4 +14,4 @@ const PrivateRoute = ({ component: Component, ...rest }) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PrivateRoute
|
export default PrivateRoute;
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
||||||
import "./Button.css";
|
import "./Button.css";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
|
|
||||||
const STYLES = ["btn--primary", "btn--outline"];
|
const STYLES = ["btn--primary", "btn--outline"];
|
||||||
|
|
||||||
const SIZES = ["btn--medium", "btn--large"];
|
const SIZES = ["btn--medium", "btn--large"];
|
||||||
|
|
|
@ -5,7 +5,12 @@ function InputField(props) {
|
||||||
return (
|
return (
|
||||||
<label className="input-field">
|
<label className="input-field">
|
||||||
<p>{props.LabelName}</p>
|
<p>{props.LabelName}</p>
|
||||||
<input name={props.InputName} onChange={props.onChange} type={props.InputType} placeholder={props.InputPlaceHolder}/>
|
<input
|
||||||
|
name={props.InputName}
|
||||||
|
onChange={props.onChange}
|
||||||
|
type={props.InputType}
|
||||||
|
placeholder={props.InputPlaceHolder}
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import "./Input.css"
|
import "./Input.css";
|
||||||
import "./Button.css"
|
import "./Button.css";
|
||||||
|
|
||||||
function SubmitField(props) {
|
function SubmitField(props) {
|
||||||
const InputValue = props.LabelName;
|
const InputValue = props.LabelName;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React from "react";
|
||||||
import "../../App.css";
|
import "../../App.css";
|
||||||
import Footer from "../../Footer";
|
import Footer from "../../Footer";
|
||||||
|
|
||||||
export default function SignUp() {
|
export default function Privacy() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<h1>Privacy</h1>
|
<h1>Privacy</h1>
|
||||||
|
|
|
@ -6,8 +6,8 @@ import InputField from "../InputField";
|
||||||
import SubmitField from "../SubmitField";
|
import SubmitField from "../SubmitField";
|
||||||
|
|
||||||
export default function Login() {
|
export default function Login() {
|
||||||
const [username, setUsername] = useState('')
|
const [username, setUsername] = useState("");
|
||||||
const [password, setPassword] = useState('')
|
const [password, setPassword] = useState("");
|
||||||
|
|
||||||
const onSubmitClick = (e) => {
|
const onSubmitClick = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -19,7 +19,7 @@ export default function Login() {
|
||||||
fetch("/api/register", {
|
fetch("/api/register", {
|
||||||
method: "post",
|
method: "post",
|
||||||
body: JSON.stringify(opts),
|
body: JSON.stringify(opts),
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUsernameChange = (e) => {
|
const handleUsernameChange = (e) => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useEffect, useState } from "react/cjs/react.development";
|
import { useEffect, useState } from "react/cjs/react.development";
|
||||||
import {authFetch} from "../../auth/AuthProvider.js"
|
import { authFetch } from "../../auth/AuthProvider.js";
|
||||||
|
|
||||||
function Secret() {
|
function Secret() {
|
||||||
const [message, setMessage] = useState("");
|
const [message, setMessage] = useState("");
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import "../../App.css";
|
|
||||||
import Footer from "../../Footer";
|
|
||||||
|
|
||||||
export default function SignUp() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<h1 className="sign-up">SIGN UP</h1>
|
|
||||||
<Footer />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -8,7 +8,8 @@ export default function Ueber() {
|
||||||
<div className="sitePage">
|
<div className="sitePage">
|
||||||
<h1>Über das Projekt</h1>
|
<h1>Über das Projekt</h1>
|
||||||
<p>
|
<p>
|
||||||
Im Rahmen meiner Bachelorthesis an der Fernfachhochschule Schweiz möchte ich der Frage nachgehen, wie sich die Verhaltensmerkmale in unterschiedlichen Situationen unterscheiden. Hierfür habe ich eine Webanwendung entwickelt, welche die Nutzerinnen und Nutzer möglichst einfach durch die Studie führt.
|
Im Rahmen meiner Bachelorthesis an der Fernfachhochschule Schweiz möchte ich der Frage nachgehen, wie sich die Verhaltensmerkmale in unterschiedlichen Situationen unterscheiden. Hierfür habe ich eine Webanwendung entwickelt, welche die Nutzerinnen und Nutzer möglichst
|
||||||
|
einfach durch die Studie führt.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Falls Sie Fragen haben, können Sie diese jederzeit per Mail stellen. Gerne kann ich auch meine Disposition zur Verfügung stellen.
|
Falls Sie Fragen haben, können Sie diese jederzeit per Mail stellen. Gerne kann ich auch meine Disposition zur Verfügung stellen.
|
||||||
|
|
Loading…
Reference in a new issue