mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Added page titles
This commit is contained in:
parent
587c304317
commit
37060e9e69
11 changed files with 142 additions and 94 deletions
|
@ -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"
|
||||||
},
|
},
|
||||||
|
|
|
@ -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>
|
||||||
{renderUsage()}
|
<title>Qmining - Kérdés beküldés</title>
|
||||||
<hr />
|
</Head>
|
||||||
{renderSubjSelector()}
|
{subjects ? (
|
||||||
{renderStuff()}
|
<>
|
||||||
</div>
|
{renderUsage()}
|
||||||
)
|
<hr />
|
||||||
} else {
|
{renderSubjSelector()}
|
||||||
return <LoadingIndicator />
|
{renderStuff()}
|
||||||
}
|
</>
|
||||||
|
) : (
|
||||||
|
<LoadingIndicator />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,41 +24,46 @@ export default function AllQuestions({ router, getData }) {
|
||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
if (data) {
|
return (
|
||||||
return (
|
<div>
|
||||||
<div>
|
<Head>
|
||||||
<div className={styles.searchContainer}>
|
<title>Qmining - Kérdés keresés</title>
|
||||||
<input
|
</Head>
|
||||||
placeholder="Keresés..."
|
{data ? (
|
||||||
className={styles.searchBar}
|
<>
|
||||||
type="text"
|
<div className={styles.searchContainer}>
|
||||||
value={searchTerm}
|
<input
|
||||||
onChange={(e) => {
|
placeholder="Keresés..."
|
||||||
setSearchTerm(e.target.value)
|
className={styles.searchBar}
|
||||||
router.replace(
|
type="text"
|
||||||
`${router.pathname}${e.target.value &&
|
value={searchTerm}
|
||||||
'?question='}${encodeURIComponent(e.target.value)}`,
|
onChange={(e) => {
|
||||||
undefined,
|
setSearchTerm(e.target.value)
|
||||||
{ shallow: true }
|
router.replace(
|
||||||
)
|
`${router.pathname}${e.target.value &&
|
||||||
}}
|
'?question='}${encodeURIComponent(e.target.value)}`,
|
||||||
/>
|
undefined,
|
||||||
<button
|
{ shallow: true }
|
||||||
onClick={() => {
|
)
|
||||||
setSearchTerm('')
|
}}
|
||||||
}}
|
/>
|
||||||
className={styles.clearButton}
|
<button
|
||||||
>
|
onClick={() => {
|
||||||
X
|
setSearchTerm('')
|
||||||
</button>
|
}}
|
||||||
</div>
|
className={styles.clearButton}
|
||||||
<hr />
|
>
|
||||||
<div>
|
X
|
||||||
<QuestionSearchResult data={data} searchTerm={searchTerm} />
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<hr />
|
||||||
)
|
<div>
|
||||||
} else {
|
<QuestionSearchResult data={data} searchTerm={searchTerm} />
|
||||||
return <LoadingIndicator />
|
</div>
|
||||||
}
|
</>
|
||||||
|
) : (
|
||||||
|
<LoadingIndicator />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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 />
|
||||||
|
|
|
@ -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]
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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}
|
||||||
|
|
|
@ -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,51 +29,58 @@ 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>
|
||||||
<div className={styles.searchContainer}>
|
<Head>
|
||||||
<input
|
<title>Qmining - Tárgyak</title>
|
||||||
placeholder="Keresés..."
|
</Head>
|
||||||
className={styles.searchBar}
|
{data ? (
|
||||||
type="text"
|
<>
|
||||||
value={searchTerm}
|
<div className={styles.searchContainer}>
|
||||||
onChange={(e) => {
|
<input
|
||||||
setSearchTerm(e.target.value)
|
placeholder="Keresés..."
|
||||||
|
className={styles.searchBar}
|
||||||
|
type="text"
|
||||||
|
value={searchTerm}
|
||||||
|
onChange={(e) => {
|
||||||
|
setSearchTerm(e.target.value)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
setSearchTerm('')
|
||||||
|
}}
|
||||||
|
className={styles.clearButton}
|
||||||
|
>
|
||||||
|
X
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<SubjectSelector
|
||||||
|
data={data}
|
||||||
|
activeSubjName={activeSubjName}
|
||||||
|
searchTerm={searchTerm}
|
||||||
|
onSubjSelect={(subjName) => {
|
||||||
|
setActiveSubjName(subjName)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<button
|
<hr />
|
||||||
onClick={() => {
|
<div>
|
||||||
setSearchTerm('')
|
{qCount} kérdés, {sCount} tárgy
|
||||||
}}
|
</div>
|
||||||
className={styles.clearButton}
|
<Sleep />
|
||||||
>
|
<div>
|
||||||
X
|
<Subject subj={currSubj} />
|
||||||
</button>
|
</div>
|
||||||
</div>
|
</>
|
||||||
<SubjectSelector
|
) : (
|
||||||
data={data}
|
<LoadingIndicator />
|
||||||
activeSubjName={activeSubjName}
|
)}
|
||||||
searchTerm={searchTerm}
|
</div>
|
||||||
onSubjSelect={(subjName) => {
|
)
|
||||||
setActiveSubjName(subjName)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<hr />
|
|
||||||
<div>
|
|
||||||
{qCount} kérdés, {sCount} tárgy
|
|
||||||
</div>
|
|
||||||
<Sleep />
|
|
||||||
<div>
|
|
||||||
<Subject subj={currSubj} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return <LoadingIndicator />
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue