Added page titles

This commit is contained in:
mrfry 2020-11-26 13:44:13 +01:00
parent 587c304317
commit 37060e9e69
11 changed files with 142 additions and 94 deletions

View file

@ -11,7 +11,7 @@
"href": "/allQuestions", "href": "/allQuestions",
"text": "Kérdés keresés" "text": "Kérdés keresés"
}, },
"subjBrowser": { "subjectBrowser": {
"href": "/subjectBrowser", "href": "/subjectBrowser",
"text": "Tárgyak" "text": "Tárgyak"
}, },

View file

@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import fetch from 'unfetch' import fetch from 'unfetch'
import Head from 'next/head'
import LoadingIndicator from '../components/LoadingIndicator.js' import LoadingIndicator from '../components/LoadingIndicator.js'
@ -302,16 +303,21 @@ export default function AddQuestion() {
) )
} }
if (subjects) {
return ( return (
<div> <div>
<Head>
<title>Qmining - Kérdés beküldés</title>
</Head>
{subjects ? (
<>
{renderUsage()} {renderUsage()}
<hr /> <hr />
{renderSubjSelector()} {renderSubjSelector()}
{renderStuff()} {renderStuff()}
</>
) : (
<LoadingIndicator />
)}
</div> </div>
) )
} else {
return <LoadingIndicator />
}
} }

View file

@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import Head from 'next/head'
import LoadingIndicator from '../components/LoadingIndicator.js' import LoadingIndicator from '../components/LoadingIndicator.js'
import QuestionSearchResult from '../components/QuestionSearchResult.js' import QuestionSearchResult from '../components/QuestionSearchResult.js'
@ -23,9 +24,13 @@ export default function AllQuestions({ router, getData }) {
}) })
}, []) }, [])
if (data) {
return ( return (
<div> <div>
<Head>
<title>Qmining - Kérdés keresés</title>
</Head>
{data ? (
<>
<div className={styles.searchContainer}> <div className={styles.searchContainer}>
<input <input
placeholder="Keresés..." placeholder="Keresés..."
@ -55,9 +60,10 @@ export default function AllQuestions({ router, getData }) {
<div> <div>
<QuestionSearchResult data={data} searchTerm={searchTerm} /> <QuestionSearchResult data={data} searchTerm={searchTerm} />
</div> </div>
</>
) : (
<LoadingIndicator />
)}
</div> </div>
) )
} else {
return <LoadingIndicator />
}
} }

View file

@ -1,4 +1,5 @@
import React, { useState } from 'react' import React, { useState } from 'react'
import Head from 'next/head'
import Button from '../components/Button.js' import Button from '../components/Button.js'
import Sleep from '../components/sleep' import Sleep from '../components/sleep'
@ -62,6 +63,9 @@ export default function contribute() {
return ( return (
<div> <div>
<Head>
<title>Qmining - Contribute / Todos</title>
</Head>
<div className={styles.description}> <div className={styles.description}>
Egy kártyára kattintva szavazhatsz. Minél több szavazat érkezik egy Egy kártyára kattintva szavazhatsz. Minél több szavazat érkezik egy
kártyára, annál magasabb lesz a pioritása. Jobb alsó szám minél több, kártyára, annál magasabb lesz a pioritása. Jobb alsó szám minél több,

View file

@ -1,5 +1,6 @@
import React, { useState } from 'react' import React, { useState } from 'react'
import fetch from 'unfetch' import fetch from 'unfetch'
import Head from 'next/head'
import Button from '../components/Button.js' import Button from '../components/Button.js'
@ -233,6 +234,9 @@ export default function Feedback(props) {
return ( return (
<div> <div>
<Head>
<title>Qmining - Feedback</title>
</Head>
<Button text="IRC chat" href="/irc" /> <Button text="IRC chat" href="/irc" />
<p /> <p />
<hr /> <hr />

View file

@ -3,6 +3,7 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import fetch from 'unfetch' import fetch from 'unfetch'
import Head from 'next/head'
import LoadingIndicator from '../components/LoadingIndicator' import LoadingIndicator from '../components/LoadingIndicator'
import Sleep from '../components/sleep' import Sleep from '../components/sleep'
@ -143,6 +144,9 @@ export default function Index({ router }) {
return ( return (
<div> <div>
<Head>
<title>Qmining</title>
</Head>
<div className={styles.buttonContainer}> <div className={styles.buttonContainer}>
{Object.keys(links).map((key) => { {Object.keys(links).map((key) => {
let link = links[key] let link = links[key]

View file

@ -1,4 +1,5 @@
import Sleep from '../components/sleep' import Sleep from '../components/sleep'
import Head from 'next/head'
export default function Manual(props) { export default function Manual(props) {
return <div>{renderMaual()}</div> return <div>{renderMaual()}</div>
@ -7,6 +8,9 @@ export default function Manual(props) {
function renderMaual() { function renderMaual() {
return ( return (
<div> <div>
<Head>
<title>Qmining - Manual</title>
</Head>
<center> <center>
<h1>Manual</h1> <h1>Manual</h1>
</center> </center>

View file

@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import fetch from 'unfetch' import fetch from 'unfetch'
import Head from 'next/head'
import styles from './pwRequest.module.css' import styles from './pwRequest.module.css'
import constants from '../constants.json' import constants from '../constants.json'
@ -78,6 +79,9 @@ export default function PwRequest(props) {
return ( return (
// TODO: újrafogalmazás, remove hány nap után kapnak új jelszót először // TODO: újrafogalmazás, remove hány nap után kapnak új jelszót először
<div> <div>
<Head>
<title>Qmining - Jelszó kérés</title>
</Head>
<div id="form"> <div id="form">
<div className={styles.text}> <div className={styles.text}>
Itt új jelszavakat tudsz kérni új felhasználóknak. Közös Itt új jelszavakat tudsz kérni új felhasználóknak. Közös

View file

@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import fetch from 'unfetch' import fetch from 'unfetch'
import Head from 'next/head'
import LoadingIndicator from '../components/LoadingIndicator' import LoadingIndicator from '../components/LoadingIndicator'
import Sleep from '../components/sleep' import Sleep from '../components/sleep'
@ -125,6 +126,9 @@ export default function RankList() {
return ( return (
<div> <div>
<Head>
<title>Qmining - Ranklista</title>
</Head>
<div> <div>
<div <div
className={styles.infoText} className={styles.infoText}

View file

@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import fetch from 'unfetch' import fetch from 'unfetch'
import Head from 'next/head'
import LoadingIndicator from '../components/LoadingIndicator.js' import LoadingIndicator from '../components/LoadingIndicator.js'
import Subject from '../components/Subject.js' import Subject from '../components/Subject.js'
@ -28,13 +29,19 @@ export default function SubjectBrowser({ getData }) {
}) })
}, []) }, [])
if (data) { let currSubj = data
let currSubj = data.find((subj) => { ? data.find((subj) => {
return subj.Name === activeSubjName return subj.Name === activeSubjName
}) })
: {}
return ( return (
<div> <div>
<Head>
<title>Qmining - Tárgyak</title>
</Head>
{data ? (
<>
<div className={styles.searchContainer}> <div className={styles.searchContainer}>
<input <input
placeholder="Keresés..." placeholder="Keresés..."
@ -70,9 +77,10 @@ export default function SubjectBrowser({ getData }) {
<div> <div>
<Subject subj={currSubj} /> <Subject subj={currSubj} />
</div> </div>
</>
) : (
<LoadingIndicator />
)}
</div> </div>
) )
} else {
return <LoadingIndicator />
}
} }

View file

@ -1,9 +1,13 @@
import styles from './thanks.module.css' import styles from './thanks.module.css'
import constants from '../constants.json' import constants from '../constants.json'
import Head from 'next/head'
export default function Thanks () { export default function Thanks () {
return ( return (
<div> <div>
<Head>
<title>Qmining - Thanks for the donate!</title>
</Head>
<div className={styles.container}> <div className={styles.container}>
<div className={styles.title}>Thanks for the donate!</div> <div className={styles.title}>Thanks for the donate!</div>
<div> <div>