From 32a9276cb3d4e3a103151a1e35110ba82b39fb2e Mon Sep 17 00:00:00 2001 From: osmarks Date: Thu, 21 Nov 2024 12:02:34 +0000 Subject: [PATCH] rework navbar palette --- src/global.json | 10 ++++++++-- src/index.js | 10 ++++++++-- src/style.sass | 7 +++---- templates/index.pug | 14 +++++++++++--- templates/layout.pug | 16 ++++++++-------- templates/remoteFeedEntry.pug | 4 ++-- 6 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/global.json b/src/global.json index b1b5a3c..4f35d18 100644 --- a/src/global.json +++ b/src/global.json @@ -43,9 +43,15 @@ "Construction Physics": "https://www.construction-physics.com/feed", "Factorio": "https://www.factorio.com/blog/rss", "The Eldraeverse": "https://eldraeverse.com/feed/", - "STH Newsletter Archive Feed": "https://us13.campaign-archive.com/feed?u=45c4ca50425f376ea593dcd22&id=c344a80940", + "ServeTheHome": "https://www.servethehome.com/feed/", "Graphcore Research": "https://graphcore-research.github.io/feed.xml", - "ToughSF": "https://toughsf.blogspot.com/rss.xml" + "ToughSF": "https://toughsf.blogspot.com/rss.xml", + "Fernando Borretti": "https://borretti.me/feed.xml", + "Cameron Harwick": "https://cameronharwick.com/feed/", + "Money Stuff": "https://www.bloomberg.com/opinion/authors/ARbTQlRLRjE/matthew-s-levine.rss", + "The Worlds of John Bierce": "https://johnbierce.com/blog/feed/", + "Dominic Cummings": "https://dominiccummings.substack.com/feed" + }, "dateFormat": "YYYY-MM-DD", "microblogSource": "https://b.osmarks.net/outbox", diff --git a/src/index.js b/src/index.js index abbcf11..d0e9951 100644 --- a/src/index.js +++ b/src/index.js @@ -385,7 +385,7 @@ const fetchMicroblog = async () => { }) } - globalData.microblog = globalData.microblog.slice(0, 6).map((post, i) => minifyHTML(globalData.templates.activitypub({ + globalData.microblog = globalData.microblog.slice(0, 8).map((post, i) => minifyHTML(globalData.templates.activitypub({ ...globalData, permalink: post.object.id, date: dayjs(post.object.published), @@ -418,10 +418,16 @@ const fetchFeeds = async () => { writeCache("feeds", globalData.openring) } + const otherBlogURLs = [] + for (const [name, feed] of Object.entries(globalData.openring)) { + otherBlogURLs.push([name, feed.link]) + } + globalData.otherBlogURLs = R.fromPairs(R.sortBy(x => x[0].toLowerCase(), otherBlogURLs)) const entries = [] for (const [name, feed] of Object.entries(globalData.openring)) { for (const entry of feed.entries) { entry.feed = feed + entry.feedName = name } const entry = feed.entries[0] entry.published = Date.parse(entry.published) @@ -436,7 +442,7 @@ const fetchFeeds = async () => { } entries.sort((a, b) => b.published - a.published) - globalData.openring = entries.slice(0, 6).map((post, i) => minifyHTML(globalData.templates.remoteFeedEntry({ + globalData.openring = entries.slice(0, 8).map((post, i) => minifyHTML(globalData.templates.remoteFeedEntry({ ...globalData, ...post, i diff --git a/src/style.sass b/src/style.sass index 1c6505e..3dc9054 100644 --- a/src/style.sass +++ b/src/style.sass @@ -85,10 +85,6 @@ nav a, img, picture margin-right: 0.5em - @for $i from 1 through 6 - a:nth-child(#{$i + 1}) - color: hsl(120 + ($i * 30), 100%, 80%) - h1, h2, h3, h4, h5, h6 margin: 0 font-weight: 600 @@ -235,6 +231,9 @@ blockquote display: block .sidenotes-container display: block + table + display: block + overflow-x: scroll @media (min-width: calc(4 * $content-margin + $content-width + $sidenotes-width + $navbar-width)) // fullwidth 3-pane layout diff --git a/templates/index.pug b/templates/index.pug index d71a557..da62b80 100644 --- a/templates/index.pug +++ b/templates/index.pug @@ -37,15 +37,23 @@ block content span.description!= experiment.description p Get updates to the blog (not experiments) in your favourite RSS reader using the RSS feed. - p View some of my projects at + p View some of my projects at a(href=`https://git.${domain}/`) my git hosting. - h2.section-header Other Blogs + h2.section-header Other blogs + + details + summary View list + ul + each url, name in otherBlogURLs + li + a(href=url)= name + div.ring each entry in openring != entry - + iframe(src="https://george.gh0.pw/embed.cgi?gollark", style="border:none;width:100%;height:50px", title="Acquiesce to GEORGE.") block under-title diff --git a/templates/layout.pug b/templates/layout.pug index 1a86fb0..143a047 100644 --- a/templates/layout.pug +++ b/templates/layout.pug @@ -1,5 +1,5 @@ -mixin nav-item(url, name) - a(href=url)= name + " " +mixin nav-item(url, name, color) + a(href=url, style=`color: ${color}`)= name + " " mixin image(src) if typeof src === "string" @@ -40,12 +40,12 @@ html(lang="en") a.logocont(href="/") img.logo(src="/assets/images/logo256.png", alt="osmarks.net logo") .logotext osmarks - +nav-item(`/me/`, "About Me") - +nav-item(`https://mse.${domain}/`, "Meme Search") - +nav-item(`https://docs.${domain}/random`, "Documentation") - +nav-item(`https://b.${domain}`, "Microblog") - +nav-item(`https://status.${domain}`, "Status") - +nav-item(`https://r.${domain}/login`, "Login") + +nav-item(`/me/`, "About Me", "#5AF2F2") + +nav-item(`https://b.${domain}`, "Microblog", "#F25AF2") + +nav-item(`https://mse.${domain}/`, "Meme Search", "#5AF25A") + +nav-item(`https://docs.${domain}/random`, "Documentation", "#F2A65A") + +nav-item(`https://status.${domain}`, "Status", "#EEDC5B") + +nav-item(`https://r.${domain}/login`, "Login", "#12E193") block nav-items .sidenotes-container main(class=!haveSidenotes ? "fullwidth" : "") diff --git a/templates/remoteFeedEntry.pug b/templates/remoteFeedEntry.pug index f0a697e..75dae6c 100644 --- a/templates/remoteFeedEntry.pug +++ b/templates/remoteFeedEntry.pug @@ -3,5 +3,5 @@ div.autocol(style=hashBG("remoteFeedEntry", i, 30)) a.title(href=link)= title div.deemph span=`${renderDate(published)} / ` - a(href=feed.link)= feed.title - div!= description \ No newline at end of file + a(href=feed.link)= feedName + div!= description