diff options
-rw-r--r-- | src/build.ts | 12 | ||||
-rw-r--r-- | src/static/favicon.ico | bin | 0 -> 1150 bytes | |||
-rw-r--r-- | src/static/style.css | 32 |
3 files changed, 39 insertions, 5 deletions
diff --git a/src/build.ts b/src/build.ts index b1d3bd8..9328c7d 100644 --- a/src/build.ts +++ b/src/build.ts @@ -25,14 +25,15 @@ const index = { <meta name="viewport" content="width=device-width, initial-scale=1"> <title>The Mana World Policies</title> <meta name="description" content="Active policies on The Mana World"> - <link rel="stylesheet" href="/style.css"> + <link rel="stylesheet" href="style.css"> <link rel="canonical" href="https://policies.themanaworld.org/"> </head> <body> +<main> <nav> <h1>TMW Policies</h1> <ul> -`.trim(), list: "", suffix: "</ul></nav>\n</body>\n</html>" +`.trim(), list: "", suffix: "</ul>\n</nav>\n</main>\n</body>\n</html>" }; // the _redirects file used by netlify @@ -86,20 +87,23 @@ for (const [file, props] of Object.entries(policies)) { <meta name="viewport" content="width=device-width, initial-scale=1"> <title>The Mana World – ${props.name}</title> <meta name="description" content="${props.description}"> - <link rel="stylesheet" href="/style.css"> + <link rel="stylesheet" href="../style.css"> <link rel="canonical" href="https://policies.themanaworld.org/${file}"> </head> <body> <article> ${html} </article> +<footer>Copyright © The Mana World — Generated on ${(new Date()).toISOString()}</footer> </body> </html> `.trim()); // create a subdirectory for it await Deno.mkdir(`build/${file}`, {recursive: true}); - await Deno.writeFile(`build/${file}/index.html`, policyPage, {create: true}); + await Deno.writeFile(`build/${file}/index.html`, policyPage, {create: true}); + await Deno.mkdir(`build/${file}/raw`, {recursive: true}); + await Deno.writeFile(`build/${file}/raw/index.html`, encoder.encode(html), {create: true}); } // write the index page diff --git a/src/static/favicon.ico b/src/static/favicon.ico Binary files differnew file mode 100644 index 0000000..606d878 --- /dev/null +++ b/src/static/favicon.ico diff --git a/src/static/style.css b/src/static/style.css index c0f1b2d..e989cca 100644 --- a/src/static/style.css +++ b/src/static/style.css @@ -1,3 +1,33 @@ body { - background: #eee; + background: #f1f1f1; + display: block; +} + +main, article { + background: #e1d6cf; + border-radius: 15px; + padding: 5px 15px; + color: #2c3e50; + max-width: 900px; + display: block; + margin: 0 auto; +} + +h1 { + font-weight: 700; + border-bottom: 1px solid #9f9894; + color: #393939; +} + +footer { + margin: 9px; + text-align: center; + opacity: 0.7; + font-size: 0.8rem; +} + +@media screen and (min-width: 30rem) { + body { + margin: 1rem 2rem; + } }
\ No newline at end of file |