Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianogtl committed Nov 8, 2023
1 parent 26dffe5 commit bec650e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GoLang</title>
<title>GoDocs</title>
<link rel="shortcut icon" href="logo.png" type="image/x-icon">
<link rel="stylesheet" href="style.css">

Expand Down
11 changes: 6 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ darkmodeBtn.addEventListener('click', () => {
})

function changeToDark(){
// Body and Nav section
body.classList.remove('light-mode')
body.classList.add('dark-mode')

nav.style.color = 'white'
nav.style.backgroundColor = 'black'
nav.style.borderColor = 'white'

// Nav Links
for (let i = 0, len = link.length; i < len; i++) {
link[i].style.color = 'white'
link[i].style.backgroundColor = 'black'
Expand All @@ -34,18 +35,18 @@ function changeToDark(){
}

function changeToLight(){
// Body and Nav section
body.classList.remove('dark-mode')
body.classList.add('light-mode')


nav.style.color = 'black'
nav.style.backgroundColor = 'white'
nav.style.borderColor = 'black'

for (let i = 0, len = link.length; i < len; i++) {
// Nav Links
for (let i = 0, len = link.length; i < len; i++) {
link[i].style.color = 'black'
link[i].style.backgroundColor = 'white'
link[i].style.borderColor = 'white'
link[i].style.borderColor = 'black'
}

// Dark mode button
Expand Down
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ a {
min-width: 300px;
max-height: 500px;
padding: 0px 10px;
margin-bottom: 3rem;
}

.nav-link {
Expand Down Expand Up @@ -143,10 +144,10 @@ pre {
position: sticky;
top: 0;
border-right: 2px solid black;
margin-bottom: 2rem;
}

.nav-link {
color: black;
font-size: 1.5rem;
}

Expand All @@ -157,5 +158,4 @@ pre {
pre {
margin-left: 2rem;
}

}
}

0 comments on commit bec650e

Please sign in to comment.