(cx: Scope)
| 6 | const GITHUB_IMG: &'static str = wasm_or_else("github.svg", "public/github.svg"); |
| 7 | |
| 8 | pub fn App(cx: Scope) -> Element { |
| 9 | let mut count = use_state(cx, || 0); |
| 10 | let dioxus_hover = use_state(cx, || false); |
| 11 | let dioxus_hover_animation = || if **dioxus_hover { "animate-dioxus" } else { "" }; |
| 12 | let tailwind_hover = use_state(cx, || false); |
| 13 | let tailwind_hover_animation = || { |
| 14 | if **tailwind_hover { |
| 15 | "animate-tailwind" |
| 16 | } else { |
| 17 | "" |
| 18 | } |
| 19 | }; |
| 20 | |
| 21 | let rsx = rsx!( |
| 22 | div { |
| 23 | class: "flex flex-col h-screen items-center", |
| 24 | a { |
| 25 | class: "absolute right-0 p-8", |
| 26 | href: "https://github.com/lyonsyonii/dioxus-tailwindcss", |
| 27 | target: "_blank", |
| 28 | img { |
| 29 | class: "w-8 sm:w-16", |
| 30 | src: "{GITHUB_IMG}", |
| 31 | } |
| 32 | } |
| 33 | div { |
| 34 | class: "grid grid-cols-5 pb-16 px-8 sm:mt-60 mt-28 font-bold text-3xl sm:text-5xl gap-3", |
| 35 | a { |
| 36 | class: "col-span-2 place-self-end mr-4 sm:mr-6 {dioxus_hover_animation()}", |
| 37 | href: "https://dioxuslabs.com", |
| 38 | target: "_blank", |
| 39 | onmouseenter: move |_| dioxus_hover.set(true), |
| 40 | onanimationend: move |_| dioxus_hover.set(false), |
| 41 | img { |
| 42 | class: "h-28 sm:h-44 hover:drop-shadow-blue transition-shadow", |
| 43 | src: "{DIOXUS_IMG}", |
| 44 | }, |
| 45 | } |
| 46 | a { |
| 47 | class: "col-span-2 col-start-4 place-self-center {tailwind_hover_animation()}", |
| 48 | href: "https://tailwindcss.com", |
| 49 | target: "_blank", |
| 50 | onmouseenter: move |_| tailwind_hover.set(true), |
| 51 | onanimationend: move |_| tailwind_hover.set(false), |
| 52 | img { |
| 53 | class: "w-28 sm:w-44 hover:drop-shadow-blue transition-shadow", |
| 54 | src: "{TAILWIND_IMG}" |
| 55 | } |
| 56 | } |
| 57 | h1 { |
| 58 | class: "col-span-2 place-self-end", |
| 59 | "Dioxus" |
| 60 | }, |
| 61 | h1 { |
| 62 | class: "place-self-center", |
| 63 | "❤️" |
| 64 | }, |
| 65 | h1 { |
nothing calls this directly
no outgoing calls
no test coverage detected