Add the initial backbone of the frontend

This commit adds all the pages that are going to exist.
This commit is contained in:
JP1998 2018-11-07 13:58:22 +01:00
parent 3061a2a4f4
commit e0f402f218
13 changed files with 5797 additions and 0 deletions

5684
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

20
package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "turniere-frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "next",
"build": "next build",
"start": "next start"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"next": "^7.0.2",
"react": "^16.6.1",
"react-dom": "^16.6.1"
}
}

18
pages/_error.js Normal file
View File

@ -0,0 +1,18 @@
import React from 'react'
export default class Error extends React.Component {
static getInitialProps({ res, err }) {
const statusCode = res ? res.statusCode : err ? err.statusCode : null;
return { statusCode }
}
render() {
return (
<p>
{this.props.statusCode
? `An error ${this.props.statusCode} occurred on server`
: 'An error occurred on client'}
</p>
)
}
}

6
pages/create.js Normal file
View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>Turniererstellung</p>
</div>
)

6
pages/faq.js Normal file
View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>FAQ</p>
</div>
)

6
pages/imprint.js Normal file
View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>Impressum</p>
</div>
)

22
pages/index.js Normal file
View File

@ -0,0 +1,22 @@
import Link from 'next/link'
const Index = (props) => {
return (
<div>
<p>Dies ist die Startseite!</p>
<ul>
<li><Link href="/privacy">Datenschutzerklärung</Link></li>
<li><Link href="/imprint">Impressum</Link></li>
<li><Link href="/login">Login</Link></li>
<li><Link href="/register">Registrierung</Link></li>
<li><Link href="/list">Turnierliste</Link></li>
<li><Link href="/faq">FAQ</Link></li>
<li><Link href="/create">Turniererstellung</Link></li>
<li><Link as={`/t/${props.code}`} href={`/tournament?code=${props.code}`}>Turnieranzeige</Link></li>
<li><Link as={`/t/${props.code}/fullscreen`} href={`/tournament-fullscreen?code=${props.code}`}>Turnieranzeige (Vollbild)</Link></li>
</ul>
</div>
);
}
export default () => (<Index code="asdf1234"/>);

5
pages/list.js Normal file
View File

@ -0,0 +1,5 @@
export default () => (
<div>
<p>Turnierliste</p>
</div>
)

6
pages/login.js Normal file
View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>Login</p>
</div>
)

6
pages/privacy.js Normal file
View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>Datenschutzerklärung</p>
</div>
)

6
pages/register.js Normal file
View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>Registrierung</p>
</div>
)

View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>Turnieranzeige (Vollbild)</p>
</div>
)

6
pages/tournament.js Normal file
View File

@ -0,0 +1,6 @@
export default () => (
<div>
<p>Turnieranzeige</p>
</div>
)