diff --git a/app/[locale]/admin/OAuth.tsx b/app/[locale]/admin/OAuth.tsx deleted file mode 100644 index 3138813..0000000 --- a/app/[locale]/admin/OAuth.tsx +++ /dev/null @@ -1,46 +0,0 @@ -"use client" - -import { useEffect, useState } from "react" -import { useTranslations } from "next-intl" -import { signIn, getProviders } from "next-auth/react" - -const callbackUrl = '/admin/dashboard' - -export default function Component() { - const t = useTranslations() - - const [providers, setProviders] = useState>([]) - - useEffect(() => { getProviders().then(({ credentials, ...OAuth }: any) => setProviders(Object.values(OAuth))) }, []) - - return providers.length > 0 && ( - <> -
- - - - - ) -} \ No newline at end of file diff --git a/app/[locale]/admin/login/page.tsx b/app/[locale]/admin/login/page.tsx index efb1c5e..e56e976 100644 --- a/app/[locale]/admin/login/page.tsx +++ b/app/[locale]/admin/login/page.tsx @@ -1,43 +1,37 @@ "use client" -import Image from 'next/image' import { useTranslations } from 'next-intl' import { Link } from '@/helpers/navigation' -import OAuth from '../OAuth' import Credentials from './Credentials' -import aLogo from '@/assets/logo.webp' - export default function Page() { - const t = useTranslations('auth') + const t = useTranslations() return (
-
- - - -

- {t('sign-in-to-your-account')} -

+
+
+ +

+ {t('branding.title')} +

+ +
+

+ {t('branding.description')} +

- -
- ← {t('return-to-wiki')} + ← {t('auth.return-to-wiki')}
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 1881bba..9078d23 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,18 +1,21 @@ +import { useTranslations } from 'next-intl' import { Link } from '@/helpers/navigation' export default function Header() { + const t = useTranslations() + return (

- Wiki + {t('branding.title')}

- Maintained by Thijmen Heuvelink + {t('branding.description')}

) diff --git a/src/locales/en.json b/src/locales/en.json index 4b5dce3..4d26641 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,15 +1,7 @@ { - "next-leaflet": { - "an-optimized-tech-stack-for-efficiency": "An optimized tech stack for efficiency", - "report-an-issue": "Report an issue", - "dashboard": "Dashboard", - "contribute": "Contribute", - "back-to-homepage": "Back to homepage", - "sorry-we-could-not-find-the-page-you-are-looking-for": "Sorry, we could not find the page you are looking for", - "page-not-found": "Page not found", - "an-error-occurred": "An error occurred", - "sorry-something-unexpected-happened": "Sorry, something unexpected happened", - "try-again": "Try again" + "branding": { + "title": "Wiki", + "description": "Maintained by Thijmen Heuvelink" }, "dashboard": { "signed-in-as": "Signed in as", diff --git a/tailwind.config.js b/tailwind.config.js index be529f0..b3060cf 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -14,48 +14,7 @@ module.exports = { // then supply https://tailwindshades.com with your colors // to generate the objects that are required below. - primary: { - DEFAULT: '#11999E', - 50: '#76ECF0', - 100: '#64E9EE', - 200: '#3FE4EA', - 300: '#1ADFE6', - 400: '#15BDC3', - 500: '#11999E', - 600: '#0C686B', - 700: '#063739', - 800: '#010606', - 900: '#000000', - 950: '#000000' - }, - secondary: { - DEFAULT: '#119E7F', - 50: '#76F0D5', - 100: '#64EED0', - 200: '#3FEAC5', - 300: '#1AE6B9', - 400: '#15C39D', - 500: '#119E7F', - 600: '#0C6B56', - 700: '#06392E', - 800: '#010605', - 900: '#000000', - 950: '#000000' - }, - accent: { - DEFAULT: '#092A2C', - 50: '#28BBC4', - 100: '#25ABB3', - 200: '#1E8B92', - 300: '#176B70', - 400: '#104A4E', - 500: '#092A2C', - 600: '#000000', - 700: '#000000', - 800: '#000000', - 900: '#000000', - 950: '#000000' - } + primary: '#000' } } }