Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kleine Veränderungen #86

Merged
merged 2 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_API_HOST="https://nachhilfe.gymhaan.de"
REACT_APP_API_HOST="https://nachhilfe.gymhaan.de/api"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
Expand Down
5 changes: 3 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Nachhilfe Website am GymHaan" />
<meta name="robots" content="index" />
<meta name="keywords" content="," />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="" />
<link
Expand All @@ -24,8 +26,7 @@
<body>
<noscript
>You need to enable JavaScript to run this app. / Du musst JavaScript
aktivieren, um diese Website zu benutzen.</noscript
>
aktivieren, um diese Website zu benutzen.</noscript>
<div id="root"></div>
</body>
</html>
14 changes: 14 additions & 0 deletions src/Components/ExternalLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons";

const ExternalLink = (): JSX.Element => {
return (
<FontAwesomeIcon
icon={faExternalLinkAlt}
size={"sm"}
style={{ verticalAlign: "middle" }}
/>
);
};

export default ExternalLink;
2 changes: 1 addition & 1 deletion src/Components/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Page = (props: {
return (
<main className={`${css.page} ${props.center ? "center" : "nocenter"}`}>
<div id={css.title}>
<h1>{props.title}</h1>
<h1 style={{ fontSize: "2rem" }}>{props.title}</h1>
</div>
<div
id={css.content}
Expand Down
1 change: 0 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import App from "./App";

export const API_HOST =
process.env.REACT_APP_API_HOST || "https://nachhilfe.gymhaan.de/api";
// export const API_HOST = "http://localhost:5001";

export const checkEmail = (mail: string): boolean => {
// eslint-disable-next-line no-control-regex
Expand Down
1 change: 0 additions & 1 deletion src/pages/AdminDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { ResponsivePie } from "@nivo/pie";
import { Fragment, useContext, useEffect, useState } from "react";
import { useNavigate } from "react-router";
import { Link } from "react-router-dom";
import { visitFunctionBody } from "typescript";
import { API_HOST } from "..";
import Alert from "../Components/Alert";
import LoadingScreen from "../Components/LoadingScreen";
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Find.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ const Find = (): JSX.Element => {
<div className={css.result} key={index}>
<h2>
<Link to={`/user/${result.userId}`}>{result.name}</Link>,
Stufe/Klasse {result.grade}
Stufe {result.grade}
</h2>
<p>{result.misc}</p>
<p className={css.email}>
Expand All @@ -513,7 +513,7 @@ const Find = (): JSX.Element => {
</a>
</p>
<p>
{result.subjectName} bis Stufe/Klasse {result.maxGrade}
{result.subjectName} bis Stufe {result.maxGrade}
</p>
<div className={css.messengers}>
<MessengerInfo
Expand Down
13 changes: 8 additions & 5 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import css from "../styles/Home.module.scss";
import { Link } from "react-router-dom";
import ExternalLink from "../Components/ExternalLink";

const Home = (): JSX.Element => {
document.title = "Nachhilfe GymHaan";
Expand All @@ -23,25 +24,27 @@ const Home = (): JSX.Element => {
<p>
Durch die Nutzung dieser Seite erklärst du dich mit den{" "}
<Link to="/privacy" className={css.link}>
Datenschutzbestimmungen einverstanden.
</Link>
Datenschutzbestimmungen
</Link>{" "}
einverstanden.
</p>
<p>
<a href="https://instagram.com/sv.gymhaan">Link zur SV</a>
<a href="https://instagram.com/sv.gymhaan">
Link zur SV <ExternalLink />
</a>
</p>
</div>
<div id={css.choices}>
<div className={css.choice}>
<Link to="/find">
<h1>
Ich <span className={css.backdrop}>brauche Nachhilfe</span>
<span className={css.backdrop}>Nachhilfe finden</span>
</h1>
</Link>
</div>
<div className={css.choice}>
<Link to="/register">
<h1>
Ich möchte{" "}
<span className={css.backdrop}>Nachhilfe geben</span>
</h1>
</Link>
Expand Down
11 changes: 6 additions & 5 deletions src/pages/Imprint.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import ExternalLink from "../Components/ExternalLink";
import Page from "../Components/Page";
import css from "../styles/Imprint.module.scss";

const Imprint = (): JSX.Element => {
const imprint: string = "https://gymhaan.de/unsere-schule/impressum/";

return (
<Page title="Impressum">
Das Impressum unserer Schule ist zu finden auf:{" "}
<a href={imprint}>{imprint}</a>
Das Impressum unserer Schule ist{" "}
<a href={"https://gymhaan.de/unsere-schule/impressum/"}>
hier <ExternalLink />
</a>{" "}
zu finden.
</Page>
);
};
Expand Down
10 changes: 5 additions & 5 deletions src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import lottie from "lottie-web";

import { API_HOST, checkEmail } from "../index";
import Alert from "../Components/Alert";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons";

const Required = (): JSX.Element => {
return <span className={css.required}></span>;
Expand Down Expand Up @@ -68,12 +70,10 @@ const LoginPage = (): JSX.Element => {
{displayAnimation ? (
<div id={css.animationContainer} ref={animationRef} />
) : null}
<h3>Anmelden mit Link per E-Mail</h3>
<p>
Wenn du dich so anmeldest, kriegt du einen Link per E-Mail (deine
Schul-E-Mail-Adresse) zugeschickt womit du dich für 30 Tage auf einem
Du kriegst einen Link per E-Mail (an deine hinterlegte E-Mail-Adresse) zugeschickt, mit dem du dich 30 Tage lang auf einem
Gerät authentifizieren kannst.{" "}
<a href="https://outlook.office365.com/mail/">Link zu Outlook</a>
<a href="https://outlook.office365.com/mail/">Link zu Outlook <FontAwesomeIcon icon={faExternalLinkAlt}/></a>
</p>
<div className={css["inputFields"]}>
<form
Expand All @@ -98,7 +98,7 @@ const LoginPage = (): JSX.Element => {
</div>
<input
type="submit"
value="Login (ohne Passwort)"
value="Login"
className={general["text_button"]}
disabled={!checkEmail(otpEmail)}
/>
Expand Down
8 changes: 0 additions & 8 deletions src/pages/Privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -730,14 +730,6 @@ const Privacy = () => {
Löschen.{" "}
</li>
</ul>
<p className="seal">
<a
href="https://datenschutz-generator.de/"
title="Rechtstext von Dr. Schwenke - für weitere Informationen bitte anklicken."
target="_blank"
rel="noopener noreferrer nofollow"
></a>
</p>
</Page>
);
};
Expand Down
4 changes: 3 additions & 1 deletion src/pages/UserDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const UserDashboard = (): JSX.Element => {
</button>
</div>
</div>
<h4>Dein Profil</h4>
<h4>Mein Profil</h4>
<form
id={css.profileForm}
onKeyDown={(e) => {
Expand All @@ -306,6 +306,7 @@ const UserDashboard = (): JSX.Element => {
emailButtonRef.current.scrollIntoView();
}
}}
style={{ cursor: "default" }}
/>
<label htmlFor="name">Name</label>
<input
Expand All @@ -329,6 +330,7 @@ const UserDashboard = (): JSX.Element => {
...{ grade: parseInt(e.target.value) },
});
}}
style={{ cursor: "pointer" }}
>
<option value="">--- Stufe wählen ---</option>
{[...Array(13 - 4).keys()].map((grade, index) => {
Expand Down
7 changes: 4 additions & 3 deletions src/pages/UserPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Rank } from "../Components/Rank";
import { RequestState, User } from "../Models";
import css from "../styles/userPage.module.scss";
import FourOFourPage from "./404";
import UserDashboard from "./UserDashboard";

export const UserPage = () => {
const userId = useParams()["id"];
Expand Down Expand Up @@ -37,8 +36,10 @@ export const UserPage = () => {
{user.name}
<span>#{user.id}</span> <Rank authLevel={user.authLevel} />
</h2>
<h3>Klasse/Stufe {user.grade}</h3>
<h3>E-Mail: {user.email}</h3>
<h3>Stufe {user.grade}</h3>
<h3>
E-Mail: <a href={`mailto:${user.email}`}>{user.email}</a>
</h3>
<div id={css.messengers}>
<MessengerInfo
hasDiscord={user.hasDiscord}
Expand Down
2 changes: 0 additions & 2 deletions src/styles/general.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,8 @@ $normal_font_size: 14pt;
width: 100%;
display: flex;
flex-direction: row;

border-radius: 0.3rem;
box-shadow: 0 0 0 2px var(--text_color);

background-color: var(--contrast_bg_color);
}

Expand Down
2 changes: 1 addition & 1 deletion src/styles/page.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#content {
color: var(--text_color);
font-size: 11pt !important;
font-size: 1.2rem;
}

#content.nocenter {
Expand Down