Move fake link class

This commit is contained in:
Daniel Kluge 2022-07-30 17:49:29 +02:00
parent f188e94e0c
commit 7f81af2454
3 changed files with 13 additions and 12 deletions

View File

@ -79,8 +79,8 @@ const ProjectModal: NextPage = () => {
const nextPageSelector = (() => { const nextPageSelector = (() => {
if (!currentContent || currentContent?.type !== "diary" || currentContent.entries.length === 0) return null; if (!currentContent || currentContent?.type !== "diary" || currentContent.entries.length === 0) return null;
const prev = <span className={styles.leftSelectSpace}>{currentPage > 0 ? <a className={"fake-link"} onClick={() => setModalContent(currentContent, currentPage - 1)}>&lt; {currentPage - 1 > 0 ? currentContent.entries[currentPage - 2].title : "Main page"}</a> : null}</span>; const prev = <span className={styles.leftSelectSpace}>{currentPage > 0 ? <a className={styles.fakeLink} onClick={() => setModalContent(currentContent, currentPage - 1)}>&lt; {currentPage - 1 > 0 ? currentContent.entries[currentPage - 2].title : "Main page"}</a> : null}</span>;
const next = <span className={styles.rightSelectSpace}>{currentPage < currentContent.entries.length ? <a className={"fake-link"} onClick={() => setModalContent(currentContent, currentPage + 1)}>{currentContent.entries[currentPage].title} &gt;</a> : null}</span>; const next = <span className={styles.rightSelectSpace}>{currentPage < currentContent.entries.length ? <a className={styles.fakeLink} onClick={() => setModalContent(currentContent, currentPage + 1)}>{currentContent.entries[currentPage].title} &gt;</a> : null}</span>;
const select = ( const select = (
<select onChange={(e) => setModalContent(currentContent, Number.parseInt(e.target.value))} value={currentPage}> <select onChange={(e) => setModalContent(currentContent, Number.parseInt(e.target.value))} value={currentPage}>
@ -93,7 +93,7 @@ const ProjectModal: NextPage = () => {
})(); })();
return <div className={styles.modal}> return <div className={styles.modal}>
<a onClick={() => setVisible(false)} className={"fake-link"}> <a onClick={() => setVisible(false)} className={styles.fakeLink}>
<div className={styles.modalClose}><div className={styles.modalCloseAlign}>X</div></div> <div className={styles.modalClose}><div className={styles.modalCloseAlign}>X</div></div>
</a> </a>
<div className={styles.modalContainer}> <div className={styles.modalContainer}>

View File

@ -142,4 +142,14 @@
.pageSelector { .pageSelector {
display: block; display: block;
} }
}
.fakeLink {
color: var(--repl-color-link);
text-decoration: none;
cursor: pointer;
}
.fakeLink:hover {
text-decoration: underline;
} }

View File

@ -19,12 +19,3 @@ body {
color: var(--repl-color); color: var(--repl-color);
background: #000; background: #000;
} }
.fake-link {
color: var(--repl-color-link);
text-decoration: none;
cursor: pointer;
}
.fake-link:hover {
text-decoration: underline;
}