localized login screen

This commit is contained in:
2024-02-16 18:03:28 +01:00
parent bc23025575
commit 017d52f86e
3 changed files with 60 additions and 33 deletions

View File

@@ -4,6 +4,7 @@ import { Main } from '@/app/ui/Main';
import { authConfig } from "@/app/lib/auth"; import { authConfig } from "@/app/lib/auth";
import { SignInButton } from '@/app/ui/SignInButton'; import { SignInButton } from '@/app/ui/SignInButton';
import Image from 'next/image'; import Image from 'next/image';
import { getTranslations } from "next-intl/server";
type Provider = { type Provider = {
id: string; id: string;
@@ -34,17 +35,18 @@ function getKeyValuesFromObject<T>(obj: any, keys: (keyof T)[]): T {
const Page:FC = async () => { const Page:FC = async () => {
const providers = await getProviders() const providers = await getProviders();
const t = await getTranslations("login-page");
return ( return (
<Main> <Main>
<h1 className="text-3xl font-bold text-center"> <h1 className="text-3xl font-bold text-center">
<span className="text-neutral-50 mr-3">Which bills are due?</span> <span className="text-neutral-50 mr-3">{t("main-card.title-1")}</span>
<span className="text-indigo-400">Which are payed?</span> <span className="text-indigo-400">{t("main-card.title-2")}</span>
<span className="text-neutral-50 ml-3">How much are my expenses?</span> <span className="text-neutral-50 ml-3">{t("main-card.title-3")}</span>
</h1> </h1>
<p className="p mt-[1em] text-center">These are the questions this simple and free app will help you with ...</p> <p className="p mt-[1em] text-center">{t("main-card.text-1")}</p>
<p className="p mb-[1em] text-center">... try it & use it completly free!</p> <p className="p mb-[1em] text-center">{t("main-card.text-2")}</p>
<span className="text-center"> <span className="text-center">
{ {
Object.values(providers).map((provider) => ( Object.values(providers).map((provider) => (
@@ -54,23 +56,24 @@ const Page:FC = async () => {
)) ))
} }
</span> </span>
<video className="m-auto mt-4" title="Demo osnovnih koraka u aplikaciji" role="img" data-js-id="hero" loop muted playsInline autoPlay poster="hero.png"> <video className="m-auto mt-4" title={t("main-card.video-title")} role="img" data-js-id="hero" loop muted playsInline autoPlay poster={t("main-card.image-url")}>
<source src="/welcome-demo-vp9-25fps-1500bps.webm" type="video/webm" /> <source src={t("main-card.video-url")} type="video/webm" />
</video>
<h1 className="text-2xl font-bold text-neutral-50 my-5">Easy copy of expenditures</h1>
<p className="p mt-[1em]">All your realestate and utilitys are automatically copied to the next month, so you don&apos;t neeed to do it by hand.</p>
<video className="m-auto mt-4" title="Demo kopiranja mjeseca" role="img" data-js-id="hero" loop muted playsInline autoPlay poster="bar-code-demo.png">
<source src="/kopiranje-mjeseca-demo.webm" type="video/webm" />
</video> </video>
<h1 className="text-2xl font-bold text-neutral-50 my-5">Color signals status</h1> <h1 className="text-2xl font-bold text-neutral-50 my-5">{t("card-1.title")}</h1>
<p className="p mt-[1em]">Each of trhe utility bills is color coded - at a glance you can see which bill was received and which one is payed.</p> <p className="p mt-[1em]">{t("card-1.text")}</p>
<video className="m-auto mt-4" title={t("card-1.video-title")} role="img" data-js-id="hero" loop muted playsInline autoPlay poster={t("card-1.image-url")}>
<source src={t("card-1.video-url")} type="video/webm" />
</video>
<h1 className="text-2xl font-bold text-neutral-50 my-5">{t("card-2.title")}</h1>
<p className="p mt-[1em]">{t("card-2.text")}</p>
<Image src="/status-color-demo.png" alt="Boje označavaju status računa" className="m-auto mt-4" width={423} height={145} /> <Image src="/status-color-demo.png" alt="Boje označavaju status računa" className="m-auto mt-4" width={423} height={145} />
<h1 className="text-2xl font-bold text-neutral-50 my-5">Extraction of 2D bar code</h1> <h1 className="text-2xl font-bold text-neutral-50 my-5">{t("card-3.title")}</h1>
<p className="p mt-[1em]">If the attached dokument contains a 2D bar code, it is automatically extracted and shown on the page, so you can scan it without opening the PDF document.</p> <p className="p mt-[1em]">{t("card-3.text")}</p>
<video className="m-auto mt-4" title="Demo generiranja 2D bar koda" role="img" data-js-id="hero" loop muted playsInline autoPlay poster="bar-code-demo.png"> <video className="m-auto mt-4" title={t("card-3.video-title")} role="img" data-js-id="hero" loop muted playsInline autoPlay poster={t("card-3.image-url")}>
<source src="/bar-code-demo.webm" type="video/webm" /> <source src={t("card-3.video-url")} type="video/webm" />
</video> </video>
</Main> </Main>
); );

View File

@@ -12,22 +12,34 @@
}, },
"login-page": { "login-page": {
"main-card": { "main-card": {
"main-title-1": "Which bills are due?", "title-1": "Which bills are due?",
"main-title-2": "Which are payed?", "title-2": "Which are payed?",
"main-title-3": "How much are my expenses?", "title-3": "How much are my expenses?",
"main-text": "These are the questions this simple and free app will help you with ... try it & use it completly free!" "text-1": "These are the questions this simple and free app will help you with ...",
"text-2": "... try it & use it completly free!",
"video-url": "/welcome-demo-vp9-25fps-1500bps.webm",
"image-url": "/hero.png",
"video-title": "Demo osnovnih koraka u aplikaciji"
}, },
"card-1": { "card-1": {
"title":"Easy copy of expenditures", "title":"Easy copy of expenditures",
"text": "All your realestate and utilitys are automatically copied to the next month, so you don't neeed to do it by hand." "text": "All your realestate and utilitys are automatically copied to the next month, so you don't neeed to do it by hand.",
"video-url": "/kopiranje-mjeseca-demo.webm",
"image-url": "/status-color-demo.png",
"video-title": "Demo kopiranja mjeseca"
}, },
"card-2": { "card-2": {
"title": "Color signals status", "title": "Color signals status",
"text": "Each of the utility bills is color coded - at a glance you can see which bill was received and which one is payed." "text": "Each of the utility bills is color coded - at a glance you can see which bill was received and which one is payed.",
"image-url": "/bar-code-demo.png",
"image-alt": "Boje označavaju status računa"
}, },
"card-3": { "card-3": {
"title": "Color signals status", "title": "Color signals status",
"text": "If the attached dokument contains a 2D bar code, it is automatically extracted and shown on the page, so you can scan it without opening the PDF document." "text": "If the attached dokument contains a 2D bar code, it is automatically extracted and shown on the page, so you can scan it without opening the PDF document.",
"video-url": "/welcome-demo-vp9-25fps-1500bps.webm",
"image-url": "/bar-code-demo.png",
"video-title": "Demo osnovnih koraka u aplikaciji"
} }
} }
} }

View File

@@ -12,22 +12,34 @@
}, },
"login-page": { "login-page": {
"main-card": { "main-card": {
"main-title-1": "Koji računi su stigli?", "title-1": "Koji računi su stigli?",
"main-title-2": "Koji su plaćeni?", "title-2": "Koji su plaćeni?",
"main-title-3": "Koliki su mi troškovi?", "title-3": "Koliki su mi troškovi?",
"main-text": "To su pitanja na koja će vam ova jednostavna aplikacija odgovoriti ... isprobajte je, koristite je potpuno besplatno!" "text-1": "To su pitanja na koja će vam ova jednostavna aplikacija odgovoriti ...",
"text-2": "... isprobajte je, koristite je potpuno besplatno!",
"video-url": "/welcome-demo-vp9-25fps-1500bps.webm",
"image-url": "/hero.png",
"video-title": "Demo osnovnih koraka u aplikaciji"
}, },
"card-1": { "card-1": {
"title":"Prijenos režija u idući mjesec", "title":"Prijenos režija u idući mjesec",
"text": "Sve vaše nekretnine i pripadajuće režije se automatski prenose u idući mjesec, tako da ne morate svaki mjesec ponovno unositi iste podatke." "text": "Sve vaše nekretnine i pripadajuće režije se automatski prenose u idući mjesec, tako da ne morate svaki mjesec ponovno unositi iste podatke.",
"video-url": "/kopiranje-mjeseca-demo.webm",
"image-url": "/status-color-demo.png",
"video-title": "Demo kopiranja mjeseca"
}, },
"card-2": { "card-2": {
"title": "Boja signalizira status", "title": "Boja signalizira status",
"text": "Jednim pogledom možete vidjeti koji računi su plaćeni, a koji nisu. U tome vam pomaže boja koja označava status računa." "text": "Jednim pogledom možete vidjeti koji računi su plaćeni, a koji nisu. U tome vam pomaže boja koja označava status računa.",
"image-url": "/bar-code-demo.png",
"image-alt": "Boje označavaju status računa"
}, },
"card-3": { "card-3": {
"title": "Prikaz bar koda za plaćanje", "title": "Prikaz bar koda za plaćanje",
"text": "Ako priloženi dokument sadrži 2D barkod, on se automatski izvlači i prikazuje na stranici, tako da ga možete skenirati bez otvaranja PDF dokumenta." "text": "Ako priloženi dokument sadrži 2D barkod, on se automatski izvlači i prikazuje na stranici, tako da ga možete skenirati bez otvaranja PDF dokumenta.",
"video-url": "/bar-code-demo.webm",
"image-url": "/bar-code-demo.png",
"video-title": "Demo osnovnih koraka u aplikaciji"
} }
} }
} }