Add tailwind

This commit is contained in:
2026-06-10 21:11:27 -04:00
parent 23d1733e10
commit d31547406e
4 changed files with 14 additions and 1 deletions

3
.gitignore vendored
View File

@@ -1 +1,4 @@
/target
# Tailwind output file
/assets/tailwind.css

View File

@@ -1,4 +1,5 @@
[application]
tailwind_input = "style/tailwind.css"
[web.app]
title = "libretunes"

View File

@@ -1,5 +1,7 @@
use dioxus::prelude::*;
const TAILWIND_CSS: Asset = asset!("/assets/tailwind.css");
#[derive(Debug, Clone, Routable, PartialEq)]
#[rustfmt::skip]
enum Route {
@@ -10,6 +12,7 @@ enum Route {
#[component]
fn App() -> Element {
rsx! {
document::Link { rel: "stylesheet", href: TAILWIND_CSS }
Router::<Route> {}
}
}
@@ -18,9 +21,12 @@ fn App() -> Element {
#[component]
fn Home() -> Element {
rsx! {
p {
class: "text-lg",
"Hello, world!"
}
}
}
fn main() {
dioxus::launch(App);

3
style/tailwind.css Normal file
View File

@@ -0,0 +1,3 @@
@import "tailwindcss";
@source not "*";
@source "./src/**/*.{rs,html,css}";