summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-05-29 00:32:55 +0000
committergumi <git@gumi.ca>2020-05-29 00:32:55 +0000
commitd5e15e3d617652d3484b3d0ce882f31c86d4af7a (patch)
tree212380121a20800b20c694b007e15d1f6c216e55
parent378c608539d542df27c5fea00ea9b633f202ea7a (diff)
downloadpolicies-d5e15e3d617652d3484b3d0ce882f31c86d4af7a.tar.gz
policies-d5e15e3d617652d3484b3d0ce882f31c86d4af7a.tar.bz2
policies-d5e15e3d617652d3484b3d0ce882f31c86d4af7a.tar.xz
policies-d5e15e3d617652d3484b3d0ce882f31c86d4af7a.zip
is this any better?
-rw-r--r--src/build.ts12
-rw-r--r--src/static/favicon.icobin0 -> 1150 bytes
-rw-r--r--src/static/style.css32
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 &copy The Mana World &mdash; 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
new file mode 100644
index 0000000..606d878
--- /dev/null
+++ b/src/static/favicon.ico
Binary files differ
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