Add initial daisy ui
Some checks failed
Build Crate / build (push) Failing after 1m45s

This commit is contained in:
2024-08-29 23:29:28 -04:00
parent 4cb809f20f
commit 82648cfbae
5 changed files with 23 additions and 9 deletions

View File

@@ -40,6 +40,8 @@ jobs:
run: npm install -g sass run: npm install -g sass
- name: Install tailwindcss via npm - name: Install tailwindcss via npm
run: npm install -D tailwindcss run: npm install -D tailwindcss
- name: Install daisy ui via npm
run: npm i -D daisyui@latest
- name: Compile css - name: Compile css
run: npm run build run: npm run build
# TODO -> Remove wasm-opt-version once perseus is updated # TODO -> Remove wasm-opt-version once perseus is updated

View File

@@ -16,11 +16,17 @@ Run `curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh`
https://nodejs.org/en https://nodejs.org/en
(todo look into:) (todo look into:)
https://pnpm.io/ https://pnpm.io/
`npm i -D daisyui@latest`
### Unix based systems: ### Unix based systems:
`sudo apt install nodejs` `sudo apt install nodejs`
`sudo apt install npm` `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 ## 3. Install Perseus, for real-time updates while developing

View File

@@ -11,6 +11,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"daisyui": "^4.12.10",
"tailwindcss": "^3.4.10" "tailwindcss": "^3.4.10"
} }
} }

View File

@@ -179,7 +179,7 @@ fn login_form_capsule<G: Html>(
}) })
button (on:click = handle_forgot_password, class="text-sm text-blue-700 hover:underline dark:text-blue-500"){"Lost Password?"} 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"){ 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"} button (on:click = handle_register, class="text-blue-700 hover:underline dark:text-blue-500"){"Create account"}
} }

View File

@@ -1,14 +1,19 @@
const { default: daisyui } = require("daisyui");
module.exports = { module.exports = {
purge: { purge: {
mode: "all", mode: "all",
content: [ content: [
"./src/**/*.rs", "./src/**/*.rs",
"./index.html", "./index.html",
"./src/**/*.html", "./src/**/*.html",
"./src/**/*.css", "./src/**/*.css",
], ],
}, },
theme: {}, theme: {},
variants: {}, variants: {},
plugins: [], plugins: [require("daisyui")],
daisyui: {
themes: ["light"],
},
}; };