Added doc scrolling

This commit is contained in:
frikky
2020-05-22 12:56:36 +02:00
parent aef77d278a
commit 668557b52b
8 changed files with 127 additions and 13 deletions
+4 -1
View File
@@ -64,7 +64,7 @@ const Docs = (props) => {
if (parent !== null) {
var elements = parent.getElementsByTagName('h2')
const name = window.location.hash.slice(1, window.location.hash.lenth).toLowerCase().split("%20").join(" ")
const name = window.location.hash.slice(1, window.location.hash.lenth).toLowerCase().split("%20").join(" ").split("_").join(" ")
console.log(name)
var found = false
@@ -167,6 +167,9 @@ const Docs = (props) => {
}
function OuterLink(props) {
if (props.href.includes("http") || props.href.includes("mailto")) {
return <a href={props.href} style={{color: "#f85a3e", textDecoration: "none"}}>{props.children}</a>
}
return <Link to={props.href} style={{color: "#f85a3e", textDecoration: "none"}}>{props.children}</Link>
}