diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-06-18 23:35:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-06-18 23:35:49 +0900 |
| commit | ca6f5bafe72ba2f9b8ccbd6fe055d20fe590bf26 (patch) | |
| tree | 1ee41bb26e35b7f4d76a86fdd545d614419930c3 /nuldoc-src | |
| parent | 6b7fc3b5e2dc62e689dac2e06df6bd4957dec954 (diff) | |
| download | blog.nsfisis.dev-ca6f5bafe72ba2f9b8ccbd6fe055d20fe590bf26.tar.gz blog.nsfisis.dev-ca6f5bafe72ba2f9b8ccbd6fe055d20fe590bf26.tar.zst blog.nsfisis.dev-ca6f5bafe72ba2f9b8ccbd6fe055d20fe590bf26.zip | |
feat(content): add icon to /about page
Diffstat (limited to 'nuldoc-src')
| -rw-r--r-- | nuldoc-src/pages/about.ts | 16 | ||||
| -rw-r--r-- | nuldoc-src/renderers/html.ts | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/nuldoc-src/pages/about.ts b/nuldoc-src/pages/about.ts index 3306006..504d06f 100644 --- a/nuldoc-src/pages/about.ts +++ b/nuldoc-src/pages/about.ts @@ -1,6 +1,7 @@ import { globalFooter } from "../components/global_footer.ts"; import { globalHeader } from "../components/global_header.ts"; import { pageLayout } from "../components/page_layout.ts"; +import { staticScriptElement } from "../components/utils.ts"; import { Config } from "../config.ts"; import { el, text } from "../dom.ts"; import { Page } from "../page.ts"; @@ -32,6 +33,21 @@ export async function generateAboutPage( [["class", "post-title"]], text("nsfisis"), ), + el( + "div", + [["class", "my-icon"]], + await staticScriptElement("/p5.min.js", [], config), + await staticScriptElement("/my-icon.js", [], config), + el("div", [["id", "p5jsMyIcon"]]), + el( + "noscript", + [], + el( + "img", + [["src", "/favicon.svg"]], + ), + ), + ), ), el( "div", diff --git a/nuldoc-src/renderers/html.ts b/nuldoc-src/renderers/html.ts index e4261a3..e8743c5 100644 --- a/nuldoc-src/renderers/html.ts +++ b/nuldoc-src/renderers/html.ts @@ -61,6 +61,8 @@ function getDtd(name: string): Dtd { return { type: "block" }; case "html": return { type: "block" }; + case "img": + return { type: "block" }; case "li": return { type: "block" }; case "link": @@ -71,6 +73,8 @@ function getDtd(name: string): Dtd { return { type: "block", auto_closing: true }; case "nav": return { type: "block" }; + case "noscript": + return { type: "block" }; case "ol": return { type: "block" }; case "p": |
