From 23865a68cda6160ab936703b190804377793d325 Mon Sep 17 00:00:00 2001 From: ndaniel1102 Date: Mon, 12 Apr 2021 01:02:40 +0200 Subject: [PATCH] Rework of page "allQuestions", minor style and layout fixes and modifications for other pages --- src/components/QuestionSearchResult.js | 16 +++--- src/components/Questions.js | 3 +- src/components/Questions.module.css | 9 +++- src/components/composer.js | 18 ++++--- src/components/composer.module.css | 27 +++++++--- src/components/layout.module.css | 4 -- src/defaultStyles.css | 56 ++++++++++++++------- src/pages/allQuestions.js | 68 ++++++++++++++------------ src/pages/allQuestions.module.css | 19 ++++--- src/pages/contact.js | 3 ++ src/pages/contribute.js | 4 +- src/pages/contribute.module.css | 9 ---- src/pages/faq.js | 3 +- src/pages/pwRequest.js | 2 + 14 files changed, 147 insertions(+), 94 deletions(-) diff --git a/src/components/QuestionSearchResult.js b/src/components/QuestionSearchResult.js index b661d3d..b1eac5b 100644 --- a/src/components/QuestionSearchResult.js +++ b/src/components/QuestionSearchResult.js @@ -45,16 +45,14 @@ export default function QuestionSearchResult({ data, searchTerm }) { const renderCount = () => { return ( -
-
- {searchTerm ? '' : 'Kezdj el írni kereséshez! '} - {`${results} találat, ${subjs.length || data.length} tárgyból`} -
+
{results === 0 && (
- {'Pontos egyezést keres a kereső, próbálj kisebb részletre keresni'} + {`${results} találat. Az általad keresett kifejezés nem található, + próbáld bővíteni a keresési feltételt!`}
)} + {results > 0 &&
{`${results} találat.`}
}
) } @@ -62,10 +60,12 @@ export default function QuestionSearchResult({ data, searchTerm }) { if (results > constants.maxQuestionsToRender) { return (
- {renderCount()} {searchTerm ? ( -
Szűkítsd a keresést találatok megjelenítéséhez!
+
+ Szűkítsd a keresési feltételeket a találatok megjelenítéséhez! +
) : null} +
) } else { diff --git a/src/components/Questions.js b/src/components/Questions.js index d1c0555..a82563f 100644 --- a/src/components/Questions.js +++ b/src/components/Questions.js @@ -10,9 +10,10 @@ class Questions extends PureComponent { return (
+
{subjs.map((subj, i) => { return ( -
+
{subj.Name}
{subj.Questions.map((question, i) => { return diff --git a/src/components/Questions.module.css b/src/components/Questions.module.css index 3c0472d..78254f8 100644 --- a/src/components/Questions.module.css +++ b/src/components/Questions.module.css @@ -1,7 +1,14 @@ .subjName { font-size: 24px; - background-color: #9999ff; + font-weight: 600; + background-color: var(--text-color); color: black; + margin-top: 25px; padding: 10px; word-wrap: break-word; } + +.questionBg { + background-color: #1b1b1c; + padding-bottom: 5px; +} \ No newline at end of file diff --git a/src/components/composer.js b/src/components/composer.js index 909a5fc..2e5a376 100644 --- a/src/components/composer.js +++ b/src/components/composer.js @@ -27,14 +27,16 @@ export default function Composer({ onSubmit }) { return ( <> -
{ - setEditorShowing(true) - }} - className={styles.new} - > - Bejegyzés írása... -
+
+
{ + setEditorShowing(true) + }} + className={styles.new} + > + Bejegyzés írása... +
+
{editorShowing && ( { diff --git a/src/components/composer.module.css b/src/components/composer.module.css index 012e515..19a0b86 100644 --- a/src/components/composer.module.css +++ b/src/components/composer.module.css @@ -39,16 +39,31 @@ } .new { - text-align: center; - background-color: #191919; - border-radius: 3px; - cursor: pointer; + display: flex; + justify-content: center; + margin: 10px 0px; + height: 19px; + width: 30%; + display: flex; + background-color: var(--hoover-color); + border: none; + color: var(--text-color); + padding: 10px; + font-size: 15px; margin: 8px; - padding: 8px; + cursor: pointer; + text-shadow: 1px 1px 8px black; + transition: width 0.5s, height 0.5s, ease-in 0.5s; + text-align: center; + text-decoration: none; } .new:hover { - background-color: var(--hoover-color); + text-shadow: 2px 2px 8px black; + transition: width 0.5s, height 0.5s, ease-out 0.5s; + background-color: var(--text-color); + font-weight: bold; + color: black; } .composerAction { diff --git a/src/components/layout.module.css b/src/components/layout.module.css index 9cc9759..c87400b 100644 --- a/src/components/layout.module.css +++ b/src/components/layout.module.css @@ -23,10 +23,6 @@ cursor: pointer; } -.sidebarLinks a:hover { - transition: width 0.5s, height 0.5s, ease-out 0.5s; -} - .sidebarLinks a.active { border: 0.5px solid var(--text-color); color: white; diff --git a/src/defaultStyles.css b/src/defaultStyles.css index 6bb2434..600af5c 100644 --- a/src/defaultStyles.css +++ b/src/defaultStyles.css @@ -12,7 +12,7 @@ body { font-family: 'Kameron', serif; font-family: 'Overpass Mono', monospace; color: #999999; - /* cursor: default; */ + cursor: default; } li { @@ -40,12 +40,10 @@ textarea { input { color: var(--text-color); background-color: var(--background-color); - border: 0px solid #444; - width: 100%; -} - -input:focus { - border: 0px solid #444; + border: 1px solid #666; + border-radius: 5px; + width: 80%; + font-family: inherit; } .link { @@ -175,18 +173,20 @@ input:focus { } .questionContainer { - margin: 10px; + margin: 6px; + padding: 10px; } .questionContainer:hover { - background-color: var(--hoover-color); + background-color: #141414; + color: var(--text-color); } .question { word-wrap: break-word; font-weight: bold; font-size: 17px; - color: #ffffff; + color: gainsboro; } .answer { @@ -212,16 +212,22 @@ input:focus { } .subjectSelector { - overflow: scroll; - height: 350px; + overflow: auto; + height: auto; + max-height: 250px; margin: 10px; + padding: 5px; + padding-right: 10px; + padding-left: 8px; + background-color: #141414; } .subjItem { font-size: 18px; padding: 3px; + padding-top: 5px; + margin-top: 4px; cursor: pointer; - float: 1; display: flex; justify-content: space-between; } @@ -376,10 +382,6 @@ input:focus { text-decoration: none; } -.buttonContainer > *:active { - transform: translateY(2.5px); -} - .buttonContainer > *:hover { text-shadow: 2px 2px 8px black; transition: width 0.5s, height 0.5s, ease-out 0.5s; @@ -410,7 +412,7 @@ select:hover { } .selectContainer > select { - width: 21%; + width: 20%; border-radius: 5px; border: 1.5px solid white; background-color: #9c9c98; @@ -428,3 +430,21 @@ select:hover { padding: 0px 5px; margin-right: 8px; } + +.description { + padding-top: 1px; + padding-bottom: 10px; + font-size: inherit; + color: inherit; + text-align: center; + margin: 10px; +} + +.resultContainer { + color: gainsboro; + font-size: 18px; + display: flex; + justify-content: center; + margin-top: 8px; + +} diff --git a/src/pages/allQuestions.js b/src/pages/allQuestions.js index f1b2c43..cb3b98b 100644 --- a/src/pages/allQuestions.js +++ b/src/pages/allQuestions.js @@ -103,8 +103,16 @@ export default function AllQuestions({ router }) {

Kérdések és tárgyak

-
-
+ +
+

+ 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) +

+
+
@@ -159,25 +167,26 @@ export default function AllQuestions({ router }) {
{data ? ( <> -
- { - setSearchTerm(event.target.value) - }} - /> - -
+
+
+ { + setSearchTerm(event.target.value) + }} + /> + +
+

-
-
{/*{qCount} kérdés, {sCount} tárgy */}
- +
+
@@ -206,8 +214,7 @@ export default function AllQuestions({ router }) { <>
{ @@ -229,7 +236,6 @@ export default function AllQuestions({ router }) { X
-
@@ -247,7 +253,9 @@ export default function AllQuestions({ router }) { {dbs ? <>{renderDbSelector()} : } {dbs && data ? ( <> - {`${questionCount} kérdés, ${subjectCount} tárgy`} +
+ {`Összesen ${questionCount} kérdés, ${subjectCount} tárgyból`} +
Kapcsolat

+
Üzenet küldése
diff --git a/src/pages/contribute.js b/src/pages/contribute.js index a40d5fe..06f9c61 100644 --- a/src/pages/contribute.js +++ b/src/pages/contribute.js @@ -21,7 +21,8 @@ export default function contribute() {

Teendők

-
+ +

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() {


-
Git repos

diff --git a/src/pages/contribute.module.css b/src/pages/contribute.module.css index 99345f9..0cbe79e 100644 --- a/src/pages/contribute.module.css +++ b/src/pages/contribute.module.css @@ -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; diff --git a/src/pages/faq.js b/src/pages/faq.js index d7814a9..eca2c99 100644 --- a/src/pages/faq.js +++ b/src/pages/faq.js @@ -255,6 +255,7 @@ export default function FAQ() {

Gyakran Ismételt Kérdések


+
{Object.keys(pages).map((key) => { @@ -273,7 +274,7 @@ export default function FAQ() { })}
{renderCurrPage(currPage)} - +

) diff --git a/src/pages/pwRequest.js b/src/pages/pwRequest.js index a9e497f..b52705a 100644 --- a/src/pages/pwRequest.js +++ b/src/pages/pwRequest.js @@ -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() {

Jelszó generálás

+