From 3046780f1b10a774e56ad6b7c0f4d9c255737667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20P=C5=82aczek?= Date: Thu, 18 Sep 2025 15:37:41 +0200 Subject: [PATCH] Improvements and docker --- Dockerfile | 20 + bin/build | 2 + bin/dev | 2 + bin/tailwindbuild | 2 + docker-compose.yml | 10 + download_posts.php | 16 +- index.html | 115 +++++- package-lock.json | 30 +- package.json | 5 +- src/chart.js | 34 ++ src/darkmodetoggle.js | 6 + src/generated.css | 844 +----------------------------------------- src/main.js | 157 +++++++- src/style.css | 1 + tailwind.config.js | 1 + 15 files changed, 356 insertions(+), 889 deletions(-) create mode 100644 Dockerfile create mode 100755 bin/build create mode 100755 bin/dev create mode 100755 bin/tailwindbuild create mode 100644 docker-compose.yml create mode 100644 src/chart.js create mode 100644 src/darkmodetoggle.js diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4e76ed2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM node:20 + +# Set working directory inside container +WORKDIR /src + +# Copy package files first (for better caching) +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of your project +COPY . . + +# Expose Vite’s default dev port +EXPOSE 5173 + +# Default command +CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"] + diff --git a/bin/build b/bin/build new file mode 100755 index 0000000..75e04d8 --- /dev/null +++ b/bin/build @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +docker compose run --rm node npm run build \ No newline at end of file diff --git a/bin/dev b/bin/dev new file mode 100755 index 0000000..0583458 --- /dev/null +++ b/bin/dev @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +docker compose run --rm node npm run dev -- --host 0.0.0.0 \ No newline at end of file diff --git a/bin/tailwindbuild b/bin/tailwindbuild new file mode 100755 index 0000000..5c5bdc9 --- /dev/null +++ b/bin/tailwindbuild @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +docker compose run --rm node npm run tailwind:build diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4ecafc4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + node: + build: . + working_dir: /src + volumes: + - .:/src + - /node_modules + ports: + - "5173:5173" + command: npm run dev -- --host 0.0.0.0 \ No newline at end of file diff --git a/download_posts.php b/download_posts.php index 7f3b7e4..f41abb9 100644 --- a/download_posts.php +++ b/download_posts.php @@ -1,9 +1,19 @@ - + @@ -10,9 +17,19 @@ } - + +
+ + + + + + + + +
@@ -21,7 +38,7 @@
- +
- +
- +
- +
+ - - - - - - - - + + + + + + + +
#UzytkownikTytułAutorWydawcaStronFormatOcena +
+ Użytkownik +
+
+
+
+ Tytuł +
+
+
+
+ Autor +
+
+
+
+ Wydawca +
+
+
+
+ Stron +
+
+
+
+ Format +
+
+
+
+ Ocena +
+
+
+
+ +
+
+
Link