-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
5 changed files
with
223 additions
and
152 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 |
---|---|---|
@@ -0,0 +1,173 @@ | ||
.top-bar { | ||
padding:0 1rem; | ||
margin:0 0 2rem; | ||
overflow-y: hidden; | ||
overflow-x: scroll; | ||
margin-bottom: 0; | ||
margin-top: 0; | ||
display: inline-flex; | ||
justify-content: space-between; | ||
gap: 5px; | ||
} | ||
|
||
.top-bar::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
||
nav.top-bar { | ||
position: sticky; | ||
top: 0px; | ||
} | ||
|
||
footer.top-bar { | ||
position: sticky; | ||
bottom: 0px; | ||
} | ||
|
||
footer > .top-bar-link:first-child { | ||
margin-left: unset; | ||
} | ||
|
||
footer > .top-bar-link:first-child { | ||
margin-left: unset; | ||
} | ||
|
||
.top-bar-link, | ||
.top-bar-title { | ||
color:#aaa; | ||
cursor:pointer; | ||
float:left; | ||
font-size:1rem; | ||
text-decoration:none; | ||
padding:1rem 0; | ||
} | ||
|
||
.top-bar-link.current-page, | ||
.top-bar-link.current-page:hover, | ||
.top-bar-title.current-page, | ||
.top-bar-title.current-page:hover { | ||
cursor:default; | ||
} | ||
|
||
.top-bar-link{ | ||
font-weight:200; | ||
margin-left:1rem; | ||
} | ||
|
||
.top-bar-link.current-page, | ||
.top-bar-link.current-page:hover, | ||
.top-bar-link:hover { | ||
color:#555; | ||
} | ||
|
||
.top-bar-title{ | ||
color:#555; | ||
font-weight:600; | ||
} | ||
|
||
.top-bar-right{ | ||
float:right; | ||
} | ||
|
||
.top-bar-link { | ||
color: var(--accent-foreground); | ||
font-weight: unset; | ||
} | ||
|
||
.top-bar-right, | ||
.top-bar-left { | ||
flex-shrink: 0; | ||
white-space: nowrap; | ||
max-width: 100%; | ||
} | ||
|
||
@media screen and (max-width: 106em) { | ||
.top-bar { | ||
backdrop-filter: contrast(100%) blur(10px); | ||
z-index: 1; /* float over interactive content below */ | ||
background-color: hsla(360, 100%, 100%, 0.75); | ||
transition: box-shadow 0.1s ease-in-out; | ||
|
||
&:hover { | ||
box-shadow: 0px 2px 10px 0px rgba(0,0,0, 0.2); | ||
transition: box-shadow 0.1s ease-in-out; | ||
} | ||
} | ||
|
||
.dark-mode:not(.light-mode) { | ||
& .top-bar { | ||
background-color: hsla(213, 22%, 10%, 0.75); | ||
} | ||
} | ||
} | ||
|
||
.dark-mode:not(.light-mode) { | ||
& .dark-icon { | ||
filter: invert(95%); | ||
} | ||
|
||
& .top-bar-title { | ||
color: #C7F026; | ||
} | ||
} | ||
|
||
@media print { | ||
.top-bar { | ||
position: inherit; | ||
top: inherit; | ||
bottom: inherit; | ||
} | ||
} | ||
|
||
.rounded-icon { | ||
border-radius: 3px; | ||
} | ||
|
||
@keyframes spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
|
||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
@keyframes spin-click { | ||
from { | ||
transform: rotate(360deg); | ||
} | ||
|
||
to { | ||
transform: rotate(540deg); | ||
} | ||
} | ||
|
||
@keyframes spin-reverse { | ||
from { | ||
transform: rotate(360deg); | ||
} | ||
|
||
to { | ||
transform: rotate(0deg); | ||
} | ||
} | ||
|
||
.light-dark-button { | ||
animation-name: spin-reverse; | ||
animation-duration: 0.2s; | ||
touch-action: manipulation; | ||
} | ||
|
||
.light-dark-button:hover { | ||
animation-name: spin; | ||
animation-duration: 0.2s; | ||
animation-fill-mode: forwards; | ||
} | ||
|
||
.light-dark-button:active { | ||
animation-name: spin-click; | ||
animation-duration: 0.2s; | ||
animation-fill-mode: both; | ||
} | ||
|
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,43 @@ | ||
import { html } from 'uhtml-isomorphic' | ||
|
||
export const topNavBar = () => { | ||
return html` | ||
<nav class="top-bar hide-print"> | ||
<span class="top-bar-left"> | ||
<a href="/" class="top-bar-title" title="home">bret.io</a> | ||
<a href="/cv/" class="top-bar-link" title="resume">cv</a> | ||
<a href="/blog/" class="top-bar-link" title="blog">blog</a> | ||
</span> | ||
<span class="top-bar-right"> | ||
<span class="top-bar-link" > | ||
<input class="dark-icon light-dark-button" onclick="window.toggleTheme()" height="14" width="14" type="image" alt="Toogle Theme" height="14" width="14" src="/globals/static/light-dark.svg"> | ||
<a id="neocities" href="https://neocities.org/site/bret"><img height="14" width="14" src="/globals/static/neocitieshead.svg"></a> | ||
<a rel="me" id="mastadon" href="https://fosstodon.org/@bcomnes"><img height="14" width="14" src="/globals/static/mastodon.svg"></a> | ||
<a rel="me" href="https://github.com/bcomnes" title="github"><img class="dark-icon" height="14" width="14" src="/globals/static/github.svg"></a> | ||
<a href="https://www.npmjs.com/~bret" title="node packaged modules"><img class="rounded-icon" height="14" width="14" src="/globals/static/npm.svg"></a> | ||
<a rel="me" id="bluesky" href="https://bsky.app/profile/bret.io"><img height="14" width="14" src="/globals/static/bsky.png"></a> | ||
<a rel="me" href="https://twitter.com/bcomnes" title="twitter: @bcomnes"><img class="rounded-icon" height="14" width="14" src="/globals/static/twtr.svg"></a> | ||
<a href="/feed.json"><img class="rounded-icon" height="14" width="14" src="/globals/static/jsonfeed.svg"></a> | ||
<a href="/feed.xml"><img height="14" width="14" src="/globals/static/atom.svg" ></a> | ||
</span> | ||
</span> | ||
</nav> | ||
` | ||
} | ||
|
||
export const bottomFotterBar = ({ | ||
githubRootUrl, | ||
page | ||
}) => { | ||
return html` | ||
<footer class="top-bar hide-print"> | ||
<span class="top-bar-left"> | ||
<a href="#" class="top-bar-link">© Bret Comnes</a> | ||
<a href="${`${githubRootUrl}${page.pageFile.relname}`}" class="top-bar-link" title="edit site on github">edit</a> | ||
</span> | ||
<span class="top-bar-right"> | ||
<a rel="me" href="mailto:[email protected]" class="top-bar-link" title="email">contact</a> | ||
</span> | ||
</footer> | ||
` | ||
} |
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
Oops, something went wrong.