aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-11-27 15:53:02 +0800
committercrupest <crupest@outlook.com>2022-11-27 15:53:02 +0800
commitc4e083863e8476ca70d8b895beea5a172fcb7ecd (patch)
tree3de0178b97b26904126056f1010a202fda7a4124 /docker
parent79054b14574821a4ceb3c471a61080cb7808d171 (diff)
downloadcrupest-c4e083863e8476ca70d8b895beea5a172fcb7ecd.tar.gz
crupest-c4e083863e8476ca70d8b895beea5a172fcb7ecd.tar.bz2
crupest-c4e083863e8476ca70d8b895beea5a172fcb7ecd.zip
Enhance nginx config and www page.
Diffstat (limited to 'docker')
-rw-r--r--docker/crupest-nginx/sites/www/index.html8
-rw-r--r--docker/crupest-nginx/sites/www/src/main.js2
-rw-r--r--docker/crupest-nginx/sites/www/src/style.css8
-rw-r--r--docker/crupest-nginx/sites/www/vite.config.js6
4 files changed, 18 insertions, 6 deletions
diff --git a/docker/crupest-nginx/sites/www/index.html b/docker/crupest-nginx/sites/www/index.html
index 56089ac..31f3475 100644
--- a/docker/crupest-nginx/sites/www/index.html
+++ b/docker/crupest-nginx/sites/www/index.html
@@ -42,11 +42,11 @@
you build from start. I don't fully test it because I never migrate my data into other server so it might be kind
of buggy. However, it always takes some time to make it your own sites. But don't worry and feel free to contact
me if you run into any issue and I would be glad to help you out.</p>
+ <h2>TODOs of me:</h2>
+ <p id="todo-message">Fetching...</p>
+ <ul id="todo-container">
+ </ul>
</article>
- <h2>TODOs of me:</h2>
- <p id="todo-message">Fetching...</p>
- <ul id="todo-container">
- </ul>
<script type="module" src="/src/main.js"></script>
</body>
diff --git a/docker/crupest-nginx/sites/www/src/main.js b/docker/crupest-nginx/sites/www/src/main.js
index 111b0bd..13a85c3 100644
--- a/docker/crupest-nginx/sites/www/src/main.js
+++ b/docker/crupest-nginx/sites/www/src/main.js
@@ -21,7 +21,7 @@ document.addEventListener("DOMContentLoaded", async () => {
const todoContainer = document.getElementById("todo-container");
const res = await fetch("/api/todos");
- const body = res.json();
+ const body = await res.json();
if (res.status !== 200) {
todoMessage.style.color = "red";
diff --git a/docker/crupest-nginx/sites/www/src/style.css b/docker/crupest-nginx/sites/www/src/style.css
index 6021c6c..b632745 100644
--- a/docker/crupest-nginx/sites/www/src/style.css
+++ b/docker/crupest-nginx/sites/www/src/style.css
@@ -5,7 +5,13 @@ html {
body {
width: 100%;
margin: 0;
- padding: 0 2em;
+ box-sizing: border-box;
+}
+
+@media (min-width: 576px) {
+ #main-article {
+ padding: 0 2em;
+ }
}
#color-strip-container {
diff --git a/docker/crupest-nginx/sites/www/vite.config.js b/docker/crupest-nginx/sites/www/vite.config.js
new file mode 100644
index 0000000..1386040
--- /dev/null
+++ b/docker/crupest-nginx/sites/www/vite.config.js
@@ -0,0 +1,6 @@
+/** @type {import('vite').UserConfig} */
+export default {
+ build: {
+ sourcemap: true
+ }
+}