Rework of page "allQuestions", minor style and layout fixes and modifications for other pages

This commit is contained in:
ndaniel1102 2021-04-12 01:02:40 +02:00
parent 47a2227f87
commit 23865a68cd
14 changed files with 147 additions and 94 deletions

View file

@ -103,8 +103,16 @@ export default function AllQuestions({ router }) {
<div className={'pageHeader'}>
<h1>Kérdések és tárgyak</h1>
</div>
<br />
<div className={`selectContainer ${styles.content}`}>
<Sleep />
<div className={'description'}>
<p>
Ezen az oldalon tudsz manuálisan keresni a kérdések és a tárgyak
között, vagy ellenőrizni, hogy egy adott tárgy szerepel-e a
kérdés- és tárgyadatbázisban. Ezen kívül a kérdéseket le is
töltheted offline használatra. (txt formátumban)
</p>
</div>
<div className={'selectContainer'}>
<select
defaultValue={-1}
onChange={(event) => {
@ -127,7 +135,7 @@ export default function AllQuestions({ router }) {
}}
>
<option disabled value={-1}>
{' - Válassz egy adatbázist! - '}
{' Válassz egy adatbázist!'}
</option>
{dbs.map((db, i) => {
return (
@ -137,7 +145,7 @@ export default function AllQuestions({ router }) {
)
})}
<option value={'all'} key={'all'}>
{'All'}
{'Összes kérdés'}
</option>
</select>
</div>
@ -159,25 +167,26 @@ export default function AllQuestions({ router }) {
<div>
{data ? (
<>
<div className={styles.searchContainer}>
<input
autoFocus
placeholder="Keresés..."
type="text"
value={searchTerm}
onChange={(event) => {
setSearchTerm(event.target.value)
}}
/>
<button
onClick={() => {
setSearchTerm('')
}}
className={styles.clearButton}
>
X
</button>
</div>
<center>
<div className={styles.searchContainer}>
<input
placeholder="Kezdj el írni a kereséshez..."
type="text"
value={searchTerm}
onChange={(event) => {
setSearchTerm(event.target.value)
}}
/>
<button
onClick={() => {
setSearchTerm('')
}}
className={styles.clearButton}
>
X
</button>
</div>
</center>
<hr />
<SubjectSelector
data={data}
@ -187,10 +196,9 @@ export default function AllQuestions({ router }) {
setActiveSubjName(subjName)
}}
/>
<hr />
<div>{/*{qCount} kérdés, {sCount} tárgy */}</div>
<Sleep />
<div>
<hr />
<Subject subj={currSubj} />
</div>
</>
@ -206,8 +214,7 @@ export default function AllQuestions({ router }) {
<>
<div className={styles.searchContainer}>
<input
autoFocus
placeholder="Keresés..."
placeholder="Kezdj el írni a kereséshez..."
type="text"
value={searchTerm}
onChange={(event) => {
@ -229,7 +236,6 @@ export default function AllQuestions({ router }) {
X
</button>
</div>
<hr />
<div>
<QuestionSearchResult data={data} searchTerm={searchTerm} />
</div>
@ -247,7 +253,9 @@ export default function AllQuestions({ router }) {
{dbs ? <>{renderDbSelector()}</> : <LoadingIndicator />}
{dbs && data ? (
<>
{`${questionCount} kérdés, ${subjectCount} tárgy`}
<div className={styles.info}>
{`Összesen ${questionCount} kérdés, ${subjectCount} tárgyból`}
</div>
<div className={'buttonContainer'}>
<div
className={!subjectsShowing ? 'activeButton' : ''}

View file

@ -1,17 +1,24 @@
.content {
padding-top: 50px;
}
.searchContainer {
width: 100%;
display: flex;
justify-content: center;
margin-left: 10px;
padding-top: 10px;
padding-bottom: 2px;
}
.clearButton {
width: 80px;
width: 50px;
background-color: var(--background-color);
color: white;
font-size: 23px;
font-size: 18px;
cursor: pointer;
border: none;
margin-left: 10px;
}
.info {
text-align: center;
font-style: italic;
padding-top: 25px;
}

View file

@ -5,6 +5,8 @@ import FeedbackArea from '../components/feedbackArea'
import constants from '../constants.json'
import LoadingIndicator from '../components/LoadingIndicator'
import Sleep from '../components/sleep'
import styles from './contact.module.css'
export default function Contact() {
@ -36,6 +38,7 @@ export default function Contact() {
<h1>Kapcsolat</h1>
</div>
<br />
<Sleep />
<br />
<div className={styles.text}>
<div>Üzenet küldése</div>

View file

@ -21,7 +21,8 @@ export default function contribute() {
<div className={'pageHeader'}>
<h1>Teendők</h1>
</div>
<div className={styles.description}>
<Sleep />
<div className={'description'}>
<p>
Ezen az oldalon új ötleteket adhatsz hozzá megvalósításra a teendők
listájához.
@ -66,7 +67,6 @@ export default function contribute() {
</center>
<hr />
<Todos />
<Sleep />
<hr />
<div className={styles.title}>Git repos</div>
<hr />

View file

@ -1,12 +1,3 @@
.description {
padding-top: 1px;
padding-bottom: 10px;
font-size: inherit;
color: inherit;
text-align: center;
margin: 10px;
}
.warning {
color: white;
padding: 10px;

View file

@ -255,6 +255,7 @@ export default function FAQ() {
<h1>Gyakran Ismételt Kérdések</h1>
</div>
<br />
<Sleep />
<br />
<div className={'buttonContainer'}>
{Object.keys(pages).map((key) => {
@ -273,7 +274,7 @@ export default function FAQ() {
})}
</div>
{renderCurrPage(currPage)}
<Sleep />
<p className={'endofpage'} />
</div>
)

View file

@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'
import fetch from 'unfetch'
import Head from 'next/head'
import Link from 'next/link'
import Sleep from '../components/sleep'
import styles from './pwRequest.module.css'
import constants from '../constants.json'
@ -88,6 +89,7 @@ export default function PwRequest() {
<div className={'pageHeader'}>
<h1>Jelszó generálás</h1>
</div>
<Sleep />
<div id="form">
<div className={styles.text}>
<p className={styles.descrip}>