diff --git a/Cargo.lock b/Cargo.lock index 9aabe523..ca34e2e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -991,6 +991,15 @@ dependencies = [ "yazi", ] +[[package]] +name = "dioxus_markdown" +version = "0.2.0" +source = "git+https://github.com/1vipulgupta/markdown.git?rev=8d99f3f0ccf6af8d43e4222907efdfbfa051a293#8d99f3f0ccf6af8d43e4222907efdfbfa051a293" +dependencies = [ + "dioxus", + "pulldown-cmark", +] + [[package]] name = "directories" version = "4.0.1" @@ -2178,15 +2187,6 @@ dependencies = [ "libc", ] -[[package]] -name = "markdown" -version = "0.2.0" -dependencies = [ - "dioxus", - "dioxus-desktop", - "pulldown-cmark", -] - [[package]] name = "markup5ever" version = "0.10.1" @@ -2300,10 +2300,10 @@ dependencies = [ "dioxus-router", "dioxus-signals", "dioxus-std", + "dioxus_markdown", "fermi", "http", "human-panic", - "markdown", "nix_health", "nix_rs", "regex", diff --git a/Cargo.toml b/Cargo.toml index 955391a3..27cd88e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,4 +61,4 @@ dioxus-signals = { git = "https://github.com/DioxusLabs/dioxus.git", rev = "6478 # https://github.com/DioxusLabs/dioxus-std/pull/17 dioxus-std = { git = "https://github.com/ealmloff/dioxus-std.git", branch="storage", features = ["storage"] } fermi = { git = "https://github.com/DioxusLabs/dioxus.git", rev = "c7963a03440d5a050bf229f91665d60a0d108a8a" } -dioxus_markdown = { git = "https://github.com/1vipulgupta/markdown.git", rev = "2942507f77216286904bc3a23a68bf10345367f0" } \ No newline at end of file +dioxus_markdown = { git = "https://github.com/1vipulgupta/markdown.git", rev = "8d99f3f0ccf6af8d43e4222907efdfbfa051a293" } \ No newline at end of file diff --git a/src/app/health.rs b/src/app/health.rs index d43339be..0558ab56 100644 --- a/src/app/health.rs +++ b/src/app/health.rs @@ -7,13 +7,9 @@ use crate::{app::state::AppState, app::widget::Loader}; pub fn renderMarkDown<'a>(cx: Scope<'a>, string: &'a str) -> Element<'a> { cx.render(rsx! { - link { - rel: "stylesheet", - href: "https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css", - } div { Markdown { - class: "content", + class: "prose", content: string, } } diff --git a/src/main.rs b/src/main.rs index 079d8d7d..a4483cac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,7 @@ async fn main() { dioxus_desktop::launch_cfg( app::App, dioxus_desktop::Config::new() - .with_custom_head(r#" "#.to_string()) + .with_custom_head(r#" "#.to_string()) .with_window( WindowBuilder::new() .with_title("Nix Browser") diff --git a/tailwind.config.js b/tailwind.config.js index 85a93f5e..0a2be0c9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -22,5 +22,7 @@ module.exports = { } } }, - plugins: [], + plugins: [ + require('@tailwindcss/typography'), + ], }