diff --git a/deno.jsonc b/deno.jsonc index 808b876..f99b7d0 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,4 +1,11 @@ { + "tasks": { + "copy-static": "cp -r static/* build/", + "build": { + "command": "deno run -RWN main.ts", + "dependencies": ["copy-static"], + }, + }, "fmt": { "indentWidth": 4, }, diff --git a/main.ts b/main.ts index a7d1343..32b9b90 100644 --- a/main.ts +++ b/main.ts @@ -117,7 +117,9 @@ function renderIndex(articles: ArticleInfo[]): string { ${article.author} - ${new Date(article.dateAdded).toUTCString()} + ${ + new Date(article.dateAdded).toUTCString() + } ${( article.tags.map((tag) => ` diff --git a/static/articles/style.css b/static/articles/style.css new file mode 100644 index 0000000..10476b5 --- /dev/null +++ b/static/articles/style.css @@ -0,0 +1,25 @@ +:root { + color-scheme: light dark; +} + +body { + margin: 0 auto; + padding: 2rem; + line-height: 1.6em; +} + +body.index { + max-width: 1400px; +} + +body.article { + max-width: 1000px; +} + +table { + border-collapse: collapse; +} + +td.article-date { + white-space: nowrap; +} diff --git a/templates/article.html b/templates/article.html index 534b0be..c5db0e5 100644 --- a/templates/article.html +++ b/templates/article.html @@ -5,28 +5,13 @@ - + - +
Mirror website of - PROLETARIANREVOLTION.NET + PROLETARIANREVOLUTION.NET