From db93a32411e2a3ebeecccca4ff52df4104963392 Mon Sep 17 00:00:00 2001 From: cophilot Date: Fri, 9 Aug 2024 08:30:05 +0200 Subject: [PATCH] update: Fri 09 Aug 2024 08:30:05 CEST --- src/Routes.tsx | 2 ++ src/components/HomeButton/HomeButton.scss | 2 ++ src/components/HomeButton/HomeButton.tsx | 17 +++++++++++ src/components/RouteButton/RouteButton.scss | 2 ++ src/components/RouteButton/RouteButton.tsx | 31 +++++++++++++++++++ src/index.scss | 14 +++++++++ src/views/HomeView.tsx | 9 ++++-- src/views/PrivacyView.tsx | 34 +++++++++++++++++++++ 8 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 src/components/HomeButton/HomeButton.scss create mode 100644 src/components/HomeButton/HomeButton.tsx create mode 100644 src/components/RouteButton/RouteButton.scss create mode 100644 src/components/RouteButton/RouteButton.tsx create mode 100644 src/views/PrivacyView.tsx diff --git a/src/Routes.tsx b/src/Routes.tsx index 0e100b3..8278aeb 100644 --- a/src/Routes.tsx +++ b/src/Routes.tsx @@ -4,6 +4,7 @@ import ExpandableTable from './views/ExpandableTable'; import { getAllGames } from './allGames'; import StringUtils from './utils/StringUtils'; import CreateCustomView from './views/CreateCustomView/CreateCustomView'; +import PrivacyView from './views/PrivacyView'; function Routes() { const games = getAllGames(); @@ -25,6 +26,7 @@ function Routes() { /> ))} + diff --git a/src/components/HomeButton/HomeButton.scss b/src/components/HomeButton/HomeButton.scss new file mode 100644 index 0000000..018efff --- /dev/null +++ b/src/components/HomeButton/HomeButton.scss @@ -0,0 +1,2 @@ +.home-button { +} \ No newline at end of file diff --git a/src/components/HomeButton/HomeButton.tsx b/src/components/HomeButton/HomeButton.tsx new file mode 100644 index 0000000..167bf41 --- /dev/null +++ b/src/components/HomeButton/HomeButton.tsx @@ -0,0 +1,17 @@ +import RouteButton from '../RouteButton/RouteButton'; +import './HomeButton.scss'; + +/** + * This is a HomeButton component + * @author cophilot + * @version 1.0.0 + * @created 2024-8-9 + */ +function HomeButton() { + return ( + + Home + + ); +} +export default HomeButton; diff --git a/src/components/RouteButton/RouteButton.scss b/src/components/RouteButton/RouteButton.scss new file mode 100644 index 0000000..cfad534 --- /dev/null +++ b/src/components/RouteButton/RouteButton.scss @@ -0,0 +1,2 @@ +.route-button { +} \ No newline at end of file diff --git a/src/components/RouteButton/RouteButton.tsx b/src/components/RouteButton/RouteButton.tsx new file mode 100644 index 0000000..1d46632 --- /dev/null +++ b/src/components/RouteButton/RouteButton.tsx @@ -0,0 +1,31 @@ +import { useNavigate } from 'react-router-dom'; +import './RouteButton.scss'; + +interface RouteButtonProps { + to: string; + children: string; + small?: boolean; +} + +/** + * This is a RouteButton component + * @author cophilot + * @version 1.0.0 + * @created 2024-8-9 + */ +function RouteButton({ to, children, small = false }: RouteButtonProps) { + const navigate = useNavigate(); + + const className = 'btn selected ' + (small ? '' : 'wide'); + + return ( + + ); +} +export default RouteButton; diff --git a/src/index.scss b/src/index.scss index 9c4fdd2..85d1925 100644 --- a/src/index.scss +++ b/src/index.scss @@ -46,6 +46,10 @@ a { color: var(--primary-color); } +p { + font-size: 20px; +} + .btn { cursor: pointer; margin: 10px; @@ -139,3 +143,13 @@ a { margin: 10px; cursor: pointer; } + +.content { + max-width: 600px; +} + +@media screen and (max-width: 600px) { + .content { + max-width: 95%; + } +} diff --git a/src/views/HomeView.tsx b/src/views/HomeView.tsx index c58367b..1b3bd54 100644 --- a/src/views/HomeView.tsx +++ b/src/views/HomeView.tsx @@ -7,6 +7,7 @@ import Logo from '../components/Logo'; import DevMessage from '../components/DevMessage'; import GameButton from '../components/GameButton/GameButton'; import FavoriteGameSection from '../components/FavoriteGameSection/FavoriteGameSection'; +import RouteButton from '../components/RouteButton/RouteButton'; export default function HomeView() { const navigate = useNavigate(); @@ -66,9 +67,11 @@ export default function HomeView() { className="btn selected wide" onClick={() => { navigate('/custom/create'); - }}> - Create - */} + }}> + Create + */} +

Other

+ Privacy ); diff --git a/src/views/PrivacyView.tsx b/src/views/PrivacyView.tsx new file mode 100644 index 0000000..ff4d020 --- /dev/null +++ b/src/views/PrivacyView.tsx @@ -0,0 +1,34 @@ +import { useEffect } from 'react'; +import StyleUtils from '../api/utils/StyleUtils'; +import HomeButton from '../components/HomeButton/HomeButton'; +import Logo from '../components/Logo'; + +/** + * This is the PrivacyView + * @author cophilot + * @version 1.0.0 + * @created 2024-8-9 + */ +function PrivacyView() { + useEffect(() => { + StyleUtils.setDefaultValues(); + document.title = 'BoardScoreHub'; + }, []); + return ( +
+ +

BoardScoreHub Privacy

+

+ Only data is only kept in your browser. No data will be + sent to any server. This garantuees your privacy, but also means + that you cannot access your data from another device. This also + does not garantuee the persistence of your data. If you clear + your browser data, your data will be lost without any way to + recover it. +

+ +
+ ); +} + +export default PrivacyView;