Added links to homepage
This commit is contained in:
parent
ec742b15db
commit
1ee4053c4c
12
locales/en.json
Normal file
12
locales/en.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"common": {
|
||||||
|
"welcome": "Welcome to Vänner Bäst.",
|
||||||
|
"desc": "A Young Royals fan website with links to different discussion spaces.",
|
||||||
|
"watch": {
|
||||||
|
"title": "Watch",
|
||||||
|
"desc": "Watch the series on Netflix"
|
||||||
|
},
|
||||||
|
"discord": "Join our community Discord server to discuss all things Young Royals",
|
||||||
|
"reddit": "Join the community subreddit to discuss Young Royals"
|
||||||
|
}
|
||||||
|
}
|
12
locales/es.json
Normal file
12
locales/es.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"common": {
|
||||||
|
"welcome": "Bienvid@ a Vänner Bäst.",
|
||||||
|
"desc": "Un sitio web de fans de Young Royals con enlaces a diferentes espacios de discusión.",
|
||||||
|
"watch": {
|
||||||
|
"title": "Ver",
|
||||||
|
"desc": "Ver la serie en Netflix"
|
||||||
|
},
|
||||||
|
"discord": "Únase a nuestro servidor de Discord de la comunidad para discutir sobre Young Royals",
|
||||||
|
"reddit": "Únase al subreddit de la comunidad para discutir sobre Young Royals"
|
||||||
|
}
|
||||||
|
}
|
6
next-i18next.config.js
Normal file
6
next-i18next.config.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = {
|
||||||
|
i18n: {
|
||||||
|
defaultLocale: 'en',
|
||||||
|
locales: ['en', 'es'],
|
||||||
|
},
|
||||||
|
};
|
|
@ -1,5 +1,7 @@
|
||||||
|
const { i18n } = require('./next-i18next.config');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
i18n,
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
async redirects() {
|
async redirects() {
|
||||||
return [
|
return [
|
||||||
|
@ -7,6 +9,16 @@ module.exports = {
|
||||||
source: '/discord',
|
source: '/discord',
|
||||||
destination: 'https://discord.gg/ugxv4ZrVjC',
|
destination: 'https://discord.gg/ugxv4ZrVjC',
|
||||||
permanent: true
|
permanent: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/reddit',
|
||||||
|
destination: 'https://www.reddit.com/r/YoungRoyals/',
|
||||||
|
permanent: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/watch',
|
||||||
|
destination: 'https://www.netflix.com/gb/title/81210762?s=i&trkid=13747225&vlang=en&clip=81459758',
|
||||||
|
permanent: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "11.0.1",
|
"next": "11.0.1",
|
||||||
|
"next-intl": "^1.4.4",
|
||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2"
|
"react-dom": "17.0.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import '../styles/globals.css'
|
import '../styles/globals.css'
|
||||||
import type { AppProps } from 'next/app'
|
import type { AppProps } from 'next/app'
|
||||||
|
import {NextIntlProvider} from 'next-intl';
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }: AppProps) {
|
function _App({ Component, pageProps }: AppProps) {
|
||||||
return <Component {...pageProps} />
|
return <NextIntlProvider messages={pageProps.messages}>
|
||||||
|
<Component {...pageProps} />
|
||||||
|
</NextIntlProvider>
|
||||||
}
|
}
|
||||||
export default MyApp
|
export default _App
|
||||||
|
|
|
@ -1,24 +1,55 @@
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import Image from 'next/image'
|
import Link from 'next/link'
|
||||||
import styles from '../styles/Home.module.css'
|
import styles from '../styles/Home.module.css'
|
||||||
|
import { useRouter } from 'next/router'
|
||||||
|
import { useTranslations } from 'next-intl'
|
||||||
|
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
|
||||||
|
|
||||||
|
export function getStaticProps({locale}: GetStaticPropsContext) {
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
// You can get the messages from anywhere you like, but the recommended
|
||||||
|
// pattern is to put them in JSON files separated by language and read
|
||||||
|
// the desired one based on the `locale` received from Next.js.
|
||||||
|
messages: require(`../locales/${locale}.json`),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
const router = useRouter()
|
||||||
|
const t = useTranslations('common')
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Vanner Bast | Friends Best</title>
|
<title>Vänner Bäst | Friends Best</title>
|
||||||
<meta name="description" content="Generated by create next app" />
|
<meta name="description" content="Generated by create next app" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<main className={styles.main}>
|
<main className={styles.main}>
|
||||||
<h1 className={styles.title}>
|
<h1 className={styles.title}>
|
||||||
Welcome to Vanner Bast.
|
{t('welcome')}
|
||||||
</h1>
|
</h1>
|
||||||
<h2>
|
<p className={styles.description}>
|
||||||
This website is currently WIP.
|
{t('desc')}
|
||||||
</h2>
|
</p>
|
||||||
|
<div className={styles.grid}>
|
||||||
|
<a href="/watch" className={styles.card}>
|
||||||
|
<h2>{t('watch.title')} →</h2>
|
||||||
|
<p>{t('watch.desc')} </p>
|
||||||
|
</a>
|
||||||
|
<a href="/discord" className={styles.card}>
|
||||||
|
<h2>Discord →</h2>
|
||||||
|
<p>{t('discord')}</p>
|
||||||
|
</a>
|
||||||
|
<a href="/reddit" className={styles.card}>
|
||||||
|
<h2>Reddit →</h2>
|
||||||
|
<p>{t('reddit')}</p>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<footer className={styles.footer}><Link href="https://ludoviko.ch">Created by: Ludoviko</Link></footer>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,16 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer a:hover {
|
||||||
|
color: #0070f3;
|
||||||
|
}
|
||||||
|
|
||||||
.footer a {
|
.footer a {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
color: #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title a {
|
.title a {
|
||||||
|
@ -53,6 +58,7 @@
|
||||||
.title,
|
.title,
|
||||||
.description {
|
.description {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
color: #eaeaea
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
|
@ -90,10 +96,15 @@
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card:link,
|
||||||
|
.card:visited {
|
||||||
|
color: #eaeaea
|
||||||
|
}
|
||||||
|
|
||||||
.card:hover,
|
.card:hover,
|
||||||
.card:focus,
|
.card:focus,
|
||||||
.card:active {
|
.card:active {
|
||||||
color: #0070f3;
|
color: #0070f3 !important;
|
||||||
border-color: #0070f3;
|
border-color: #0070f3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
|
background-color: #2b2b2b;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
||||||
|
|
57
yarn.lock
57
yarn.lock
|
@ -69,6 +69,35 @@
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
strip-json-comments "^3.1.1"
|
strip-json-comments "^3.1.1"
|
||||||
|
|
||||||
|
"@formatjs/ecma402-abstract@1.9.4":
|
||||||
|
version "1.9.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.9.4.tgz#797ae6c407fb5a0d09023a60c86f19aca1958c5e"
|
||||||
|
integrity sha512-ePJXI7tWC9PBxQxS7jtbkCLGVmpC8MH8n9Yjmg8dsh9wXK9svu7nAbq76Oiu5Zb+5GVkLkeTVerlSvHCbNImlA==
|
||||||
|
dependencies:
|
||||||
|
tslib "^2.1.0"
|
||||||
|
|
||||||
|
"@formatjs/fast-memoize@1.1.1":
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-1.1.1.tgz#3006b58aca1e39a98aca213356b42da5d173f26b"
|
||||||
|
integrity sha512-mIqBr5uigIlx13eZTOPSEh2buDiy3BCdMYUtewICREQjbb4xarDiVWoXSnrERM7NanZ+0TAHNXSqDe6HpEFQUg==
|
||||||
|
|
||||||
|
"@formatjs/icu-messageformat-parser@2.0.7":
|
||||||
|
version "2.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.0.7.tgz#326efc14d9409cdbf1b7d3f42e0eed273c95c663"
|
||||||
|
integrity sha512-gduYfh/YdBTmb1XzLueNaofiGZVMrkaDg0RSa0GNztKWs4QXIRS+28cjcuWNpV0q5S8aiLMkP7SHQpZKnPCHLw==
|
||||||
|
dependencies:
|
||||||
|
"@formatjs/ecma402-abstract" "1.9.4"
|
||||||
|
"@formatjs/icu-skeleton-parser" "1.2.8"
|
||||||
|
tslib "^2.1.0"
|
||||||
|
|
||||||
|
"@formatjs/icu-skeleton-parser@1.2.8":
|
||||||
|
version "1.2.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.2.8.tgz#ddf6c1f7274244b71237fad49a67dd97e81f5c0a"
|
||||||
|
integrity sha512-KLSSAA7Q2Uv7msij8saaOE5rpsHK/2WkfS3737JnDyVTFOYe8l2OarIBUoTC5gi1BnCgiN/1icZlqXwyUX6obA==
|
||||||
|
dependencies:
|
||||||
|
"@formatjs/ecma402-abstract" "1.9.4"
|
||||||
|
tslib "^2.1.0"
|
||||||
|
|
||||||
"@hapi/accept@5.0.2":
|
"@hapi/accept@5.0.2":
|
||||||
version "5.0.2"
|
version "5.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-5.0.2.tgz#ab7043b037e68b722f93f376afb05e85c0699523"
|
resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-5.0.2.tgz#ab7043b037e68b722f93f376afb05e85c0699523"
|
||||||
|
@ -1555,6 +1584,15 @@ internal-slot@^1.0.3:
|
||||||
has "^1.0.3"
|
has "^1.0.3"
|
||||||
side-channel "^1.0.4"
|
side-channel "^1.0.4"
|
||||||
|
|
||||||
|
intl-messageformat@^9.3.18:
|
||||||
|
version "9.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-9.8.0.tgz#a032cac18039929d8ea3f9dffe38f7207f7545be"
|
||||||
|
integrity sha512-di+/42/tyU+N0vwbnIRrgdpAIqlg4m3zYzjS0No7i9KljjclhF1HagcmLKYPo+6YisThzhA2h1mRNQdwtEAqCA==
|
||||||
|
dependencies:
|
||||||
|
"@formatjs/fast-memoize" "1.1.1"
|
||||||
|
"@formatjs/icu-messageformat-parser" "2.0.7"
|
||||||
|
tslib "^2.1.0"
|
||||||
|
|
||||||
is-arguments@^1.0.4:
|
is-arguments@^1.0.4:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9"
|
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9"
|
||||||
|
@ -1942,6 +1980,13 @@ natural-compare@^1.4.0:
|
||||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||||
|
|
||||||
|
next-intl@^1.4.4:
|
||||||
|
version "1.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/next-intl/-/next-intl-1.4.4.tgz#a149ddd44a05e86ecf85f4aef81bb9663016fc52"
|
||||||
|
integrity sha512-X0qieBrmFpQ6kMNl35OfZGnUXsqsQ6CusrgOLTxb1ud/EnagJibjr3v+7NinYEgTMapFvWHXKf8CWZZyW13Ntw==
|
||||||
|
dependencies:
|
||||||
|
use-intl "^1.4.4"
|
||||||
|
|
||||||
next@11.0.1:
|
next@11.0.1:
|
||||||
version "11.0.1"
|
version "11.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/next/-/next-11.0.1.tgz#b8e3914d153aaf7143cb98c09bcd3c8230eeb17a"
|
resolved "https://registry.yarnpkg.com/next/-/next-11.0.1.tgz#b8e3914d153aaf7143cb98c09bcd3c8230eeb17a"
|
||||||
|
@ -2981,6 +3026,11 @@ tslib@^1.8.1:
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||||
|
|
||||||
|
tslib@^2.1.0:
|
||||||
|
version "2.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
|
||||||
|
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
|
||||||
|
|
||||||
tsutils@^3.21.0:
|
tsutils@^3.21.0:
|
||||||
version "3.21.0"
|
version "3.21.0"
|
||||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
|
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
|
||||||
|
@ -3050,6 +3100,13 @@ url@^0.11.0:
|
||||||
punycode "1.3.2"
|
punycode "1.3.2"
|
||||||
querystring "0.2.0"
|
querystring "0.2.0"
|
||||||
|
|
||||||
|
use-intl@^1.4.4:
|
||||||
|
version "1.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/use-intl/-/use-intl-1.4.4.tgz#03f5f24614e836849fff1eb01fe7ef4c0275f180"
|
||||||
|
integrity sha512-4WoGybFYMVTq301DqmUSRoTMYSVe4Kd62+uJ8+gV2P6HitWmp89CLCz0mawFpGJRgEkRACO4IBpbe4lcfFmrQw==
|
||||||
|
dependencies:
|
||||||
|
intl-messageformat "^9.3.18"
|
||||||
|
|
||||||
use-subscription@1.5.1:
|
use-subscription@1.5.1:
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1"
|
resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1"
|
||||||
|
|
Loading…
Reference in a new issue