Sidebar rework (part 2), overall apearance rework (home page)

/home gomb kérdése megoldva, link a logo-n fixed/
This commit is contained in:
ndaniel1102 2021-02-26 21:05:25 +01:00
parent 58db2e3d24
commit 050eb28fb3
6 changed files with 79 additions and 54 deletions

View file

View file

@ -80,11 +80,11 @@ export default function Layout({
<div /> <div />
</span> </span>
<div className="sidebarheader"> <div className="sidebarheader">
<a href="/"><img <Link href="/"><a><img
style={{ maxWidth: '100%' }} style={{ maxWidth: '100%' }}
src={`${constants.siteUrl}img/frylabs-logo_small_transparent.png`} src={`${constants.siteUrl}img/frylabs-logo_small_transparent.png`}
alt="Frylabs" alt="Frylabs"
/></a> /></a></Link>
</div> </div>
</div> </div>
{sidebarOpen ? ( {sidebarOpen ? (
@ -113,7 +113,7 @@ export default function Layout({
'Kérdések szerkesztése, törlése, beküldése, és kitöltetlen tesztek' 'Kérdések szerkesztése, törlése, beküldése, és kitöltetlen tesztek'
} }
> >
Kérdés szerkesztő / kitöltetlen tesztek Kérdés szerkesztő
</a> </a>
<a <a
href={`/donate`} href={`/donate`}
@ -204,7 +204,7 @@ export default function Layout({
setShowNewMsgModal(false) setShowNewMsgModal(false)
}} }}
> >
Új üzeneted van, kattints 📬-ra bal alul megtekintéséhez! Új üzeneted van, kattints a 📬-ra bal alul a megtekintéséhez!
</Modal> </Modal>
) : null} ) : null}
<BB /> <BB />

View file

@ -1,11 +1,11 @@
{ {
"index": { "index": {
"href": "/", "href": "/",
"text": "Home" "text": "Főoldal"
}, },
"manual": { "manual": {
"href": "/manual", "href": "/manual",
"text": "Manual" "text": "A script használata"
}, },
"allQuestions": { "allQuestions": {
"href": "/allQuestions", "href": "/allQuestions",
@ -13,15 +13,15 @@
}, },
"pwRequest": { "pwRequest": {
"href": "/pwRequest", "href": "/pwRequest",
"text": "Jelszó kérés" "text": "Jelszó generálás"
}, },
"contribute": { "contribute": {
"href": "/contribute", "href": "/contribute",
"text": "Todos, contribute" "text": "Teendők"
}, },
"ranklist": { "ranklist": {
"href": "/ranklist", "href": "/ranklist",
"text": "Ranklista" "text": "Ranglista"
}, },
"feedback": { "feedback": {
"href": "/feedback", "href": "/feedback",

View file

@ -2,7 +2,7 @@
--text-color: #F2CB05; --text-color: #F2CB05;
--bright-color: #f2f2f2; --bright-color: #f2f2f2;
--background-color: #222426; --background-color: #222426;
--hoover-color: #202020; --hoover-color: #191919;
} }
@import url('https://fonts.googleapis.com/css2?family=Kameron&family=Overpass+Mono:wght@300;400&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Kameron&family=Overpass+Mono:wght@300;400&display=swap');
@ -17,6 +17,10 @@ a {
color: white; color: white;
} }
a:hover {
color: #C1C1C1;
}
.link { .link {
margin: 20px; margin: 20px;
font-size: 20px; font-size: 20px;
@ -254,7 +258,7 @@ select:hover {
display: flex; display: flex;
margin-top: auto; margin-top: auto;
margin-bottom: 20px; margin-bottom: 20px;
background-color: #373737;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
@ -265,8 +269,10 @@ select:hover {
} }
.logout { .logout {
padding: 7px; padding: 6px;
margin-right: 7px;
cursor: pointer; cursor: pointer;
font-size: 15.5px;
} }
.logout:hover { .logout:hover {
@ -274,9 +280,11 @@ select:hover {
} }
.msgs :first-child { .msgs :first-child {
font-size: 35px; font-size: 27px;
margin-left: 4px;
} }
.msgs > div { .msgs > div {
margin: 0px 5px; padding: 2px 6px;
font-size: 13.5px;
} }

View file

@ -81,14 +81,12 @@ export default function Index(props) {
return ( return (
<div key={key}> <div key={key}>
{renderQAItem(newsItem, key)} {renderQAItem(newsItem, key)}
<hr />
</div> </div>
) )
} else { } else {
return ( return (
<div key={key}> <div key={key}>
{renderNewsItem(newsItem, key)} {renderNewsItem(newsItem, key)}
<hr />
</div> </div>
) )
} }
@ -97,8 +95,7 @@ export default function Index(props) {
return ( return (
<div> <div>
<div className={styles.title}>News</div> <div className={styles.title}>Hírek</div>
<hr />
<hr /> <hr />
<div className={styles.questionscontainer}>{questions}</div> <div className={styles.questionscontainer}>{questions}</div>
</div> </div>
@ -110,10 +107,8 @@ export default function Index(props) {
const renderMotd = () => { const renderMotd = () => {
return ( return (
<div> <div className={styles.motd_body}>
<div className={styles.title}>MOTD</div> <div className={styles.title}>MOTD</div>
<hr />
<hr />
{motd ? ( {motd ? (
<div <div
className={styles.motd} className={styles.motd}
@ -206,11 +201,8 @@ export default function Index(props) {
{'Összes kérdés JSON'} {'Összes kérdés JSON'}
</a> </a>
</div> </div>
<hr />
{renderMotd()} {renderMotd()}
{/*{userSpecificMotd && renderUserSpecificMotd()} */} {/*{userSpecificMotd && renderUserSpecificMotd()} */}
<hr />
<hr />
<Sleep /> <Sleep />
{renderNews()} {renderNews()}
{renderDbSelector()} {renderDbSelector()}

View file

@ -4,9 +4,10 @@
.button { .button {
color: white; color: white;
background-color: #303030; background-color: #313131;
margin: 2px; margin: 0px 4px;
padding: 10px 5px; padding: 15px 4px;
max-width: 100%;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
@ -22,6 +23,13 @@
.button:hover { .button:hover {
background-color: #555; background-color: #555;
color: var(--text-color);
transition: width 0.5s, height 0.5s, ease-out 0.5s;
text-shadow: 2px 1.5px 8px black;
}
.hr {
width: 100%;
} }
.motd { .motd {
@ -31,35 +39,49 @@
} }
.itemContainer { .itemContainer {
width: 100%;
margin: 20px 5px; margin: 20px 5px;
}
.itemContainer:hover {
background-color: var(--hoover-color); background-color: var(--hoover-color);
} }
.newsBody { .newsBody {
margin: 0px 5px; margin: 0px 5px;
font-size: 18px; padding: 10px 14px;
font-size: 17px;
color: #fff; color: #fff;
text-align: justify;
}
.motd_body {
border: 2px dashed var(--text-color);
padding-top: 13px;
padding-bottom: 15px;
padding-left: 5px;
padding-right: 5px;
margin-top: 18px;
margin-bottom: 30px;
margin-left: 5px;
margin-right: 5px;
font-size: 8px;
} }
.title { .title {
color: #F2CB05; color: var(--text-color);
font-size: 30px; font-size: 32px;
text-align: center; text-align: center;
letter-spacing: 2.5px;
} }
.subtitle { .subtitle {
color: #9999ff; color: var(--text-color);
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
} }
.newsTitle { .newsTitle {
font-size: 28px;
color: var(--text-color); color: var(--text-color);
margin: 0px 5px; font-size: 28px;
padding-left: 17px;
} }
.question { .question {
@ -74,9 +96,12 @@
} }
.itemNumber { .itemNumber {
color: #fff; color: #a7a7a7;
margin: 0px 5px; margin: 0px 5px;
font-size: 24px; font-size: 22px;
padding-top: 12px;
padding-left: 13px;
padding-bottom: 3px;
} }
.repos { .repos {