all repos — website @ ee90cc479065abef3d17735b3b94bb0a888dcedb

personal website hosted at prithu.xyz, built using hugo

add theme selector to nav
Prithu Goswami prithugoswami524@gmail.com
Sun, 31 Jan 2021 08:55:35 +0530
commit

ee90cc479065abef3d17735b3b94bb0a888dcedb

parent

66f067a81f933698a7e7e3b577b86ea977274e52

2 files changed, 19 insertions(+), 7 deletions(-)

jump to
M layouts/partials/nav.htmllayouts/partials/nav.html

@@ -12,11 +12,11 @@ <!-- <div><a href="/projects">Projects</a></div> -->

<div><a href="/posts">Posts</a></div> <div><a href="/snippets">Snippets</a></div> <div><a href="https://git.prithu.xyz">Git</a></div> - <div> - <select id=theme> - <option value=light>Light</option> - <option value=dark>Dark</option> - </select> - </div> + </div> + <div class="nav-group"> + <select id=theme> + <option value=light>Light</option> + <option value=dark>Dark</option> + </select> </div> </nav>
M static/css/main.cssstatic/css/main.css

@@ -112,6 +112,10 @@ nav > *:first-child{

margin-left: 10%; } +nav > *:last-child{ + margin-right: 10%; +} + .nav-group { display: flex; align-items: center;

@@ -139,7 +143,15 @@ outline: none;

} nav option { - color: black; + color: var(--text-primary); + background: var(--bg); + outline: none; +} + +nav option:active, +nav option:focus { + outline: none; + border: none; }