From 1081f005aac88a86b2bd81f002f01489efc2fe4c Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 22 Oct 2023 11:28:37 +0200 Subject: [PATCH 1/4] moved template partials to partials folder --- tools/tailwind.config.js | 2 +- web/pages/admin/controller.php | 4 ++-- web/pages/register/controller.php | 6 +++--- web/templates/{ => partials}/error.html | 0 web/templates/{ => partials}/info.html | 0 web/templates/{ => partials}/notice.html | 0 web/templates/{ => partials}/success.html | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename web/templates/{ => partials}/error.html (100%) rename web/templates/{ => partials}/info.html (100%) rename web/templates/{ => partials}/notice.html (100%) rename web/templates/{ => partials}/success.html (100%) diff --git a/tools/tailwind.config.js b/tools/tailwind.config.js index 1439f21..46a6910 100644 --- a/tools/tailwind.config.js +++ b/tools/tailwind.config.js @@ -1,6 +1,6 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["../web/**/*.{html,js}"], + content: ["../web/**/*.{html,js,php}"], theme: { extend: {}, }, diff --git a/web/pages/admin/controller.php b/web/pages/admin/controller.php index 7ce84b4..17acbf6 100644 --- a/web/pages/admin/controller.php +++ b/web/pages/admin/controller.php @@ -62,12 +62,12 @@ class Admin extends Page { catch(Exception $e) { $this->set('message', $e->getMessage()); - $this->set('template', '/templates/error.html'); + $this->set('template', '/templates/partials/error.html'); return; } $this->set('message', 'Speichern erfolgreich'); - $this->set('template', '/templates/success.html'); + $this->set('template', '/templates/partials/success.html'); } function maySeeThisPage(){return true;} diff --git a/web/pages/register/controller.php b/web/pages/register/controller.php index 0fef50e..8168262 100644 --- a/web/pages/register/controller.php +++ b/web/pages/register/controller.php @@ -34,7 +34,7 @@ class Register extends Page { if($err) { - $this->set('template', '/templates/error.html'); + $this->set('template', '/templates/partials/error.html'); $this->set('title', 'Error'); $this->set('message', $err); return; @@ -51,7 +51,7 @@ class Register extends Page { } catch(Exception $e) { - $this->set('template', '/templates/error.html'); + $this->set('template', '/templates/partials/error.html'); $this->set('title', 'Error'); $this->set('message', $e->getMessage()); return; @@ -65,7 +65,7 @@ class Register extends Page { function success() { - $this->set('template', '/templates/success.html'); + $this->set('template', '/templates/partials/success.html'); $this->set('title', 'Success'); $this->set('message', 'You have successfully registered. Activate your account from the Link in your email'); } diff --git a/web/templates/error.html b/web/templates/partials/error.html similarity index 100% rename from web/templates/error.html rename to web/templates/partials/error.html diff --git a/web/templates/info.html b/web/templates/partials/info.html similarity index 100% rename from web/templates/info.html rename to web/templates/partials/info.html diff --git a/web/templates/notice.html b/web/templates/partials/notice.html similarity index 100% rename from web/templates/notice.html rename to web/templates/partials/notice.html diff --git a/web/templates/success.html b/web/templates/partials/success.html similarity index 100% rename from web/templates/success.html rename to web/templates/partials/success.html From 885d7fb777e6db510da4a87cf39de6be3b7d395a Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 22 Oct 2023 12:11:09 +0200 Subject: [PATCH 2/4] better link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 945cc4d..b2342df 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ https://gitea.haschek.at/Crispi/dogstats ## Techstack - [HTMX](https://htmx.org/docs/) -- [Tailwind](https://tailwindcss.com/docs/utility-first) +- [Tailwind](https://flowbite.com/docs/components/) ## Start Dev From 657b0ac020cfe241235e7b048963b8f16687b808 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 22 Oct 2023 12:12:11 +0200 Subject: [PATCH 3/4] windows info --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b2342df..8eac73d 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,13 @@ Erst Tailwind starten 1. `cd tools` 2. `./tailwindcss-linux-x64 -i ../web/css/input.css -o ../web/css/output.css --watch` +### Windows + +Erst Tailwind starten + +1. `cd tools` +2. `tailwindcss-windows-x64.exe -i ../web/css/input.css -o ../web/css/output.css --watch` + In zweitem Terminal dann Webserver starten 1. `cd web` From 1e688838c4cc14ab8c1536da6e4e80f8b69c369c Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 22 Oct 2023 14:20:59 +0200 Subject: [PATCH 4/4] added vscode settings --- .vscode/settings.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b1e5775 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "html.format.indentInnerHtml": true, + "html.format.wrapLineLength": 0 +} \ No newline at end of file