diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index bdf7e78..2c85deb 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -40,6 +40,8 @@ jobs: run: npm install -g sass - name: Install tailwindcss via npm run: npm install -D tailwindcss + - name: Install daisy ui via npm + run: npm i -D daisyui@latest - name: Compile css run: npm run build # TODO -> Remove wasm-opt-version once perseus is updated diff --git a/README.md b/README.md index d894b8a..c1afbe0 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,17 @@ Run `curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh` https://nodejs.org/en (todo look into:) https://pnpm.io/ +`npm i -D daisyui@latest` ### Unix based systems: `sudo apt install nodejs` `sudo apt install npm` +`npm i -D daisyui@latest` + +For easy UI see: + +https://daisyui.com/components/button/ ## 3. Install Perseus, for real-time updates while developing diff --git a/package.json b/package.json index 6e9af84..b9a09b9 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "author": "", "license": "ISC", "devDependencies": { + "daisyui": "^4.12.10", "tailwindcss": "^3.4.10" } } diff --git a/src/capsules/login_form.rs b/src/capsules/login_form.rs index 8770d36..9c44fab 100644 --- a/src/capsules/login_form.rs +++ b/src/capsules/login_form.rs @@ -179,7 +179,7 @@ fn login_form_capsule( }) button (on:click = handle_forgot_password, class="text-sm text-blue-700 hover:underline dark:text-blue-500"){"Lost Password?"} } - button (on:click = handle_log_in, class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"){"Log in"} + button (on:click = handle_log_in, class="btn"){"Log in"} div (class="text-sm font-medium text-gray-500 dark:text-gray-300"){ button (on:click = handle_register, class="text-blue-700 hover:underline dark:text-blue-500"){"Create account"} } diff --git a/tailwind.config.js b/tailwind.config.js index 596829f..5d57aca 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,14 +1,19 @@ +const { default: daisyui } = require("daisyui"); + module.exports = { purge: { - mode: "all", - content: [ - "./src/**/*.rs", - "./index.html", - "./src/**/*.html", - "./src/**/*.css", - ], + mode: "all", + content: [ + "./src/**/*.rs", + "./index.html", + "./src/**/*.html", + "./src/**/*.css", + ], }, theme: {}, variants: {}, - plugins: [], + plugins: [require("daisyui")], + daisyui: { + themes: ["light"], + }, };