Rework of page "contribute.js/todos.js" (part2), finishing up style changes across pages, minor fixes

This commit is contained in:
ndaniel1102 2021-04-20 21:35:41 +02:00
parent a91fa4a7fe
commit 88dd1f0cc6
17 changed files with 126 additions and 92 deletions

View file

@ -44,7 +44,7 @@ export default function FeedbackArea({ from }) {
placeholder={'Ide kezdhetsz el írni...'} placeholder={'Ide kezdhetsz el írni...'}
onChange={(event) => setFeedback(event.target.value)} onChange={(event) => setFeedback(event.target.value)}
value={feedback} value={feedback}
className={styles.feedback} className={styles.contactFeedback}
/> />
</center> </center>
<center> <center>

View file

@ -1,10 +1,10 @@
.feedback { .contactFeedback {
color: var(--text-color); color: var(--text-color);
background-color: var(--background-color); background-color: var(--background-color);
font-size: 14px; font-size: 14px;
width: 60% !important; width: 600px;
box-sizing: border-box; box-sizing: border-box;
height: 100px; height: 150px;
resize: none; resize: none;
margin-top: 15px; margin-top: 15px;
padding: 5px; padding: 5px;

View file

@ -3,20 +3,7 @@
padding: 4px; padding: 4px;
} }
.groupContainer { .todoButtons {
display: flex; height: 38px;
} text-wrap: normal;
.group {
padding: 8px 16px;
cursor: pointer;
user-select: none;
}
.group:hover {
background-color: #333;
}
.selectedGroup {
background-color: #444;
} }

View file

@ -11,6 +11,7 @@
.categoryName { .categoryName {
text-align: center; text-align: center;
margin-top: 85px !important;
margin: 5px 0px; margin: 5px 0px;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;

View file

@ -11,7 +11,7 @@ export default function TodoCard(props) {
<div <div
className={styles.card} className={styles.card}
style={{ style={{
border: `2px solid ${group || '#99f'}`, border: `1px solid ${categories[category].color || '#f2cb05'}`,
}} }}
onClick={() => { onClick={() => {
onClick(props.cardData) onClick(props.cardData)
@ -27,7 +27,7 @@ export default function TodoCard(props) {
backgroundColor: categories[category].color, backgroundColor: categories[category].color,
color: 'white', color: 'white',
borderRadius: '2px', borderRadius: '2px',
padding: '2px 4px', padding: '3px',
}} }}
> >
{categories[category].name} {categories[category].name}
@ -35,9 +35,9 @@ export default function TodoCard(props) {
</div> </div>
<div className={styles.numbers}> <div className={styles.numbers}>
<div className={`${voted && styles.voted}`}> <div className={`${voted && styles.voted}`}>
<div>{`Votes: ${votes.length}`}</div> <div>{`Szavazatok: ${votes.length}`}</div>
</div> </div>
<div>{points}</div> <div>{`Neh<EFBFBD>zs<EFBFBD>g: ${points}`}</div>
</div> </div>
</div> </div>
) )

View file

@ -1,12 +1,14 @@
.card { .card {
border-radius: 2px; border-radius: 5px;
padding: 5px; padding: 7px;
margin: 6px 3px; margin: 8px 4px;
cursor: pointer; cursor: pointer;
background-color: #171616;
} }
.voted { .voted {
color: #cf9; color: var(--text-color);
font-weight: 600;
} }
.card:hover { .card:hover {
@ -15,7 +17,7 @@
} }
.card > div { .card > div {
margin: 5px 0px; margin: 6px 4px;
} }
.description { .description {
@ -25,7 +27,7 @@
} }
.category { .category {
font-size: 10px; font-size: 12px;
white-space: nowrap; white-space: nowrap;
} }
@ -39,6 +41,6 @@
} }
.id { .id {
margin: 0px 3px; margin: 1px 6px 1px 1px;
color: #999; color: #999;
} }

View file

@ -14,7 +14,7 @@ export default function TodoRow(props) {
}} }}
className={styles.row} className={styles.row}
style={{ style={{
border: `2px solid ${group || '#99f'}`, border: `2px dashed ${categories[category].color || 'white'}`,
}} }}
> >
<div className={styles.id}>{`#${id}`}</div> <div className={styles.id}>{`#${id}`}</div>
@ -23,11 +23,11 @@ export default function TodoRow(props) {
<div <div
style={{ style={{
wordBreak: 'break-all', wordBreak: 'break-all',
fontSize: '10px', fontSize: '12px',
backgroundColor: categories[category].color, backgroundColor: categories[category].color,
color: 'white', color: 'white',
borderRadius: '2px', borderRadius: '2px',
padding: '0px 2px', padding: '3px',
}} }}
> >
{categories[category].name} {categories[category].name}
@ -35,7 +35,7 @@ export default function TodoRow(props) {
</div> </div>
<div <div
className={`${styles.votes} ${voted && styles.voted}`} className={`${styles.votes} ${voted && styles.voted}`}
>{`Votes: ${votes.length}`}</div> >{`Szavazatok: ${votes.length}`}</div>
</div> </div>
) )
} }

View file

@ -1,10 +1,9 @@
.row { .row {
display: flex; border-radius: 5px;
border: 2px solid #99f; padding: 7px;
border-radius: 2px; margin: 8px 4px;
padding: 5px;
margin: 6px 3px;
cursor: pointer; cursor: pointer;
background-color: #171616;
} }
.row:hover { .row:hover {
@ -13,12 +12,12 @@
} }
.row > div { .row > div {
margin: 0px 5px; margin: 6px 4px;
} }
.id { .id {
flex: 0 20px; flex: 0 20px;
margin: 0px 3px; margin: 1px 6px 1px 1px;
color: #999; color: #999;
} }
@ -30,10 +29,14 @@
} }
.votes { .votes {
display: flex;
justify-content: space-between;
font-size: 12px;
} }
.voted { .voted {
color: #cf9; color: var(--text-color);
font-weight: 600;
} }
.catName { .catName {

View file

@ -27,16 +27,16 @@ export default function Todos({
<div className={styles.container}> <div className={styles.container}>
<div className={styles.title}> <div className={styles.title}>
<span className={styles.id}>#{id}</span> <span className={styles.id}>#{id}</span>
<div className={styles.name}>{name}</div> <div className={'subtitle'} style={{ textAlign: 'left' }}>
{name}
</div>
<span <span
style={{ style={{
margin: '0px 5px',
fontSize: '10px',
backgroundColor: categories[category].color, backgroundColor: categories[category].color,
color: 'white', color: 'white',
fontSize: '12px',
borderRadius: '2px', borderRadius: '2px',
padding: '2px 4px', padding: '3px',
whiteSpace: 'nowrap',
}} }}
> >
{categories[category].name} {categories[category].name}
@ -45,7 +45,7 @@ export default function Todos({
<hr /> <hr />
{group && ( {group && (
<div className={styles.row}> <div className={styles.row}>
<div>Csoport:</div> <div style={{ color: group }}>Csoport:</div>
<div style={{ color: group }}> <div style={{ color: group }}>
{namedGroups[group] ? namedGroups[group].name : group} {namedGroups[group] ? namedGroups[group].name : group}
</div> </div>
@ -64,16 +64,25 @@ export default function Todos({
<div>{votes.length}</div> <div>{votes.length}</div>
</div> </div>
{gitlink && ( {gitlink && (
<div className={styles.row}> <center>
<a href={gitlink} target={'_blank'} rel={'noreferrer'}> <div>
Git link <a
</a> href={gitlink}
</div> style={{ textDecoration: 'none' }}
target={'_blank'}
rel={'noreferrer'}
>
Git link
</a>
</div>
</center>
)} )}
<hr /> <hr />
{description && ( {description && (
<> <>
<div className={styles.title}>Leírás</div> <div className={'subtitle'} style={{ textAlign: 'left' }}>
Leírás
</div>
<div <div
className={styles.description} className={styles.description}
dangerouslySetInnerHTML={{ __html: description }} dangerouslySetInnerHTML={{ __html: description }}
@ -81,17 +90,21 @@ export default function Todos({
<hr /> <hr />
</> </>
)} )}
<div className={styles.category}></div> <div className={styles.category} />
{voteable && ( {voteable && (
<div <center>
className={`${styles.button} ${votes.includes(userId) && <div className={'buttonContainer'} style={{ width: '40%' }}>
styles.voted}`} <div
onClick={() => { className={`${styles.button} ${votes.includes(userId) &&
voteOn(card) styles.voted}`}
}} onClick={() => {
> voteOn(card)
{votes.includes(userId) ? 'Szavazat visszavonása' : 'Szavazás'} }}
</div> >
{votes.includes(userId) ? 'Szavazat visszavonása' : 'Szavazás'}
</div>
</div>
</center>
)} )}
</div> </div>
) )

View file

@ -28,14 +28,14 @@
} }
.id { .id {
font-size: 16px; font-size: 20px;
margin: 0px 3px; margin: 0px 3px;
color: #999; color: #999;
} }
.description { .description {
overflow-x: hidden; overflow-x: auto;
overflow-y: scroll; overflow-y: auto;
max-height: calc(38vh); max-height: calc(38vh);
margin: 5px; margin: 5px;
} }
@ -43,6 +43,7 @@
.row { .row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 2px 10px;
} }
.button { .button {

View file

@ -11,6 +11,8 @@
.container { .container {
flex-direction: column; flex-direction: column;
margin-top: 30px;
margin-bottom: 50px;
} }
.title { .title {

View file

@ -95,13 +95,14 @@ export default function Todos() {
const sg = namedGroups[selectedGroup] const sg = namedGroups[selectedGroup]
return ( return (
<> <>
<div className={styles.groupContainer}> <div className={'buttonContainer'}>
{groups.map((group) => { {groups.map((group) => {
const namedGroup = namedGroups[group] const namedGroup = namedGroups[group]
return ( return (
<div <div
className={`${styles.group} ${group === selectedGroup && className={`${'buttonContainer'}, ${
styles.selectedGroup}`} styles.todoButtons
} ${group === selectedGroup && 'activeButton'}`}
key={group} key={group}
onClick={() => { onClick={() => {
setSelectedGroup(group) setSelectedGroup(group)
@ -112,8 +113,9 @@ export default function Todos() {
) )
})} })}
<div <div
className={`${styles.group} ${'uncat' === selectedGroup && className={`${'buttonContainer'}, ${
styles.selectedGroup}`} styles.todoButtons
} ${'uncat' === selectedGroup && 'activeButton'}`}
onClick={() => { onClick={() => {
setSelectedGroup('uncat') setSelectedGroup('uncat')
}} }}
@ -121,7 +123,8 @@ export default function Todos() {
{'Kategorizálatlan'} {'Kategorizálatlan'}
</div> </div>
<div <div
className={styles.group} className={`${'buttonContainer'}, ${styles.todoButtons} ${null ===
selectedGroup && 'activeButton'}`}
onClick={() => { onClick={() => {
setSelectedGroup(null) setSelectedGroup(null)
}} }}

View file

@ -1,6 +1,6 @@
{ {
"siteUrl": "https://qmining.frylabs.net/", "siteUrl": "https://qmining.frylabs.net/",
"apiUrl": "https://api.frylabs.net/", "apiUrl": "https://qmining.frylabs.net/",
"mobileWindowWidth": 700, "mobileWindowWidth": 700,
"maxQuestionsToRender": 250 "maxQuestionsToRender": 250
} }

View file

@ -381,7 +381,7 @@ input:focus {
background-color: var(--hoover-color); background-color: var(--hoover-color);
border: none; border: none;
color: var(--text-color); color: var(--text-color);
padding: 5px 10px; padding: 5px 15px;
font-weight: bold; font-weight: bold;
font-size: 15px; font-size: 15px;
margin: 8px 5px 2px 5px; margin: 8px 5px 2px 5px;

View file

@ -43,8 +43,8 @@ export default function Contact() {
<div> <div>
<div className={'subtitle'}>Üzenet küldése</div> <div className={'subtitle'}>Üzenet küldése</div>
<div className={styles.text}> <div className={styles.text}>
Weboldalon keresztüli üzenetküldés az adminnak (feedback). Válasz bal Weboldalon keresztüli üzenetküldés az adminnak (feedback). A válasz a
alsó levelesládába (📬) érkezik majd. bal alsó postaládába (📬 ikon) fog érkezni.
</div> </div>
</div> </div>
<FeedbackArea from={'contact'} /> <FeedbackArea from={'contact'} />

View file

@ -14,7 +14,7 @@ export default function contribute() {
const [showFeedback, setShowFeedback] = useState(false) const [showFeedback, setShowFeedback] = useState(false)
return ( return (
<div> <div className={'endofpage'}>
<Head> <Head>
<title>Todos - Qmining | Frylabs.net</title> <title>Todos - Qmining | Frylabs.net</title>
</Head> </Head>
@ -29,8 +29,8 @@ export default function contribute() {
</p> </p>
<p> <p>
Emellet ha hozzáértő vagy, adott feladatok megvalósításában is Emellet ha hozzáértő vagy, adott feladatok megvalósításában is
segíthetsz. (lásd: lentebb) segíthetsz. (lásd: <a href="#gitrepo">lentebb</a>)
<br /> Ha egy kártyára kattintasz, a megjelenő abalkban láthatod annak <br /> Ha egy kártyára kattintasz, a megjelenő ablakban láthatod annak
részleteit, illetve{' '} részleteit, illetve{' '}
<b> <b>
<i>szavazhatsz</i> <i>szavazhatsz</i>
@ -54,29 +54,39 @@ export default function contribute() {
</div> </div>
</div> </div>
</center> </center>
<br />
<hr /> <hr />
<Todos /> <Todos />
<hr /> <hr />
<div className={styles.title}>Git repos</div> <div className={'subtitle'}>
<hr /> <b>Git repos</b>
<hr /> </div>
<div className={styles.repos}> <div className={styles.repos} style={{ float: 'left' }} id={'gitrepo'}>
{Object.keys(repos.repos).map((key) => { {Object.keys(repos.repos).map((key) => {
let repo = repos.repos[key] let repo = repos.repos[key]
return ( return (
<a key={key} href={repo.href}> <div>
{repo.description} <ul>
</a> <li>
<a key={key} href={repo.href}>
{repo.description}
</a>
</li>
</ul>
</div>
) )
})} })}
<hr />
</div> </div>
<div style={{ textAlign: 'center' }}> <div
style={{ float: 'left' }}
style={{ textAlign: 'right', marginRight: '100px', marginTop: '25px' }}
>
<img <img
style={{ maxWidth: '100%', width: '400px' }} style={{ maxWidth: '100%', width: '320px' }}
src={`${constants.siteUrl}img/bug.png`} src={`${constants.siteUrl}img/bug.png`}
/> />
</div> </div>
<hr />
{showFeedback && ( {showFeedback && (
<Modal <Modal
closeClick={() => { closeClick={() => {

View file

@ -11,10 +11,22 @@
text-align: center; text-align: center;
} }
.repos {
margin-top: 6%;
margin-left: 10%;
}
.repos a { .repos a {
margin: 0px 5px; margin: 0px 5px;
text-decoration: none;
} }
.newTaskButton { .newTaskButton {
width: 40%; width: 25%;
}
.imgContainer {
float: right;
text-align: right;
padding-right: 50px;
} }