Add tailwind
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,4 @@
|
||||
/target
|
||||
|
||||
# Tailwind output file
|
||||
/assets/tailwind.css
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
[application]
|
||||
tailwind_input = "style/tailwind.css"
|
||||
|
||||
[web.app]
|
||||
title = "libretunes"
|
||||
|
||||
@@ -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,8 +21,11 @@ fn App() -> Element {
|
||||
#[component]
|
||||
fn Home() -> Element {
|
||||
rsx! {
|
||||
p {
|
||||
class: "text-lg",
|
||||
"Hello, world!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
3
style/tailwind.css
Normal file
3
style/tailwind.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@import "tailwindcss";
|
||||
@source not "*";
|
||||
@source "./src/**/*.{rs,html,css}";
|
||||
Reference in New Issue
Block a user