Removed all Next.js files in preparation to move to Nuxt

This commit is contained in:
Louis Hollingworth 2022-04-26 18:35:54 +01:00
parent ef9aadd68a
commit 42d960090e
No known key found for this signature in database
GPG key ID: 1E66DEA3F5D623D1
32 changed files with 98 additions and 229 deletions

View file

@ -5,3 +5,4 @@
/.gitignore /.gitignore
/docker.sh /docker.sh
/build_number /build_number
/.env*

2
.gitignore vendored
View file

@ -32,3 +32,5 @@ yarn-error.log*
# vercel # vercel
.vercel .vercel
/.env*

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
v16

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +0,0 @@
export function Heading({children}: {children: React.ReactNode}) {
return (
<h2 className="dark:text-gray-300 md:text-2xl text-lg pt-4 mx-4">{children}</h2>
);
}

View file

@ -1,4 +0,0 @@
export * from "./title";
export * from "./linkcard";
export * from "./paragraph";
export * from "./heading";

View file

@ -1,17 +0,0 @@
import Link from "next/link";
export function LinkCard(props: {
link: string;
title: string;
sub: string;
}) {
const { link, title, sub } = props;
return (
<Link href={link} passHref>
<a className="box-border p-2 bg-gray-200 dark:text-gray-200 dark:bg-gray-600 hover:bg-gray-100 hover:text-indigo-500 dark:hover:bg-gray-500 dark:hover:text-indigo-400 rounded-md drop-shadow-lg hover:drop-shadow-2xl">
<h2 className="px-4">{title} &rarr;</h2>
<p className="px-4">{sub}</p>
</a>
</Link>
);
}

View file

@ -1,9 +0,0 @@
import React from "react";
export function Paragraph ({children}: {children: React.ReactNode}) {
return (
<p className="px-4 dark:text-gray-300">
{children}
</p>
)
}

View file

@ -1,6 +0,0 @@
export function Title({ children, ...props }: { children: React.ReactNode }) {
return (
<h1 className="dark:text-gray-300 font-bold text-center md:text-6xl text-3xl pt-4 font-body">{children}</h1>
);
}

5
next-env.d.ts vendored
View file

@ -1,5 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View file

@ -1,21 +0,0 @@
const { i18n } = require('./next-i18next.config');
module.exports = {
swcMinify: true,
i18n,
reactStrictMode: true,
rewrites: [
{
source: '/fonts/ubuntu',
destination: 'https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap'
},
{
source: '/fonts/goog/api',
destination: 'https://fonts.googleapis.com'
},
{
source: '/fonts/goog/static',
destination: 'https://fonts.gstatic.com'
},
]
}

View file

@ -9,22 +9,11 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^10.3.3",
"moment": "^2.29.1", "moment": "^2.29.1",
"next": "12",
"next-intl": "^2.0.0",
"next-plausible": "^2.1.1",
"postcss": "^8.3.6", "postcss": "^8.3.6",
"react": "latest",
"react-copy-to-clipboard": "^5.0.4",
"react-datepicker": "^4.2.1",
"react-dom": "latest",
"tailwindcss": "^2.2.9" "tailwindcss": "^2.2.9"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "17.0.14",
"@types/react-copy-to-clipboard": "^5.0.1",
"@types/react-datepicker": "^4.1.7",
"eslint": "7.31.0", "eslint": "7.31.0",
"eslint-config-next": "11.0.1", "eslint-config-next": "11.0.1",
"typescript": "4.3.5" "typescript": "4.3.5"

View file

@ -1,37 +0,0 @@
import '../styles/globals.css'
import type { AppProps } from 'next/app'
import {NextIntlProvider} from 'next-intl';
import PlausibleProvider from 'next-plausible';
import Head from 'next/head';
function _App({ Component, pageProps }: AppProps) {
return (
<>
<Head>
<title>Vänner Bäst | Friends Best</title>
<link rel="icon" href="https://www.vannerba.st/favicon.png" />
<meta property="og:image" content="https://www.vannerba.st/yr.jpg" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@Ludoviko_" />
<meta name="twitter:creator" content="@Ludoviko_" />
<meta property="og:title" content="Vänner Bästa | Friends Best" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://www.vannerba.st/yr.jpg" />
<meta name="theme-color"
content="#9CA3AF"
// @ts-ignore
media="(prefers-color-scheme: light)" />
<meta name="theme-color"
content="#1F2937"
// @ts-ignore
media="(prefers-color-scheme: dark)"/>
</Head>
<PlausibleProvider trackOutboundLinks={true} domain="vannerba.st">
<NextIntlProvider messages={pageProps.messages}>
<Component {...pageProps} />
</NextIntlProvider>
</PlausibleProvider>
</>
)
}
export default _App

View file

@ -1,36 +0,0 @@
import { Title, Paragraph, Heading } from "../components";
import DatePicker from 'react-datepicker'
import { useState } from "react";
import "react-datepicker/dist/react-datepicker.css"
import CopyToClipboard from "react-copy-to-clipboard";
import moment from "moment";
import Head from "next/head";
export default function BirthdaysPage() {
const [date, setDate] = useState(new Date());
const [copied, setCopied] = useState("Copy!");
return (
<>
<Head>
<meta name="description" content="A command generator for UtiliBots' birthday bot." />
<meta property="og:description" content="A command generator for UtiliBots' birthday bot."/>
</Head>
<div className="min-h-screen min-w-full bg-gray-400 dark:bg-gray-800">
<Title>Birthdays</Title>
<Paragraph>You can generate your birthday command here for UtiliBots&apos; birthday bot.</Paragraph>
<Heading>I was born on the...</Heading>
<Paragraph>The format is <strong>DD/MM</strong>.</Paragraph>
<DatePicker className="mx-4 dark:text-gray-300 dark:bg-gray-500 bg-white" selected={date} onChange={
// @ts-ignore
date => {setDate(date); setCopied("Copy!");}
}
dateFormat="dd/MM" />
<Heading>Command to set your birthday: </Heading>
<Paragraph>{`/set-birthday ${Intl.DateTimeFormat().resolvedOptions().timeZone} ${moment(date).format("MM/DD")}`}</Paragraph>
<CopyToClipboard onCopy={() => setCopied("Copied!")} text={`/set-birthday ${Intl.DateTimeFormat().resolvedOptions().timeZone} ${moment(date).format("MM/DD")}`}>
<button className="mx-4 px-4 dark:text-gray-300 dark:bg-gray-500 bg-white">{copied}</button>
</CopyToClipboard>
</div>
</>
);
}

View file

@ -1,44 +0,0 @@
import Head from 'next/head'
import { useTranslations } from 'next-intl'
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
import Image from 'next/image'
import {LinkCard, Title} from '../components'
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() {
const t = useTranslations('common')
return (
<div className="min-h-screen min-w-full bg-gray-400 dark:bg-gray-800">
<Head>
<meta name="description" content="A Young Royals fan website with links to different discussion spaces." />
<meta property="og:description" content="A Young Royals fan website with links to different discussion spaces."/>
</Head>
<main className="container mx-auto flex flex-col py-2 font-body">
<Title>
{t('welcome')}
</Title>
<p className="dark:text-gray-300 text-center md:text-2xl text-lg">
{t('desc')}
</p>
<div className="grid grid-flow-col grid-cols-2 grid-rows-3 gap-6 pt-4 px-8">
<LinkCard link="https://www.netflix.com/title/81210762" title={`${t('watch.title')}`} sub={t('watch.desc')}/>
<LinkCard link="https://discord.gg/hyKVDeRJ8Y" title={`Discord`} sub={t('discord')}/>
<LinkCard link="https://www.reddit.com/r/YoungRoyals/" title={`Reddit`} sub={t('reddit')}/>
<LinkCard link="https://www.talkable.com/x/IchxFl" title={t('learn.title')} sub={t('learn.desc')} />
<LinkCard link="https://matrix.to/#/#young-royals:matrix.org" title={`Matrix`} sub={t('matrix')} />
</div>
</main>
</div>
)
}

View file

@ -1,6 +0,0 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

10
prettier.config.js Normal file
View file

@ -0,0 +1,10 @@
module.exports = {
trailingComma: "es5",
tabWidth: 4,
semi: true,
singleQuote: true,
useTabs: true,
jsxBracketSameLine: true,
arrowParens: "avoid",
insertPragma: false
};

109
yarn.lock
View file

@ -130,6 +130,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@formatjs/ecma402-abstract@npm:^1.11.4":
version: 1.11.4
resolution: "@formatjs/ecma402-abstract@npm:1.11.4"
dependencies:
"@formatjs/intl-localematcher": 0.2.25
tslib: ^2.1.0
checksum: 05dbe1c6457acfe9cdc0fc770940260e19fa588be6c655b1ff1697506348dac1eee9b249b64e6544531174d07a5a74a9e75f68430947cfdc074ebe8e3c86f86f
languageName: node
linkType: hard
"@formatjs/fast-memoize@npm:1.1.1": "@formatjs/fast-memoize@npm:1.1.1":
version: 1.1.1 version: 1.1.1
resolution: "@formatjs/fast-memoize@npm:1.1.1" resolution: "@formatjs/fast-memoize@npm:1.1.1"
@ -158,6 +168,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@formatjs/intl-localematcher@npm:0.2.25":
version: 0.2.25
resolution: "@formatjs/intl-localematcher@npm:0.2.25"
dependencies:
tslib: ^2.1.0
checksum: ee00ddc23317dc47a58831aaca5112e101d8bb1f38adc0ecfe1a9d7e008d0bb1091519f07e1d7d805b0c1e28f2c3e75f697ae479e22423445814412c7669284c
languageName: node
linkType: hard
"@gar/promisify@npm:^1.0.1": "@gar/promisify@npm:^1.0.1":
version: 1.1.2 version: 1.1.2
resolution: "@gar/promisify@npm:1.1.2" resolution: "@gar/promisify@npm:1.1.2"
@ -400,6 +419,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@popperjs/core@npm:^2.11.5":
version: 2.11.5
resolution: "@popperjs/core@npm:2.11.5"
checksum: fd7f9dca3fb716d7426332b6ee283f88d2724c0ab342fb678865a640bad403dfb9eeebd8204a406986162f7e2b33394f104320008b74d0e9066d7322f70ea35d
languageName: node
linkType: hard
"@popperjs/core@npm:^2.9.2": "@popperjs/core@npm:^2.9.2":
version: 2.10.1 version: 2.10.1
resolution: "@popperjs/core@npm:2.10.1" resolution: "@popperjs/core@npm:2.10.1"
@ -451,15 +477,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/react-datepicker@npm:^4.1.7": "@types/react-datepicker@npm:latest":
version: 4.1.7 version: 4.4.1
resolution: "@types/react-datepicker@npm:4.1.7" resolution: "@types/react-datepicker@npm:4.4.1"
dependencies: dependencies:
"@popperjs/core": ^2.9.2 "@popperjs/core": ^2.9.2
"@types/react": "*" "@types/react": "*"
date-fns: ^2.0.1 date-fns: ^2.0.1
react-popper: ^2.2.5 react-popper: ^2.2.5
checksum: e1c7beb78e31c49bc4cab0904a02e5d2fc3945e8314b248219b13bc5acf9604347ec0e0a3b511146ce0b8cdb86b11f9f93b5c0b089e43f6ea92caf3e2e11b600 checksum: f63ba9288cc04b3c2174edbed9004f9253c23a6e9303bf515d4f349379b83db89e3117ef0907afcfa07eb0a0662d8fe30071faca0ae3f8f869091cddd38e292b
languageName: node languageName: node
linkType: hard linkType: hard
@ -886,6 +912,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"axios@npm:^0.26.1":
version: 0.26.1
resolution: "axios@npm:0.26.1"
dependencies:
follow-redirects: ^1.14.8
checksum: d9eb58ff4bc0b36a04783fc9ff760e9245c829a5a1052ee7ca6013410d427036b1d10d04e7380c02f3508c5eaf3485b1ae67bd2adbfec3683704745c8d7a6e1a
languageName: node
linkType: hard
"axobject-query@npm:^2.2.0": "axobject-query@npm:^2.2.0":
version: 2.2.0 version: 2.2.0
resolution: "axobject-query@npm:2.2.0" resolution: "axobject-query@npm:2.2.0"
@ -1721,6 +1756,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"dotenv@npm:^16.0.0":
version: 16.0.0
resolution: "dotenv@npm:16.0.0"
checksum: 664cebb51f0a9a1d1b930f51f0271e72e26d62feaecc9dc03df39453dd494b4e724809ca480fb3ec3213382b1ed3f791aaeb83569a137f9329ce58efd4853dbf
languageName: node
linkType: hard
"electron-to-chromium@npm:^1.3.723": "electron-to-chromium@npm:^1.3.723":
version: 1.3.785 version: 1.3.785
resolution: "electron-to-chromium@npm:1.3.785" resolution: "electron-to-chromium@npm:1.3.785"
@ -2288,6 +2330,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"follow-redirects@npm:^1.14.8":
version: 1.14.9
resolution: "follow-redirects@npm:1.14.9"
peerDependenciesMeta:
debug:
optional: true
checksum: f5982e0eb481818642492d3ca35a86989c98af1128b8e1a62911a3410621bc15d2b079e8170b35b19d3bdee770b73ed431a257ed86195af773771145baa57845
languageName: node
linkType: hard
"foreach@npm:^2.0.5": "foreach@npm:^2.0.5":
version: 2.0.5 version: 2.0.5
resolution: "foreach@npm:2.0.5" resolution: "foreach@npm:2.0.5"
@ -2306,21 +2358,25 @@ __metadata:
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "friends-best@workspace:." resolution: "friends-best@workspace:."
dependencies: dependencies:
"@popperjs/core": ^2.11.5
"@types/react": 17.0.14 "@types/react": 17.0.14
"@types/react-copy-to-clipboard": ^5.0.1 "@types/react-copy-to-clipboard": ^5.0.1
"@types/react-datepicker": ^4.1.7 "@types/react-datepicker": latest
autoprefixer: ^10.3.3 autoprefixer: ^10.3.3
axios: ^0.26.1
dotenv: ^16.0.0
eslint: 7.31.0 eslint: 7.31.0
eslint-config-next: 11.0.1 eslint-config-next: 11.0.1
moment: ^2.29.1 moment: ^2.29.1
next: 12 next: 12
next-intl: ^2.0.0 next-intl: ^2.6.0
next-plausible: ^2.1.1 next-plausible: ^3.1.9
postcss: ^8.3.6 postcss: ^8.3.6
react: latest react: latest
react-copy-to-clipboard: ^5.0.4 react-copy-to-clipboard: ^5.0.4
react-datepicker: ^4.2.1 react-datepicker: ^4.2.1
react-dom: latest react-dom: latest
react-popper: ^2.2.5
tailwindcss: ^2.2.9 tailwindcss: ^2.2.9
typescript: 4.3.5 typescript: 4.3.5
languageName: unknown languageName: unknown
@ -3499,26 +3555,26 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"next-intl@npm:^2.0.0": "next-intl@npm:^2.6.0":
version: 2.0.0 version: 2.6.0
resolution: "next-intl@npm:2.0.0" resolution: "next-intl@npm:2.6.0"
dependencies: dependencies:
use-intl: ^2.0.0 use-intl: ^2.6.0
peerDependencies: peerDependencies:
next: ^10.0.0 || ^11.0.0 next: ^10.0.0 || ^11.0.0 || ^12.0.0
react: ^16.8.0 || ^17.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: c809fd72896fad6c5143f802fa5644fee910881c61dc7c53271355bd6233340589a662a8ae788b33adc2090f0c439ba19df52d06370da27bd8d93a37fd641b82 checksum: abd009cb6deb474b014124f73435a136f1a3910d18a6f8145cf6ca58138e9a58d5c1612adf316f0b744e84813c7e064eb583bdd0946af2933c81f13a4c7240d0
languageName: node languageName: node
linkType: hard linkType: hard
"next-plausible@npm:^2.1.1": "next-plausible@npm:^3.1.9":
version: 2.1.1 version: 3.1.9
resolution: "next-plausible@npm:2.1.1" resolution: "next-plausible@npm:3.1.9"
peerDependencies: peerDependencies:
next: ^9.4.0 || ^10.0.0 || ^11.0.0 next: ^11.1.0 || ^12.0.0
react: ^16.8.0 || ^17.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: 1fde1b8931dd74cade9cf1ffeaa4d68cad39f8b4c72888e88e0a10f67eee76ddcc499b79d2a5ce45e07f96666082514af6296113c310b6ed6f74dd67bb4424ca checksum: b13890831173f82e02a21ff593f43f76e2139eb18aab2cc09c037aee24fc3893fa7eaf6e1181fb4152de78a6e32fcd1f7b3ccd84985b262b1a918ae0a8f85aad
languageName: node languageName: node
linkType: hard linkType: hard
@ -5450,14 +5506,15 @@ typescript@4.3.5:
languageName: node languageName: node
linkType: hard linkType: hard
"use-intl@npm:^2.0.0": "use-intl@npm:^2.6.0":
version: 2.0.0 version: 2.6.0
resolution: "use-intl@npm:2.0.0" resolution: "use-intl@npm:2.6.0"
dependencies: dependencies:
"@formatjs/ecma402-abstract": ^1.11.4
intl-messageformat: ^9.3.18 intl-messageformat: ^9.3.18
peerDependencies: peerDependencies:
react: ^16.8.0 || ^17.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: c12f265bf1c7d06adbe9917bacb9e32c77a6a746fdcdb9de9d774003c1fc074137d4796c4658604ce8d15611694b77a1d8f781e539716ce6baac915438ed3141 checksum: f16a4aeab2a06c2362d1f63a467ca8df6566fa8114c3b7cc5482e18418eb15b6172e1293e8e12a3313a24b281b145f13e12922c79675ae69bfcd4215710f951c
languageName: node languageName: node
linkType: hard linkType: hard