-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
601 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,3 +176,7 @@ | |
flex-direction: column; | ||
} | ||
} | ||
|
||
.footer-link-active { | ||
color: var(--nav-button-hover) !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
.scroll-button-wrapper { | ||
position: fixed; | ||
bottom: 2rem; | ||
right: 2rem; | ||
z-index: 50; | ||
} | ||
|
||
.scroll-button { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.5rem; | ||
padding: 0.75rem 1.25rem; | ||
background: rgba(20, 20, 40, 0.8); | ||
border: 1px solid rgba(255, 255, 255, 0.1); | ||
border-radius: 9999px; | ||
color: var(--primary); | ||
font-family: var(--font-family); | ||
font-size: 0.875rem; | ||
cursor: pointer; | ||
transition: all 0.2s ease; | ||
backdrop-filter: blur(8px); | ||
} | ||
|
||
.scroll-button:hover { | ||
background: rgba(30, 30, 50, 0.9); | ||
border-color: rgba(255, 255, 255, 0.2); | ||
} | ||
|
||
.scroll-text { | ||
font-weight: 500; | ||
} | ||
|
||
.scroll-chevron { | ||
transform: translateY(1px); | ||
transition: transform 0.2s ease; | ||
} | ||
|
||
.scroll-button:hover .scroll-chevron { | ||
transform: translateY(2px); | ||
} | ||
|
||
.scroll-button::after { | ||
content: ''; | ||
position: absolute; | ||
inset: -1px; | ||
border-radius: 9999px; | ||
padding: 1px; | ||
background: linear-gradient(45deg, | ||
rgba(111, 63, 245, 0.4), | ||
rgba(111, 63, 245, 0) 50% | ||
); | ||
mask: linear-gradient(#fff 0 0) content-box, | ||
linear-gradient(#fff 0 0); | ||
-webkit-mask-composite: xor; | ||
mask-composite: exclude; | ||
opacity: 0; | ||
transition: opacity 0.2s ease; | ||
} | ||
|
||
.scroll-button:hover::after { | ||
opacity: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import './ScrollButton.css'; | ||
|
||
const ScrollButton = () => { | ||
const [isVisible, setIsVisible] = useState(false); | ||
|
||
useEffect(() => { | ||
const toggleVisibility = () => { | ||
const scrollHeight = document.documentElement.scrollHeight; | ||
const scrollPosition = window.innerHeight + window.pageYOffset; | ||
if (scrollHeight - scrollPosition > 100) { | ||
setIsVisible(true); | ||
} else { | ||
setIsVisible(false); | ||
} | ||
}; | ||
|
||
window.addEventListener('scroll', toggleVisibility); | ||
toggleVisibility(); | ||
|
||
return () => window.removeEventListener('scroll', toggleVisibility); | ||
}, []); | ||
|
||
const scrollToBottom = () => { | ||
window.scrollTo({ | ||
top: document.documentElement.scrollHeight, | ||
behavior: 'smooth' | ||
}); | ||
}; | ||
|
||
return isVisible ? ( | ||
<div className="scroll-button-wrapper"> | ||
<button onClick={scrollToBottom} className="scroll-button"> | ||
<span className="scroll-text">Scroll down</span> | ||
<svg | ||
className="scroll-chevron" | ||
width="12" | ||
height="12" | ||
viewBox="0 0 12 12" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M2 4L6 8L10 4" | ||
stroke="currentColor" | ||
strokeWidth="2" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
</button> | ||
</div> | ||
) : null; | ||
}; | ||
|
||
export default ScrollButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from 'react'; | ||
import './documentation.css'; | ||
|
||
const Section = ({ id, title, content }) => { | ||
const renderContent = (item, index) => { | ||
switch (item.type) { | ||
case 'text': | ||
return ( | ||
<p key={index} className="section-text"> | ||
{item.value.split('\n').map((text, i) => ( | ||
<React.Fragment key={i}> | ||
{text} | ||
{i < item.value.split('\n').length - 1 && <br />} | ||
</React.Fragment> | ||
))} | ||
</p> | ||
); | ||
case 'list': | ||
return ( | ||
<ul key={index} className="feature-list"> | ||
{item.items.map((listItem, i) => ( | ||
<li key={i}>• {listItem}</li> | ||
))} | ||
</ul> | ||
); | ||
case 'orderedList': | ||
return ( | ||
<ol key={index} className="setup-steps"> | ||
{item.items.map((listItem, i) => ( | ||
<li key={i}>{i + 1}. {listItem}</li> | ||
))} | ||
</ol> | ||
); | ||
default: | ||
return null; | ||
} | ||
}; | ||
|
||
return ( | ||
<section id={id} className="documentation-section"> | ||
<h2 className="section-title">• {title}</h2> | ||
{content.map((item, index) => renderContent(item, index))} | ||
</section> | ||
); | ||
}; | ||
|
||
export default Section; |
Oops, something went wrong.