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]: <https://dictionary.cambridge.org/dictionary/norwegian-english/gakking>
This commit is contained in:
parent
748a536ae2
commit
c10aa967d1
|
@ -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,
|
||||
|
|
|
@ -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 (`<!doctype html>\r\n<html><head<meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>${name} - Documentation</title><link rel="stylesheet" type="text/css" href="yiki.css"></head><body><nav><span>A new yiki!</span><span> | </span><a href="home.htm">home</a></nav><hr>${data}</body></html>`);
|
||||
return (`<!doctype html>\r\n<html><head<meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>${name} - Documentation</title><link rel="stylesheet" type="text/css" href="/yiki.css"></head><body><nav><span>${wikiName}</span><span> | </span><a href="/index.htm">home</a></nav><hr>${data}</body></html>`);
|
||||
}
|
||||
|
||||
let content = render(Filesystem.readFileSync(Process.argv[2]).toString());
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "yiki",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "yiki",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "The yellows111 wiki system",
|
||||
"main": "compile.js",
|
||||
"scripts": {
|
||||
|
|
138
yiki.css
138
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue