Skip to content

Commit

Permalink
Re-organize website
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Dec 2, 2023
1 parent 05f51f2 commit 3dd952b
Show file tree
Hide file tree
Showing 104 changed files with 889 additions and 739 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/neocities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master

env:
node-version: lts/*
node-version: 21
FORCE_COLOR: 2

concurrency: # prevent concurrent deploys doing starnge things
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [lts/*]
node-version: [21]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"tape": "^5.0.0",
"top-bar.css": "^3.0.0",
"top-bun": "^7.0.0",
"uhtml-isomorphic": "^2.1.0",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"uhtml-isomorphic": "^2.1.0"
},
"engines": {
"node": ">=16.0.0",
Expand Down
392 changes: 0 additions & 392 deletions src/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions src/about.md

This file was deleted.

7 changes: 7 additions & 0 deletions src/about/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# About

This is [Bret Comnes](https://bret.io)' personal website built with the follwowing tools:

```json
{{{ vars.pkg }}}
```
11 changes: 11 additions & 0 deletions src/about/page.vars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { readFile } from 'node:fs/promises'
import { join } from 'node:path'
const __dirname = import.meta.dirname

export default async () => {
const pkg = await readFile(join(__dirname, '../../package.json'))

return {
pkg
}
}
2 changes: 1 addition & 1 deletion src/blog/2023/page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @template T
* @typedef {import('@siteup/cli').PageFunction<T>} PageFunction
* @typedef {import('top-bun').PageFunction<T>} PageFunction
*/

export const vars = {
Expand Down
24 changes: 24 additions & 0 deletions src/blog/2023/reorganized/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: article
title: "Reorganized"
publishDate: "2023-12-02T20:49:41.713Z"
---

Behold, a mildly redesigned and reorganized landing page:

![screenshot of the new website](./img/screenshot.png)

It's still not great, but it should make it easier to keep it up to date going forward.

It has 3 sections:

- [Featured Projects](/#): important projects of note.
- [Recent Posts](/#recent-posts ): now that this site has proper blog support, I can highlight recent posts on the landing page.
- [Open Source](/#open-source): interesting and notable projects that have found some use and that I still maintain. This section now includes a bunch of open source work from the past year that I've never had time to write about.
- [Past projects](/#past-projects): inactive projects that are not longer active, but still interesting enough to share.

I removed a bunch of older inactive projects and links and stashed them in a [project](/projects/previous-projects/).

Additionally, the edit button in the page footer now takes you to the correct page in GitHub for editing, so if you ever see a typo, feel free to send in a fix!

Finally, the [about](/about/) page includes a live dump of the dependencies that were used to build the website.
3 changes: 3 additions & 0 deletions src/blog/2023/reorganized/img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/blog/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { dirname, basename } from 'node:path'

/**
* @template T
* @typedef {import('@siteup/cli').PageFunction<T>} PageFunction
* @typedef {import('top-bun').PageFunction<T>} PageFunction
*/

export const vars = {
Expand Down
19 changes: 0 additions & 19 deletions src/booklist.md

This file was deleted.

15 changes: 15 additions & 0 deletions src/components/blog-index-list/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.blog-index-list {
padding-left: 0px;

& .blog-entry {
width: 100%;
display: inline-flex;
justify-content: space-between;
}
& .blog-entry-link {}
& .blog-entry-date {
color: var(--accent-foreground);
font-family: var(--font-code);
flex-shrink: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ li.objc::before {
color: #6866fb;
}

li.cpp::before {
color: #f34b7d;
}

li.docker::before {
color: #384d54;
}
Expand Down
2 changes: 1 addition & 1 deletion src/feeds.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import jsonfeedToAtom from 'jsonfeed-to-atom'

/**
* @template T
* @typedef {import('@siteup/cli').TemplateAsyncIterator<T>} TemplateAsyncIterator
* @typedef {import('top-bun').TemplateAsyncIterator<T>} TemplateAsyncIterator
*/

/** @type {TemplateAsyncIterator<{
Expand Down
4 changes: 2 additions & 2 deletions src/globals/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ footer > .top-bar-link:first-child {
margin-left: unset;
}

@media screen and (max-width: 72em) {
@media screen and (max-width: 106em) {
footer.top-bar {
position: inherit;
top: inherit;
bottom: inherit;
}
}

@media screen and (max-width: 78em) {
@media screen and (max-width: 106em) {
nav.top-bar {
backdrop-filter: contrast(100%) blur(10px);
z-index: 1; /* float over interactive content below */
Expand Down
3 changes: 2 additions & 1 deletion src/globals/global.vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default async function globalVars () {
authorName: 'Bret Comnes',
authorUrl: 'https://bret.io',
authorImgUrl: '/favicons/apple-touch-icon-1024x1024.png',
authorImgAlt: 'Picture of author'
authorImgAlt: 'Picture of author',
githubRootUrl: 'https://github.com/bcomnes/bret.io/blob/master/src/'
}
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
45 changes: 0 additions & 45 deletions src/jobs/landrover.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/jobs/page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @template T
* @typedef {import('@siteup/cli').PageFunction<T>} PageFunction
* @typedef {import('top-bun').PageFunction<T>} PageFunction
*/

export const vars = {
Expand Down
1 change: 0 additions & 1 deletion src/jobs/psu.md

This file was deleted.

11 changes: 0 additions & 11 deletions src/jobs/zhealth.md

This file was deleted.

6 changes: 3 additions & 3 deletions src/layouts/article.layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export default function articleLayout (args) {
<header class="article-header">
<h1 class="p-name article-title" itemprop="headline">${vars.title}</h1>
<div class="metadata">
<address class="author-info" itemprop="author" itemscope itemtype="http://schema.org/Person">
<address class="author-info p-author h-card" itemprop="author" itemscope itemtype="http://schema.org/Person">
${vars.authorImgUrl
? html`<img height="40" width="40" src="${vars.authorImgUrl}" alt="${vars.authorImgAlt}" class="u-photo" itemprop="image">`
: null
}
${vars.authorName && vars.authorUrl
? html`
<a href="${vars.authorUrl}" class="p-author h-card" itemprop="url">
<span itemprop="name">${vars.authorName}</span>
<a href="${vars.authorUrl}" class="u-url" itemprop="url">
<span itemprop="p-name name">${vars.authorName}</span>
</a>`
: null
}
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/blog-auto-index.layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { dirname } from 'node:path'

/**
* @template T
* @typedef {import('@siteup/cli').LayoutFunction<T>} LayoutFunction
* @typedef {import('top-bun').LayoutFunction<T>} LayoutFunction
*/

/**
Expand Down
19 changes: 1 addition & 18 deletions src/layouts/blog-index.layout.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
@import '../components/breadcrumb/index.css';


.blog-index-list {
padding-left: 0px;

& .blog-entry {
width: 100%;
display: inline-flex;
justify-content: space-between;
}
& .blog-entry-link {}
& .blog-entry-date {
color: var(--accent-foreground);
font-family: var(--font-code);
flex-shrink: 0;
}
}

@import '../components/blog-index-list/index.css';
2 changes: 1 addition & 1 deletion src/layouts/blog-index.layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { breadcrumb } from '../components/breadcrumb/index.js'

/**
* @template T
* @typedef {import('@siteup/cli').LayoutFunction<T>} LayoutFunction
* @typedef {import('top-bun').LayoutFunction<T>} LayoutFunction
*/

/**
Expand Down
30 changes: 17 additions & 13 deletions src/layouts/root.layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { html } from 'uhtml-isomorphic'

/**
* @template T
* @typedef {import('@siteup/cli').LayoutFunction<T>} LayoutFunction
* @typedef {import('top-bun').LayoutFunction<T>} LayoutFunction
*/

/**
* @typedef {{
* title: string,
* siteName: string,
* githubRootUrl: string,
* [key: string]: any
* }} RootLayoutVars
*/
Expand All @@ -17,11 +18,14 @@ import { html } from 'uhtml-isomorphic'
export default async function rootLayout ({
vars: {
title,
siteName
siteName,
githubRootUrl
},
scripts,
styles,
children
children,
page
/* pages */
}) {
return html`
<!DOCTYPE html>
Expand Down Expand Up @@ -79,15 +83,15 @@ export default async function rootLayout ({
<a href="https://hifiwi.fi" class="top-bar-link" title="HifiWi.fi">hifiwi.fi</a>
<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="/static/light-dark.svg">
<a id="neocities" href="https://neocities.org/site/bret"><img height="14" width="14" src="/static/neocitieshead.svg"></a>
<a rel="me" id="mastadon" href="https://fosstodon.org/@bcomnes"><img height="14" width="14" src="/static/mastodon.svg"></a>
<a rel="me" href="https://github.com/bcomnes" title="github"><img class="dark-icon" height="14" width="14" src="/static/github.svg"></a>
<a href="https://npmjs.com/~bret" title="node packaged modules"><img class="rounded-icon" height="14" width="14" src="/static/npm.svg"></a>
<a rel="me" id="bluesky" href="https://bsky.app/profile/bret.io"><img height="14" width="14" src="/static/bsky.png"></a>
<a rel="me" href="https://twitter.com/bcomnes" title="twitter: @bcomnes"><img class="rounded-icon" height="14" width="14" src="/static/twtr.svg"></a>
<a href="/feed.json"><img class="rounded-icon" height="14" width="14" src="/static/jsonfeed.svg"></a>
<a href="/feed.xml"><img height="14" width="14" src="/static/atom.svg" ></a>
<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://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>
Expand All @@ -96,7 +100,7 @@ export default async function rootLayout ({
</main>
<footer class="top-bar hide-print">
<a href="#" class="top-bar-link">© Bret Comnes</a>
<a href="https://github.com/bcomnes/bret.io/tree/master/src" class="top-bar-link" title="edit site on github">edit</a>
<a href="${`${githubRootUrl}${page.pageFile.relname}`}" class="top-bar-link" title="edit site on github">edit</a>
<span class="top-bar-right hide-print">
<a rel="me" href="mailto:[email protected]" class="top-bar-link" title="email">contact</a>
</span>
Expand Down
Loading

0 comments on commit 3dd952b

Please sign in to comment.