-
+ // Sync React state with the HTML class required by Tailwind CSS
+ useEffect(() => {
+ if (isDarkMode) {
+ document.documentElement.classList.add('dark');
+ } else {
+ document.documentElement.classList.remove('dark');
+ }
+ }, [isDarkMode]);
-
-
-
- Dein Game-Backlog unter Kontrolle.
-
-
- Willkommen bei deiner neuen Applikation. Hier werden bald deine Spiele aus dem
- game-service gelistet.
-
-
+ const toggleLanguage = () => {
+ if (i18n.language === 'de') {
+ i18n.changeLanguage('en').then(r => console.log("Changed language to 'en'"));
+ } else {
+ i18n.changeLanguage('de').then(r => console.log("Changed language to 'de'"));
+ }
+ };
-
- {mockGames.map((n) => {
- return (
-
-
-
+ return (
+
+
+
+
+ Game Log
+
+
+
+
+
+
+ {t('login')}
+
-
-
Beispiel Spiel {n}
-
Status: In Warteschlange
-
- Dies ist ein Platzhalter für ein Spiel in deiner Liste. Später kommen hier echte Daten per API.
-
-
-
-
-
-
- );
- })}
-
-
+
-
-
- );
+
+
+ }/>
+ }/>
+ }/>
+
+
+
+
+
+
+ );
}
export default App;
\ No newline at end of file
diff --git a/src/assets/hero.png b/src/assets/hero.png
deleted file mode 100644
index cc51a3d..0000000
Binary files a/src/assets/hero.png and /dev/null differ
diff --git a/src/assets/vite.svg b/src/assets/vite.svg
deleted file mode 100644
index 5101b67..0000000
--- a/src/assets/vite.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/assets/vue.svg b/src/assets/vue.svg
deleted file mode 100644
index 770e9d3..0000000
--- a/src/assets/vue.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/i18n.js b/src/i18n.js
new file mode 100644
index 0000000..b899a46
--- /dev/null
+++ b/src/i18n.js
@@ -0,0 +1,19 @@
+import i18n from 'i18next';
+import {initReactI18next} from 'react-i18next';
+import HttpBackend from 'i18next-http-backend';
+
+
+i18n.use(HttpBackend)
+ .use(initReactI18next)
+ .init({
+ lng: 'de',
+ fallbackLng: 'en',
+ backend: {
+ loadPath: '/i18n/{{lng}}.json',
+ },
+ interpolation: {
+ escapeValue: false
+ }
+ });
+
+export default i18n;
\ No newline at end of file
diff --git a/src/main.jsx b/src/main.jsx
index 7003646..85bc3cc 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -1,6 +1,7 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App.jsx';
+import './i18n';
import './style.css';
import '@mdi/font/css/materialdesignicons.css';
diff --git a/src/pages/ImprintPage.jsx b/src/pages/ImprintPage.jsx
new file mode 100644
index 0000000..477298e
--- /dev/null
+++ b/src/pages/ImprintPage.jsx
@@ -0,0 +1,28 @@
+import {useTranslation} from 'react-i18next';
+
+export default function ImprintPage() {
+ const {t} = useTranslation();
+
+ return (
+
+
+
+ {t('IMPRINT.TITLE')}
+
+
+
{t('IMPRINT.LEGAL')}
+
+ Andreas Dahm
+ Bgm.-Germeier-Str. 2
+ 85586 Poing
+ Deutschland
+
+
+ {t('IMPRINT.CONTACT')}
+
+
Email: andreas.dahm@gmail.com
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/pages/LandingPage.jsx b/src/pages/LandingPage.jsx
new file mode 100644
index 0000000..6a6bafd
--- /dev/null
+++ b/src/pages/LandingPage.jsx
@@ -0,0 +1,22 @@
+import {useTranslation} from 'react-i18next';
+import {Link} from 'react-router-dom';
+
+export default function LandingPage() {
+ const {t} = useTranslation();
+
+ return (
+
+
+
+ {t('welcome')}
+
+
+ Organize your pile of shame. Track, manage, and conquer your gaming backlog like never before.
+
+
+ Get Started
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/pages/LoginPage.jsx b/src/pages/LoginPage.jsx
new file mode 100644
index 0000000..3524584
--- /dev/null
+++ b/src/pages/LoginPage.jsx
@@ -0,0 +1,92 @@
+import {useTranslation} from 'react-i18next';
+import {useState} from 'react';
+
+export default function LoginPage() {
+ const {t} = useTranslation();
+
+ const [email, setEmail] = useState('');
+ const [password, setPassword] = useState('');
+ const [emailError, setEmailError] = useState('');
+ const [passwordError, setPasswordError] = useState('');
+
+ const handleLogin = (e) => {
+ e.preventDefault();
+
+ setEmailError('');
+ setPasswordError('');
+
+ let hasError = false;
+
+ if (!email.includes('@') && !email.includes('.')) {
+ setEmailError(t('LOGIN.ERROR_EMAIL'));
+ hasError = true;
+ }
+
+ if (password.trim() === '') {
+ setPasswordError(t('LOGIN.ERROR_PASSWORD'));
+ hasError = true;
+ }
+
+ // Stop execution if form inputs are invalid
+ if (hasError) {
+ return;
+ }
+
+ // Proceed with API authentication
+ console.log('Login attempt with:', email);
+ };
+
+ return (
+
+
+
+ {t('LOGIN.TITLE')}
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/style.css b/src/style.css
index a461c50..ffc5adb 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1 +1,3 @@
-@import "tailwindcss";
\ No newline at end of file
+@import "tailwindcss";
+
+@custom-variant dark (&:is(.dark *));
\ No newline at end of file