From c10aa967d1a2a979e6e42156a309d3f352f5cb93 Mon Sep 17 00:00:00 2001 From: yellows111 Date: Tue, 16 Apr 2024 22:50:07 +0100 Subject: [PATCH] 0.0.2 - "you like sausages?" added way to change the wiki name without hardcoding it * converted yiki.css to LF-only since i forgot i managed to save it as CR-LF oops - lowered the rate of gakking[1] in production AC: kind of expected this i made yiki in 4 hours lol [1]: --- README.md | 6 ++ compile.js | 6 +- package-lock.json | 2 +- package.json | 2 +- yiki.css | 138 +++++++++++++++++++++++----------------------- 5 files changed, 82 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 6484a56..78ec184 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,12 @@ Otherwise, if you just want to use `yiki` to render one file: `node compile source.md target.htm` +## Options + +`WIKINAME` Specify what the "A new yiki!" text should be replaced with. + +Example: `gmake WIKINAME="I love options!"` + ## Contributing I request (but not require) that you modify files without Carriage Returns, diff --git a/compile.js b/compile.js index a222ef9..ff31aad 100644 --- a/compile.js +++ b/compile.js @@ -40,8 +40,12 @@ function render(input, options) { } function format(data, name) { + var wikiName = "A new yiki!"; + if(process.env["WIKINAME"]) { + wikiName = process.env["WIKINAME"]; + } // probably should bring in a better templating engine but whatever - return (`\r\n${name} - Documentation
${data}`); + return (`\r\n${name} - Documentation
${data}`); } let content = render(Filesystem.readFileSync(Process.argv[2]).toString()); diff --git a/package-lock.json b/package-lock.json index 9b69e1e..03df5e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "yiki", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 1bb5d6b..5494536 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yiki", - "version": "0.0.1", + "version": "0.0.2", "description": "The yellows111 wiki system", "main": "compile.js", "scripts": { diff --git a/yiki.css b/yiki.css index 2ef03cb..8a94d95 100644 --- a/yiki.css +++ b/yiki.css @@ -1,69 +1,69 @@ -body { - font-family: sans-serif; - color: yellow; - background: black; -} -hr { - border: solid 2px yellow; -} - -a { - color: yellow; -} -a:visited { - text-decoration: underline magenta; -} -a:hover { - text-decoration: underline lime; -} -a:active { - text-decoration: underline aqua; -} - -nav { - font-size: 12pt; - font-family: monospace; -} - -.header-anchor { - color: gray; - text-decoration: none; -} -a.header-anchor:hover { - color: lightgray; -} - -@media (prefers-color-scheme: light) { - body { - color: black; - background: lightyellow; - } - hr { - border-color: black; - } - a { - color: black - } - a:visited { - text-decoration: underline purple; - } - a:hover { - text-decoration: underline green; - } - a:active { - text-decoration: underline teal; - } -} -@media only print { - body { - color: black; - background: white; - } - hr { - border-color: black; - } - a, a:visited { - color: black; - text-decoration: underline black; - } -} \ No newline at end of file +body { + font-family: sans-serif; + color: #ccc; + background: black; +} +hr { + border: solid 2px yellow; +} + +a { + color: yellow; +} +a:visited { + text-decoration: underline magenta; +} +a:hover { + text-decoration: underline lime; +} +a:active { + text-decoration: underline aqua; +} + +nav { + font-size: 12pt; + font-family: monospace; +} + +.header-anchor { + color: gray; + text-decoration: none; +} +a.header-anchor:hover { + color: lightgray; +} + +@media (prefers-color-scheme: light) { + body { + color: black; + background: lightyellow; + } + hr { + border-color: black; + } + a { + color: black + } + a:visited { + text-decoration: underline purple; + } + a:hover { + text-decoration: underline green; + } + a:active { + text-decoration: underline teal; + } +} +@media only print { + body { + color: black; + background: white; + } + hr { + border-color: black; + } + a, a:visited { + color: black; + text-decoration: underline black; + } +}