forked from planex/defiance
Add navbar and basic support for dark mode
This commit is contained in:
parent
842856bef9
commit
2f96ce98c2
2 changed files with 31 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<div>
|
||||
<nav>
|
||||
<nav id="nav">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}">
|
||||
<a id="nav-button" href="{{ .URL }}">
|
||||
{{ $text := print .Name | safeHTML }}
|
||||
{{ $text }}
|
||||
</a>
|
||||
|
|
|
@ -1,7 +1,31 @@
|
|||
/* Dark Mode */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #f9e6e1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Light Mode */
|
||||
@media (prefers-color-scheme: light) {
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
||||
/* Universal */
|
||||
body {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -19,10 +43,13 @@ footer {
|
|||
}
|
||||
|
||||
/* For header.html */
|
||||
#nav-button {
|
||||
#nav {
|
||||
background-color: #da644a;
|
||||
}
|
||||
|
||||
#nav-button {
|
||||
color: white;
|
||||
padding: 15px 25px;
|
||||
padding: 0px 25px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue