From f2a08f6005d70402bb0b23072a6083999ac9157b Mon Sep 17 00:00:00 2001 From: Jim Nielsen Date: Tue, 12 Apr 2022 20:48:45 -0600 Subject: [PATCH] feat: new theme (#38) --- src/client/404.html.tmpl.js | 24 +- src/client/about/index.html.tmpl.js | 140 +++-- src/client/archive/index.html.tmpl.js | 12 +- src/client/index.html.tmpl.js | 56 +- src/client/tags/index.html.tmpl.js | 12 +- .../tags/readingNotes/index.html.tmpl.js | 4 +- src/server/Layouts.js | 45 +- src/server/site-nav.js | 121 ++-- src/server/styles/base.css | 269 --------- src/server/styles/styles.css | 556 +++++++++++++----- 10 files changed, 613 insertions(+), 626 deletions(-) delete mode 100644 src/server/styles/base.css diff --git a/src/client/404.html.tmpl.js b/src/client/404.html.tmpl.js index 94510e93..6c0cde9f 100644 --- a/src/client/404.html.tmpl.js +++ b/src/client/404.html.tmpl.js @@ -3,13 +3,17 @@ import { html } from "../server/utils.js"; export default function Page404(site) { const title = "404: Page Not Found"; - return Page({ - site, - page: { - title, - path: "/404/", - layout: "Page", - contents: html` + return Page( + { + site, + page: { + title, + path: "/404/", + layout: "Page", + }, + }, + html` +

${title}

@@ -31,7 +35,7 @@ export default function Page404(site) { alt="Picture of a pie I made and posted on Instagram" />

- `, - }, - }); +
+ ` + ); } diff --git a/src/client/about/index.html.tmpl.js b/src/client/about/index.html.tmpl.js index 9480e205..aff48db7 100644 --- a/src/client/about/index.html.tmpl.js +++ b/src/client/about/index.html.tmpl.js @@ -1,4 +1,4 @@ -import { PageCustom } from "../../server/Layouts.js"; +import { Page } from "../../server/Layouts.js"; import { html } from "../../server/utils.js"; const page = { @@ -37,86 +37,84 @@ export default function About(site) { (domain) => site.outboundLinksByDomain[domain].length === 1 ); - return PageCustom( + return Page( { site, page }, - // prettier-ignorez - html`
-

About

+ html`

About

-

Hello, I’m Jim Nielsen.

+

Hello, I’m Jim Nielsen.

-

- In the past, I put off writing because I was unable to do my best—“if - you can’t do something right, don’t do it at all”. -

-

- But lately I’ve found myself regretting not writing down at least - something. -

+

+ In the past, I put off writing because I was unable to do my best—“if + you can’t do something right, don’t do it at all”. +

+

+ But lately I’ve found myself regretting not writing down at least + something. +

-

- So my current posture towards blogging is: something is better than - nothing. -

+

+ So my current posture towards blogging is: something is better than + nothing. +

-

- Portrait of Jim Nielsen -

+

+ Portrait of Jim Nielsen +

-

Blog Links

+

Blog Links

-

- I thought it would be interesting to - index all the outbound links on my blog - and keep it as a running list. -

+

+ I thought it would be interesting to + index all the outbound links on my blog + and keep it as a running list. +

- ${domainsOfMoreThanOne.map( - (domain) => html` -
- - Favicon for ${domain} - ${domain} - ${site.outboundLinksByDomain[domain].length} html` +
+ + Favicon for ${domain} + ${domain} + ${site.outboundLinksByDomain[domain].length} + +
    + ${site.outboundLinksByDomain[domain].map( + (link) => html`
  1. ${link}
  2. ` + )} +
+
+ ` + )} + +
+ ...all others with only one occurence +
    + ${domainsOfOnlyOne.map( + (d) => html` +
  1. + ${site.outboundLinksByDomain[d][0]} -
-
    - ${site.outboundLinksByDomain[domain].map( - (link) => html`
  1. ${link}
  2. ` - )} -
-
- ` - )} + + ` + )} + + -
- ...all others with only one occurence -
    - ${domainsOfOnlyOne.map( - (d) => html` -
  1. - ${site.outboundLinksByDomain[d][0]} -
  2. - ` - )} -
-
-