Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/data/site-data.jse
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
home_page_url: "https://notes.jim-nielsen.com"
feed_url: "https://notes.jim-nielsen.com/feed.json"
items: <md-to-data.jse>/
_headerHtml: `<script type="module" src="https://cdn.jim-nielsen.com/shared/jim-site-switcher-2.js"></script>
<div class="wrapper" style="position: relative; padding: 2.5rem 0; display: flex; align-items: center; gap: 1rem; justify-content: space-between;">
<a href="/" style="border: none"><img src="/favicon.ico" alt="Jim Nielsen’s Blog" width="36" height="36" style="border-radius: 50%;" /></a>
<jim-site-switcher subdomain="notes"></jim-site-switcher>
</div>`
}
1 change: 1 addition & 0 deletions src/routes/index.jse
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(site) => <templates/Page.jse.html>({
title: "Jim Nielsen’s Notes",
_headerHtml: site._headerHtml,
children: Tree.map(
site.items,
(item) => <templates/Note.jse.html>(item)
Expand Down
2 changes: 1 addition & 1 deletion src/site.jse
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// Private vars
(site) = <data/site-data.jse>
(site) = Tree.plain(<data/site-data.jse>)
(site_truncated) = {...site, items: Tree.take(site.items, 20) }

// Public files
Expand Down
13 changes: 2 additions & 11 deletions src/templates/Page.jse.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
<meta charset="UTF-8" />
<title>${_.title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script
type="module"
src="https://cdn.jim-nielsen.com/shared/jim-site-switcher.js"
></script>
<link rel="icon" href="/favicon.ico" />
<link
rel="alternate"
Expand All @@ -30,8 +26,8 @@
<link rel="stylesheet" href="/styles.css" />
</head>
<body>
<jim-site-switcher subdomain="notes"></jim-site-switcher>
<nav>
${_._headerHtml}
<nav class="nav">
<a href="#top" title="Jump to top" aria-label="Jump to top"
>${<svgs/icon-jump.svg>}</a
>
Expand All @@ -52,11 +48,6 @@
>${<svgs/icon-menu.svg>}</a
> -->
</nav>
<header>
<h1>Notes</h1>
<p>Quoting others & adding my 2¢ — a microblog.</p>
${<svgs/signature.svg>}
</header>
<main>${_.children}</main>
<footer>
Holy cow, you made it all the way to the bottom? Look at you 👏
Expand Down
14 changes: 7 additions & 7 deletions static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ body > footer {
color: var(--c-highlight);
}

nav {
.nav {
position: sticky;
top: 0;
left: 0;
Expand All @@ -176,7 +176,7 @@ nav:after {
body {
margin: 0 0 0 2rem;
}
nav {
.nav {
left: 2rem;
}
}*/
Expand All @@ -191,19 +191,19 @@ nav a {
background: var(--c-bg);
transition: 0.3s ease transform;
}
nav a:active {
.nav a:active {
transform: scale(0.9);
}
nav a:first-child {
.nav a:first-child {
z-index: 100;
}

[data-open-theme] nav > a:first-child svg,
nav a:hover svg {
[data-open-theme] .nav > a:first-child svg,
.nav a:hover svg {
fill: var(--c-highlight);
}

nav svg {
.nav svg {
fill: var(--c-text-secondary);
transition: 0.3s ease fill;
}