From d301bcd17f1f4429a3cc6fa997ae4a714418715c Mon Sep 17 00:00:00 2001 From: mrfry Date: Sun, 4 Dec 2022 19:09:43 +0100 Subject: [PATCH] swapped news and user forum --- src/components/forum.js | 2 - src/data/tabs.json | 8 +- src/pages/index.js | 22 ++-- src/pages/index.module.css | 18 +-- src/pages/news.js | 20 +++ .../{userForum.module.css => news.module.css} | 18 +-- src/pages/userForum.js | 29 ----- src/pages/userfiles.module.css | 122 ------------------ 8 files changed, 54 insertions(+), 185 deletions(-) create mode 100644 src/pages/news.js rename src/pages/{userForum.module.css => news.module.css} (92%) delete mode 100644 src/pages/userForum.js delete mode 100644 src/pages/userfiles.module.css diff --git a/src/components/forum.js b/src/components/forum.js index 2baecce..70d9b15 100644 --- a/src/components/forum.js +++ b/src/components/forum.js @@ -288,7 +288,6 @@ export default function Forum({ globalState, setGlobalState, forumName, - children, allowPost, }) { const userId = globalData.userId @@ -435,7 +434,6 @@ export default function Forum({
- {children || null} {renderNews()} {postInModalKey && ( + <> {motd && ( -
+
MOTD
{motd ? (
@@ -30,6 +24,14 @@ export default function Index({ )}
)} - + + ) } diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 8a5e7d3..2ecd39b 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -1,13 +1,6 @@ -.title { - color: var(--text-color); - font-size: 32px; +.topMsg { text-align: center; - letter-spacing: 2.5px; -} - -.motd { - text-align: center; - font-size: 20px; + font-size: 18px; border: 2px dashed var(--text-color); padding-top: 13px; @@ -19,3 +12,10 @@ margin-left: 5px; margin-right: 5px; } + +.title { + color: var(--text-color); + font-size: 32px; + text-align: center; + letter-spacing: 2.5px; +} diff --git a/src/pages/news.js b/src/pages/news.js new file mode 100644 index 0000000..ccb5e74 --- /dev/null +++ b/src/pages/news.js @@ -0,0 +1,20 @@ +import React from 'react' + +import Forum from '../components/forum' + +export default function Index({ + router, + globalData, + globalState, + setGlobalState, +}) { + return ( + + ) +} diff --git a/src/pages/userForum.module.css b/src/pages/news.module.css similarity index 92% rename from src/pages/userForum.module.css rename to src/pages/news.module.css index 2ecd39b..8a5e7d3 100644 --- a/src/pages/userForum.module.css +++ b/src/pages/news.module.css @@ -1,6 +1,13 @@ -.topMsg { +.title { + color: var(--text-color); + font-size: 32px; text-align: center; - font-size: 18px; + letter-spacing: 2.5px; +} + +.motd { + text-align: center; + font-size: 20px; border: 2px dashed var(--text-color); padding-top: 13px; @@ -12,10 +19,3 @@ margin-left: 5px; margin-right: 5px; } - -.title { - color: var(--text-color); - font-size: 32px; - text-align: center; - letter-spacing: 2.5px; -} diff --git a/src/pages/userForum.js b/src/pages/userForum.js deleted file mode 100644 index 579e19a..0000000 --- a/src/pages/userForum.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react' - -import Forum from '../components/forum' - -import styles from './userForum.module.css' - -export default function UserForum({ - router, - globalData, - globalState, - setGlobalState, -}) { - return ( - -
-
Felhasználói fórum
- Itt lehet témákat felvetni és megbeszélni a többi felhasználóval, vagy - adminnal. -
-
- ) -} diff --git a/src/pages/userfiles.module.css b/src/pages/userfiles.module.css deleted file mode 100644 index 3e891f5..0000000 --- a/src/pages/userfiles.module.css +++ /dev/null @@ -1,122 +0,0 @@ -.tableContainer { - user-select: none; - display: flex; - flex-flow: column; -} - -.tableContainer > div { - padding: 5px 5px; - display: flex; - align-items: stretch; -} - -.tableContainer > div > div { - padding: 5px; -} - -.tableContainer > div > div:nth-child(1) { - flex: 1 0 100px; -} - -.tableContainer > div > div:nth-child(2) { - flex: 0 200px; -} -.tableContainer > div > div:nth-child(3) { - flex: 0 90px; -} - -.tableContainer > div > div:nth-child(4) { - flex: 0 100px; -} - -.tableContainer > div > div:nth-child(5) { - flex: 0 110px; -} - -.tableContainer > div > div:nth-child(6) { - flex: 0 100px; -} - -.rows > div { - word-wrap: anywhere; - cursor: pointer; - align-items: center; -} - -.rows > div:nth-child(2n + 1) { - background-color: var(--dark-color); -} - -.rows > div:hover { - background-color: var(--hoover-color); -} - -.header > div > div { - color: var(--text-color); - display: flex; - align-items: center; - cursor: pointer; - background-color: var(--background-color); -} - -.header > div > div:hover { - background-color: var(--hoover-color); -} - -@media screen and (max-width: 700px) { - .header > div > div { - height: 100px; - writing-mode: vertical-rl; - text-orientation: sideways; - } -} - -.uploadContainer > div { - padding: 5px; - text-align: center; -} - -.deleteButton { - text-align: center; - padding: 2px; - border: 1px solid var(--hoover-color); - border-radius: 3px; - cursor: pointer; -} - -.deleteButton:hover { - background-color: var(--dark-color); -} - -.newButton { - width: 35%; -} - -.description { - padding: 5px; - text-align: center; -} - -.description > b { - color: red; -} - -.currDir { - color: var(--text-color); - text-align: center; - font-size: 20px; -} - -.title { - display: flex; - justify-content: center; - align-items: center; -} - -.title > div:nth-child(1) { - padding: 0px 16px; -} - -.title > div:nth-child(2) { - flex: 1; -}