From c5d6518cebd6be2416607106b2fa20daf48397d7 Mon Sep 17 00:00:00 2001 From: MrFry Date: Sun, 15 Mar 2020 10:53:28 +0100 Subject: [PATCH] Feedback and test sender implement, minor fixes with links --- src/components/layout.js | 8 +++-- src/data/links.json | 12 ++++--- src/data/tabs.json | 8 +++++ src/defaultStyles.css | 10 ++++++ src/pages/_app.js | 7 +++- src/pages/allQuestions.js | 47 +++++++++++------------- src/pages/feedback.js | 19 +++++++++- src/pages/home.js | 41 +++++++++++---------- src/pages/index.js | 73 +++++++++++++++++++++++++------------- src/pages/manual.js | 5 ++- src/pages/userQuestions.js | 13 +++---- 11 files changed, 154 insertions(+), 89 deletions(-) diff --git a/src/components/layout.js b/src/components/layout.js index e538615..65e56ab 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -1,10 +1,11 @@ import Link from 'next/link' import tabs from '../data/tabs.json' +import constants from '../constants.json' // TODO: activelink prop to set link to active export default function Layout (props) { - const { currPageName } = props + const href = '' // TODO return (
@@ -24,11 +25,14 @@ export default function Layout (props) { return ( {item.text} ) })} + + Donate +
{props.children} diff --git a/src/data/links.json b/src/data/links.json index 85e0ca7..ea27f66 100644 --- a/src/data/links.json +++ b/src/data/links.json @@ -1,18 +1,22 @@ { "install": { - "href": "/install", + "href": "install", "text": "Install" }, + "data": { + "href": "data.json", + "text": "Összes kérdés JSON" + }, "server": { - "href": "/servergit", + "href": "servergit", "text": "Szerver repó" }, "client": { - "href": "/scriptgit", + "href": "scriptgit", "text": "Script git" }, "classes": { - "href": "/classesgit", + "href": "classesgit", "text": "Classes git" } } diff --git a/src/data/tabs.json b/src/data/tabs.json index f29d916..4634115 100644 --- a/src/data/tabs.json +++ b/src/data/tabs.json @@ -11,6 +11,14 @@ "href": "/allQuestions", "text": "All question" }, + "feedback": { + "href": "/feedback", + "text": "Feedback" + }, + "testSender": { + "href": "/testSender", + "text": "Test Sender" + }, "userQuestions": { "href": "/userQuestions", "text": "User Questions" diff --git a/src/defaultStyles.css b/src/defaultStyles.css index ac1c17e..81cf34d 100644 --- a/src/defaultStyles.css +++ b/src/defaultStyles.css @@ -20,6 +20,16 @@ body { text-decoration: none; } +.motdHeader { + text-align: center; + font-size: 24px; +} + +.motd { + text-align: center; + font-size: 20px; +} + .sidebar { margin: 0; padding: 0; diff --git a/src/pages/_app.js b/src/pages/_app.js index 9c15648..bad7188 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -1,9 +1,14 @@ // import App from 'next/app' import '../defaultStyles.css' +import Layout from '../components/layout' function MyApp ({ Component, pageProps }) { - return + return ( + + + + ) } // Only uncomment this method if you have blocking data requirements for diff --git a/src/pages/allQuestions.js b/src/pages/allQuestions.js index 89e4126..4e080b9 100644 --- a/src/pages/allQuestions.js +++ b/src/pages/allQuestions.js @@ -4,7 +4,6 @@ import fetch from 'unfetch' import LoadingIndicator from '../components/LoadingIndicator.js' import Subject from '../components/Subject.js' import SubjectSelector from '../components/SubjectSelector.js' -import Layout from '../components/layout' import constants from '../constants.json' @@ -30,37 +29,33 @@ export default function AllQuestions (props) { }) return ( - +
-
- { setSearchTerm(e.target.value) }} - /> -
- { setActiveSubjName(subjName) }} + { setSearchTerm(e.target.value) }} /> -
-
- -
- + { setActiveSubjName(subjName) }} + /> +
+
+ +
+
) } else { return ( - - - + ) } } diff --git a/src/pages/feedback.js b/src/pages/feedback.js index 5056313..d4bc6ef 100644 --- a/src/pages/feedback.js +++ b/src/pages/feedback.js @@ -1,7 +1,24 @@ +import constants from '../constants.json' + export default function Feedback (props) { + // TODO: textarea style to css + // TODO: response to user that msg is sucessfully sent return (
- hello Feedback +
+
Észrevételek: (közeledő teszt miatti kérdés-karbantartás, bug, feature vagy egyéb dolog, ami nyomja a lelked)
+