Style and layout improvements on modals

/posting modal still needs some fixing tho/
This commit is contained in:
ndaniel1102 2021-03-14 01:27:01 +01:00
parent cdc2b3fd66
commit b0cbc5aa5e
10 changed files with 606 additions and 5426 deletions

5296
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -13,6 +13,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"babel-eslint": "^10.1.0",
"eslint-plugin-react": "^7.21.5", "eslint-plugin-react": "^7.21.5",
"next": "^10.0.3", "next": "^10.0.3",
"react": "^16.13.0", "react": "^16.13.0",

View file

@ -63,7 +63,7 @@ function Comment({ comment, index, onComment, onDelete, onReact, uid }) {
</div> </div>
<div>User #{user}</div> <div>User #{user}</div>
</div> </div>
<div>{date}</div> <div className={styles.commentDate}>{date}</div>
</div> </div>
<div className={`${!displayed && styles.hidden}`}> <div className={`${!displayed && styles.hidden}`}>
<div className={styles.commentText}> {content}</div> <div className={styles.commentText}> {content}</div>
@ -153,8 +153,8 @@ export default function Comments({
const [commentsShowing, setCommentsShowing] = useState(false) const [commentsShowing, setCommentsShowing] = useState(false)
const commentCount = comments ? countComments(comments) : 0 const commentCount = comments ? countComments(comments) : 0
return ( return (
<div> <div>
{commentsShowing ? ( {commentsShowing ? (
<Modal <Modal
closeClick={() => { closeClick={() => {

View file

@ -36,7 +36,8 @@
} }
.comment { .comment {
margin-left: 25px; margin-left: 10px;
margin-right: 30px;
padding: 8px 0px; padding: 8px 0px;
} }
@ -45,9 +46,13 @@
border-left: 3px solid azure; border-left: 3px solid azure;
} }
.commentDate {
text-align: right;
}
.commentHeader { .commentHeader {
display: flex; display: flex;
justify-content: space-between; /*justify-content: space-between;*/
} }
.commentHeader > div { .commentHeader > div {

View file

@ -44,7 +44,8 @@ export default function Composer({ onSubmit }) {
<div className={styles.container}> <div className={styles.container}>
{type !== 'private' && ( {type !== 'private' && (
<input <input
placeholder={'Téma'} placeholder={'Téma...'}
required
value={title} value={title}
onChange={(e) => { onChange={(e) => {
setTitle(e.target.value) setTitle(e.target.value)
@ -52,7 +53,8 @@ export default function Composer({ onSubmit }) {
/> />
)} )}
<textarea <textarea
placeholder={'...'} placeholder={'Írj ide valamit...'}
required
value={val} value={val}
onChange={(e) => { onChange={(e) => {
setVal(e.target.value) setVal(e.target.value)
@ -65,21 +67,21 @@ export default function Composer({ onSubmit }) {
}} }}
/> />
)} )}
<div className={styles.typeSelector}> <div id="radiolabel"><p><b>A poszt típusa:</b></p></div>
<div>Post típusa:</div> <div className={styles.typeSelector}>
<div title="Minden felhasználó látja főoldalon, és tudnak rá válaszolni"> <div title="A főoldalon mindenki láthatja, reagálhat rá és kommentelhet alá">
<input <input
onChange={(e) => { onChange={(e) => {
setType(e.target.value) setType(e.target.value)
}} }}
type="radio" type="radio"
name="type" name="type"
value="public" value="public"
defaultChecked defaultChecked
/> />
Publikus Publikus
</div> </div>
<div title="Csak a weboldal üzemeltetője látja"> <div title="Csak admin bácsi látja">
<input <input
onChange={(e) => { onChange={(e) => {
setType(e.target.value) setType(e.target.value)
@ -90,25 +92,18 @@ export default function Composer({ onSubmit }) {
/> />
Privát Privát
</div> </div>
<div className={styles.tip}>
(Tartsd egered opciókra több infóért)
</div>
</div> </div>
<div className={'actions'}> <div className={styles.tip}>
<b>Tipp:</b> vidd a kurzort a poszt-típusok fölé több infóért!
</div>
<div className={styles.composerAction}>
<span <span
onClick={() => { onClick={() => {
onSubmit(type, title, val, file) onSubmit(type, title, val, file)
setEditorShowing(false) setEditorShowing(false)
}} }}
> >
Post Posztolás
</span>
<span
onClick={() => {
setEditorShowing(false)
}}
>
Cancel
</span> </span>
</div> </div>
</div> </div>

View file

@ -1,33 +1,77 @@
.container { .container {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
max-width: 400px;
} }
.container > input, .container > input,
.container > textarea { .container > textarea {
margin: 5px 0px; margin: 5px 0px;
padding: 4px; padding: 4px;
} width: 97%;
border-color: #5d5f61;
background-color: #1f2021;
border-radius: 5px;
font-size: 15px;
}
.container > textarea {
margin-left: 1px;
width: 99%;
resize: none;
}
.typeSelector { .typeSelector {
display: flex; display:inline-flex;
align-items: center; text-align: center;
margin-left: 6px;
} }
.tip { .tip {
font-size: 10px; font-size: 11px;
margin: 0px 10px; font-style: italic;
text-align: center;
margin: 15px 0px 2px 2px;
} }
.new { .new {
text-align: center; text-align: center;
background-color: #191919; background-color: #191919;
border-radius: 3px; border-radius: 3px;
cursor: pointer; cursor: pointer;
margin: 8px; margin: 8px;
padding: 8px; padding: 8px;
} }
.new:hover { .new:hover {
background-color: var(--hoover-color); background-color: var(--hoover-color);
}
.composerAction {
display: flex;
align-items: center;
justify-content: center;
width: 36%;
height: 100%;
} }
.composerAction > span {
margin: 2px 2px;
padding: 0px 10px;
border: 1px solid #444;
border-radius: 5px;
cursor: pointer;
user-select: none;
font-size: 15px;
margin-top: 14.5px !important;
padding-top: 4px !important;
transform: translate(109%, 10%);
transition: width 0.5s, height 0.5s, ease-in 0.5s;
}
.composerAction > span:hover {
background-color: var(--hoover-color);
transition: width 0.5s, height 0.5s, ease-out 0.5s;
color: var(--text-color);
text-shadow: 2px 1.5px 10px black;
}

View file

@ -1,23 +1,33 @@
.container { .container {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
margin-top: 8px;
padding: 5px; margin-bottom: 0px;
margin-right: 22%;
margin-left: 22%;
padding: 5px;
} }
.listItem { .listItem {
display: flex; display: flex;
justify-content: center; justify-content: center;
text-align: center;
padding: 5px; padding-top: 10px;
cursor: pointer; padding-bottom: 10px;
color: white; margin: 3px;
cursor: pointer;
color: #a1a1a1;
transition: width 0.5s, height 0.5s, ease-in 0.5s;
} }
.listItem:hover { .listItem:hover {
background-color: var(--hoover-color); background-color: var(--hoover-color);
} transition: width 0.5s, height 0.5s, ease-out 0.5s;
text-shadow: 2px 1.5px 10px black;
color: var(--text-color);
}
.text { .text {
text-align: center; text-align: center;
color: gainsboro;
} }

View file

@ -1,43 +1,48 @@
.modal { .modal {
z-index: 99; z-index: 99;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
} }
.modalContent { .modalContent {
display: flex; display: flex;
align-items: stretch; align-items: stretch;
max-height: 80%; max-height: 80%;
width: 80%; width: 50%;
position: fixed; max-width: 52%;
background: var(--background-color); width: auto;
height: auto; position: fixed;
top: 50%; background: var(--background-color);
left: 50%; height: auto;
transform: translate(-50%, -50%); top: 50%;
border-radius: 8px; left: 50%;
transform: translate(-50%, -50%);
padding: 20px 30px; border-radius: 8px;
cursor: auto; padding-top: 38px;
padding-bottom: 25px;
padding-right: 14px;
padding-left: 16px;
cursor: default;
} }
.close { .close {
cursor: pointer; cursor: pointer;
font-size: 18px; font-size: 16.5px;
position: absolute; position: fixed;
top: 5px;
top: 10px; right: 10px;
right: 10px; margin-bottom: 10px;
display: inline; text-align: right;
display: inline;
} }
.children { .children {
max-height: 100%; max-height: 100%;
width: 100%; width: 100%;
overflow-y: scroll; overflow-y: auto;
overflow-x: hidden; overflow-x: auto;
} }

View file

@ -1,379 +1,379 @@
:root { :root {
--text-color: #f2cb05; --text-color: #f2cb05;
--primary-color: #9999ff; --primary-color: #f2cb05;
--bright-color: #f2f2f2; --bright-color: #f2f2f2;
--background-color: #222426; --background-color: #222426;
--hoover-color: #393939; --hoover-color: #393939;
} }
@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');
body { body {
font-family: 'Kameron', serif; font-family: 'Kameron', serif;
font-family: 'Overpass Mono', monospace; font-family: 'Overpass Mono', monospace;
color: #999999; color: #999999;
} }
li { li {
padding: 2px 0px; padding: 2px 0px;
} }
a { a {
color: white; color: white;
} }
a:hover { a:hover {
color: #c1c1c1; color: #c1c1c1;
} }
textarea { textarea {
color: var(--text-color); color: var(--text-color);
background-color: var(--background-color); background-color: var(--background-color);
box-sizing: border-box; box-sizing: border-box;
height: 120px; height: 120px;
width: 100%; width: 100%;
border: 1px solid #666; border: 1px solid #666;
border-radius: 3px; border-radius: 3px;
} }
input { input {
color: var(--text-color); color: var(--text-color);
background-color: var(--background-color); background-color: var(--background-color);
border: 1px solid #444; border: 1px solid #444;
width: 100%; width: 100%;
} }
.link { .link {
margin: 20px; margin: 20px;
font-size: 20px; font-size: 20px;
} }
.sidebarLink { .sidebarLink {
color: var(--text-color); color: var(--text-color);
text-decoration: none; text-decoration: none;
} }
.sidebar { .sidebar {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 0;
margin: 0; padding: 0;
padding: 0; width: 200px;
width: 200px; background-color: #222426;
background-color: #222426; position: fixed;
position: fixed; height: 100%;
height: 100%; overflow: auto;
overflow: auto;
} }
.content { .content {
margin-left: 200px; margin-left: 200px;
padding: 1px 15px; padding: 1px 15px;
} }
.sidebarLinks a { .sidebarLinks a {
display: block; display: block;
text-align: center; text-align: center;
color: black; color: black;
font-size: 108%; font-size: 108%;
padding: 14px; padding: 14px;
margin-top: 4px; margin-top: 4px;
margin-bottom: 4px; margin-bottom: 4px;
text-decoration: none; text-decoration: none;
color: var(--bright-color); color: var(--bright-color);
transition: width 0.5s, height 0.5s, ease-in 0.5s; transition: width 0.5s, height 0.5s, ease-in 0.5s;
} }
.sidebarLinks a:hover { .sidebarLinks a:hover {
transition: width 0.5s, height 0.5s, ease-out 0.5s; transition: width 0.5s, height 0.5s, ease-out 0.5s;
} }
.sidebarLinks a.active { .sidebarLinks a.active {
border: 0.5px solid var(--text-color); border: 0.5px solid var(--text-color);
color: white; color: white;
text-shadow: 2px 2px 8px black; text-shadow: 2px 2px 8px black;
font-weight: bold; font-weight: bold;
} }
.sidebarLinks a:hover:not(.active) { .sidebarLinks a:hover:not(.active) {
background-color: var(--text-color); background-color: var(--text-color);
color: black; color: black;
font-weight: bold; font-weight: bold;
text-shadow: 2px 2px 8px black; text-shadow: 2px 2px 8px black;
transition: width 0.5s, height 0.5s, ease-out 0.5s; transition: width 0.5s, height 0.5s, ease-out 0.5s;
} }
.menuicon div { .menuicon div {
height: 5px; height: 5px;
background-color: var(--bright-color); background-color: var(--bright-color);
margin: 0px 0; margin: 0px 0;
display: none; display: none;
width: 30px; width: 30px;
} }
.sidebarheader { .sidebarheader {
font-size: 40px; font-size: 40px;
color: var(--bright-color); color: var(--bright-color);
display: flex; display: flex;
text-align: center; text-align: center;
} }
.headercontainer { .headercontainer {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
flex-wrap: nowrap; flex-wrap: nowrap;
position: relative;
overflow: hidden;
padding-top: 15px;
padding-bottom: 17px;
padding-right: 2px;
padding-left: 2px;
}
@media screen and (max-width: 700px) {
.sidebar {
width: 100%;
height: auto;
position: relative; position: relative;
} overflow: hidden;
.sidebar a { padding-top: 15px;
float: left; padding-bottom: 17px;
} padding-right: 2px;
div.content { padding-left: 2px;
margin-left: 0;
}
} }
@media screen and (max-width: 700px) { @media screen and (max-width: 700px) {
.menuicon div { .sidebar {
display: block; width: 100%;
margin: 6px 0; height: auto;
} position: relative;
}
.sidebar a { .sidebar a {
text-align: center; float: left;
float: none; }
}
.menuicon { div.content {
display: inline; margin-left: 0;
} }
}
.sidebaritemsconainer { @media screen and (max-width: 700px) {
display: inline; .menuicon div {
} display: block;
margin: 6px 0;
}
.sidebarheader { .sidebar a {
position: absolute; text-align: center;
left: 50%; float: none;
top: 50%; }
padding-top: 20px;
transform: translateX(-50%) translateY(-50%);
}
.codecontainer { .menuicon {
margin-left: 0px; display: inline;
margin-right: 0px; }
}
.sitedescription { .sidebaritemsconainer {
width: 100%; display: inline;
margin: 0 auto; }
}
.rtfmImage { .sidebarheader {
display: flex; position: absolute;
justify-content: center; left: 50%;
border: 2px solid white; top: 50%;
width: 100%; padding-top: 20px;
} transform: translateX(-50%) translateY(-50%);
}
.manualUsage { .codecontainer {
display: flex; margin-left: 0px;
flex-direction: column; margin-right: 0px;
} }
.sitedescription {
width: 100%;
margin: 0 auto;
}
.rtfmImage {
display: flex;
justify-content: center;
border: 2px solid white;
width: 100%;
}
.manualUsage {
display: flex;
flex-direction: column;
}
} }
.endofpage { .endofpage {
padding-bottom: 20px; padding-bottom: 20px;
} }
.questionContainer { .questionContainer {
margin: 10px; margin: 10px;
} }
.questionContainer:hover { .questionContainer:hover {
background-color: var(--hoover-color); background-color: var(--hoover-color);
} }
.question { .question {
word-wrap: break-word; word-wrap: break-word;
font-weight: bold; font-weight: bold;
font-size: 17px; font-size: 17px;
color: #ffffff; color: #ffffff;
} }
.answer { .answer {
word-wrap: break-word; word-wrap: break-word;
font-size: 15px; font-size: 15px;
} }
.data { .data {
word-wrap: break-word; word-wrap: break-word;
font-size: 13px; font-size: 13px;
color: #a1a1a1; color: #a1a1a1;
} }
.loadingindicator { .loadingindicator {
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
color: #fff;
color: #fff; font-size: 30px;
font-size: 30px;
} }
.link { .link {
margin: 10px; margin: 10px;
} }
.subjectSelector { .subjectSelector {
overflow: scroll; overflow: scroll;
height: 350px; height: 350px;
margin: 10px; margin: 10px;
} }
.subjItem { .subjItem {
font-size: 18px; font-size: 18px;
padding: 3px; padding: 3px;
cursor: pointer; cursor: pointer;
float: 1; float: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.activeSubjItem { .activeSubjItem {
background-color: var(--text-color); background-color: var(--text-color);
color: black; color: black;
} }
.subjItem:hover:not(.activeSubjItem) { .subjItem:hover:not(.activeSubjItem) {
background-color: #555; background-color: #555;
color: white; color: white;
} }
.rtfmImage { .rtfmImage {
justify-content: center; justify-content: center;
margin: 0px 10px; margin: 0px 10px;
} }
.warning { .warning {
color: red; color: red;
font-weight: 100; font-weight: 100;
font-size: 17.5px; font-size: 17.5px;
} }
#manualWarn { #manualWarn {
font-size: 14px; font-size: 14px;
} }
.manual_img { .manual_img {
padding: 20px 2px; padding: 20px 2px;
} }
.subtitle { .subtitle {
color: var(--text-color); color: var(--text-color);
font-size: 23px; font-size: 23px;
text-align: center; text-align: center;
font-weight: 100; font-weight: 100;
margin: 0px; margin: 0px;
padding-top: 8px; padding-top: 8px;
} }
.pageHeader { .pageHeader {
background-color: var(--text-color); background-color: var(--text-color);
height: 45px; height: 45px;
max-width: 100%; max-width: 100%;
color: black; color: black;
margin: 5px 0px 0px 0px; margin: 5px 0px 0px 0px;
} }
.pageHeader h1 { .pageHeader h1 {
padding-top: 6px; padding-top: 6px;
letter-spacing: 7px; letter-spacing: 7px;
text-align: center; text-align: center;
margin: 0px; margin: 0px;
} }
.manualUsage { .manualUsage {
margin-top: 5px; margin-top: 5px;
display: flex; display: flex;
} }
.manualBody { .manualBody {
text-align: justify; text-align: justify;
} }
select { select {
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;
max-width: 100%; max-width: 100%;
height: 30px; height: 30px;
} }
select:hover { select:hover {
border: 1px solid #F2CB05; border: 1px solid #F2CB05;
} }
.userStatus { .userStatus {
display: flex; display: flex;
margin-top: auto; margin-top: auto;
margin-bottom: 20px; margin-bottom: 20px;
background-color: #373737; background-color: #373737;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.msgs { .msgs {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.logout { .logout {
padding: 6px; padding: 6px;
margin-right: 7px; margin-right: 7px;
cursor: pointer; cursor: pointer;
font-size: 15.5px; font-size: 15.5px;
} }
.logout:hover { .logout:hover {
color: #fff; color: #fff;
} }
.msgs :first-child { .msgs :first-child {
font-size: 27px; font-size: 27px;
margin-left: 4px; margin-left: 4px;
} }
.msgs > div { .msgs > div {
padding: 2px 6px; padding: 2px 6px;
font-size: 13.5px; font-size: 13.5px;
} }
.actions { .actions {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.actions > span { .actions > span {
margin: 2px 2px; margin: 2px 2px;
padding: 0px 10px; padding: 0px 10px;
border: 1px solid #444; border: 1px solid #444;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
} }
.actions > span:hover { .actions > span:hover {
background-color: var(--hoover-color); background-color: var(--hoover-color);
} }

View file

@ -303,7 +303,7 @@ export default function Index({ globalData }) {
if (allQrSelector) { if (allQrSelector) {
return ( return (
<DbSelector <DbSelector
text={`Válaszd ki melyik adatbázist szeretnéd letölteni (${allQrSelector}):`} text={`Válaszd ki melyik adatbázist szeretnéd letölteni!`}
showAll={allQrSelector === 'txt'} showAll={allQrSelector === 'txt'}
closeClick={() => { closeClick={() => {
setAllQrSelector(null) setAllQrSelector(null)