diff --git a/pages/_app.tsx b/pages/_app.tsx new file mode 100644 index 0000000..fd98148 --- /dev/null +++ b/pages/_app.tsx @@ -0,0 +1,35 @@ +import React from 'react' +import App from 'next/app' +import Head from 'next/head' +import dynamic from 'next/dynamic' +import getConfig from 'next/config' + +import 'tachyons/css/tachyons.min.css' +import '../styles/app.styl' +import Menu from '../screens/menu' +import Content from '../components/content' + +const Background = dynamic(() => import('../components/background'), { ssr: false }) +const { RECAPTCHA_CLIENT } = getConfig().publicRuntimeConfig + +export default class extends App { + render() { + const { Component, pageProps } = this.props + return ( + + + fantus + + + + + + + + + + + + ) + } +} \ No newline at end of file diff --git a/pages/_document.tsx b/pages/_document.tsx new file mode 100644 index 0000000..e4b9a75 --- /dev/null +++ b/pages/_document.tsx @@ -0,0 +1,17 @@ +import Document, { Html, Head, Main, NextScript } from 'next/document' + +export default class extends Document { + render() { + return ( + + + + + +
+ + + + ) + } +} \ No newline at end of file diff --git a/pages/about.tsx b/pages/about.tsx new file mode 100644 index 0000000..7feab9a --- /dev/null +++ b/pages/about.tsx @@ -0,0 +1,29 @@ +import React from 'react' + +const Home = () => { + return
+

about

+
+

+ yet another producer. because we don't already have enough of them. +
+
+ 📍based on planet earth +
+ +

+

+ MixCloud +
+ SoundCloud +
+

+
+

+ website made by 🤖 with ❤️. source code available here +

+
+
+} + +export default Home \ No newline at end of file diff --git a/pages/api/form.tsx b/pages/api/form.tsx new file mode 100644 index 0000000..1eff57f --- /dev/null +++ b/pages/api/form.tsx @@ -0,0 +1,83 @@ +import { createReadStream, statSync, unlinkSync, writeFileSync } from 'fs' +import { tmpdir } from 'os' + +import { NextApiRequest, NextApiResponse } from 'next' +import getConfig from 'next/config' +import Formidable from 'formidable' +import axios from 'axios' + +const { RECAPTCHA_SERVER, NEXTCLOUD_TOKEN } = getConfig().serverRuntimeConfig + +const sendFileAndDelete = async (name: string, path: string) => { + const stat = statSync(path) + const stream = createReadStream(path) + + await axios({ + url: 'https://cloud.nicco.io/public.php/webdav/' + name, + method: 'put', + auth: { + username: NEXTCLOUD_TOKEN, + password: '', + }, + headers: { + 'Content-Length': stat.size + }, + data: stream + }) + + unlinkSync(path) +} + +export default async (req: NextApiRequest, res: NextApiResponse) => { + try { + + // @ts-ignore + const form = new Formidable(); + + form.maxFileSize = 300 * 1024 * 1024 // 300MiB + + const body = await new Promise((resolve, reject) => { + form.parse(req, (err: any, fields: any, files: any) => { + if (err) reject() + else resolve({ + fields: JSON.parse(fields.json), + files: Object.values(files) + }) + }); + }) + + + + const { token, ...rest } = body.fields + + const { data } = await axios({ + url: 'https://www.google.com/recaptcha/api/siteverify', + method: 'post', + params: { + secret: RECAPTCHA_SERVER, + response: token, + }, + }) + + if (!data.success) throw new Error() + + const now = Date.now() + for (const file of body.files) + sendFileAndDelete(`${now}_${file.name}`, file.path) + + const txtFile = `${tmpdir()}/text` + writeFileSync(txtFile, `${rest.contact}\n${rest.description}`) + sendFileAndDelete(`${now}_details.txt`, txtFile) + + res.status(200).end() + + } catch { + res.status(400).end() + } +} + +export const config = { + api: { + bodyParser: false, + }, +} \ No newline at end of file diff --git a/pages/index.tsx b/pages/index.tsx new file mode 100644 index 0000000..6634b78 --- /dev/null +++ b/pages/index.tsx @@ -0,0 +1,27 @@ +import React from 'react' + +const Home = () => { + return
+

neodymium enabled waves. new.

+

+ neodymium: + + a bright, silvery, reactive rare-earth element, found in monazite and bastnaesite and used for coloring glass, for doping laser glass and crystals, and in materials with strong, permanent magnetic properties that make them useful for computer and audio equipment. Atomic number 60; atomic weight 144.24; melting point 1,016°C; boiling point 3,074°C; + +

+

+ enabled: + + to make able; give power, means, competence, or ability to; authorize + +

+

+ wave: + + the continuous, repeating pattern in which some types of energy, such as sound, light, and heat, are spread or carried + +

+
+} + +export default Home \ No newline at end of file diff --git a/pages/mastering.tsx b/pages/mastering.tsx new file mode 100644 index 0000000..052bac9 --- /dev/null +++ b/pages/mastering.tsx @@ -0,0 +1,36 @@ +import React from 'react' + +import Form from '../screens/form' + +const Home = () => { + return
+

mastering

+
+

how does it work?

+

+ My aim is to practise mastering. + As anything it requires a lot of trial and error. So the idea is as follows: +

+
    +
  1. You send me a track
  2. +
  3. It gets mastered based on your wishes & feedback
  4. +
  5. If you like it, you are free to use the master for free. Otherwise just trash it.
  6. +
+

what's the catch then?

+

+ Nothing really. It's completely free for you. + It goes without saying that of course I will not upload the tracks anywhere. + No surprises. +

+

what if you like the result?

+

+ If you think the master is good you can use it for free withouth any royalties to me. + It would be cool if you could reference me in the youtube description or spotify credits for mastering it, but it's totally optional and up to you. +

+
+
+
+
+} + +export default Home \ No newline at end of file diff --git a/pages/sets.tsx b/pages/sets.tsx new file mode 100644 index 0000000..962bc29 --- /dev/null +++ b/pages/sets.tsx @@ -0,0 +1,26 @@ +import React from 'react' + +const Home = () => { + return
+

sets

+

+ collection of some sets made here and there. +

+
    +
  • +