Skip to content

Commit c736765

Browse files
committed
Added ToS/Privacy to footer
Roadmap fixed scroll when popup
1 parent 979ad9b commit c736765

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

docusaurus.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ module.exports = {
127127
copyright: ${new Date().getFullYear()} Go Horse Studios.`,
128128
style: 'light',
129129
links: [
130+
{
131+
label: 'Terms of Service',
132+
href: 'https://gohorsestudios.com/tos',
133+
},
134+
{
135+
label: 'Privacy',
136+
href: 'https://gohorsestudios.com/privacy',
137+
},
130138
{
131139
label: 'Imprint',
132140
href: 'https://gohorsestudios.com/imprint',

src/pages/roadmap/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ const GetLabels = (labels) => (
6060
const Roadmap = () => {
6161
const [item, setItem] = useState([]);
6262

63+
const setPopupOpen = (open) => {
64+
document.getElementById("popup")?.classList.toggle(styles["popup-container-visible"], open);
65+
document.documentElement.classList.toggle('roadmap-popup-open', open);
66+
};
67+
6368
const Item = ({ title, image, video, description, labels, external_link, external_link_title }) => (
6469
<button key={title} className={clsx("item", styles.item)} onClick={function() {
65-
document.getElementById("popup").classList.add(styles["popup-container-visible"]);
70+
setPopupOpen(true);
6671
setItem({ title, image, video, description, labels, external_link, external_link_title });
6772
}}>
6873
{ image ? <ImageExternal path={image} /> : null }
@@ -94,7 +99,7 @@ const Roadmap = () => {
9499
<>
95100
<div id="popup" className={clsx("popup-container", styles["popup-container"])}>
96101
<button className={clsx("popup-background", styles["popup-background"])} onClick={ function() {
97-
document.getElementById("popup").classList.remove(styles["popup-container-visible"]);
102+
setPopupOpen(false);
98103
} }></button>
99104
<div className={clsx("popup-content", styles["popup-content"])}>
100105
{ item.image ? <ImageExternal className={clsx("popup-image", styles["popup-image"])} path={item.image} /> : null }
@@ -108,7 +113,7 @@ const Roadmap = () => {
108113
<span id="popup-labels" className={clsx("popup-labels", styles["popup-labels"])}>{ GetLabels(item.labels) }</span>
109114
</div>
110115
<button className={clsx("popup-close", styles["popup-close"])} onClick={ function() {
111-
document.getElementById("popup").classList.remove(styles["popup-container-visible"]);
116+
setPopupOpen(false);
112117
} }>x</button>
113118
</div>
114119
<Layout title="Roadmap" description="nanos world Roadmap">

src/pages/roadmap/styles.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ button {
88
outline: inherit;
99
}
1010

11+
:global(html.roadmap-popup-open) {
12+
overflow: hidden;
13+
}
14+
1115
.item-labels {
1216
display: flex;
1317
flex-wrap: wrap;
@@ -187,6 +191,7 @@ html[data-theme='light'] .label-text {
187191
box-sizing: border-box;
188192
justify-content: center;
189193
overflow: auto;
194+
overscroll-behavior: contain;
190195
background: rgba(15, 15, 15, 0.85);
191196
z-index: 20000;
192197
}

0 commit comments

Comments
 (0)