Skip to content

Commit a82c583

Browse files
committed
Upgraded to dx 0.6
1 parent fa3e031 commit a82c583

File tree

15 files changed

+23
-35
lines changed

15 files changed

+23
-35
lines changed

Cargo.lock

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ thiserror = "1.0.56"
1616
anyhow = "1.0.79"
1717
urlencoding = "2.1.3"
1818
include_dir = "0.7.3"
19-
pulldown-cmark = "0.9.3"
19+
pulldown-cmark = "0.13.0"
2020
web-sys = { version = "0.3.66", features = ["Window", "Document"] }
2121

2222
[dev-dependencies]

Dioxus.toml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,7 @@ watch_path = ["src", "public", "site_content"]
2727
# Include style or script assets
2828
[web.resource]
2929

30-
# CSS style file
31-
style = [
32-
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css",
33-
"https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/fontawesome.min.css",
34-
"https://fonts.googleapis.com/css?family=Montserrat:300,400,500,700",
35-
"/assets/css/font-awesome/css/font-awesome.min.css",
36-
"/assets/css/style.css",
37-
]
38-
39-
# Javascript code file
40-
script = [
41-
"https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js",
42-
]
30+
# style = ["assets/css/font-awesome/css/font-awesome.min.css"]
4331

4432
[web.resource.dev]
4533

src/app.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ pub fn app() -> Element {
99
info!("Initialized site with content: {site_content:#?}");
1010
use_context_provider(|| Signal::new(site_content));
1111
rsx! {
12+
document::Script { src: "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" }
13+
document::Stylesheet { href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" }
14+
document::Stylesheet { href: "https://fonts.googleapis.com/css?family=Montserrat:300,400,500,700" }
15+
document::Stylesheet { href: asset!("public/css/style.css") }
16+
document::Stylesheet { href: asset!("public/css/font-awesome/css/font-awesome.min.css") }
1217
Router::<Route> {}
1318
}
1419
}

src/components/gallery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub fn Gallery(max_cards: Option<usize>, gallery_type: GalleryType, show_title:
9696
div { class: "row",
9797
div { class: "card-group justify-content-left", {cards_rendered} }
9898
}
99-
99+
100100

101101
}
102102
}

src/components/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn Layout() -> Element {
1212
let route_split: Vec<&str> = route_str.split("/").collect();
1313
debug!("Got string split: {route_split:?}");
1414

15-
let title = if route_split[1] == "" {
15+
let title = if route_split[1].is_empty() {
1616
"Jordan Baxter".to_string()
1717
} else {
1818
format!("Jordan Baxter - {}", capitalize(route_split[1]))

src/components/nav_bar.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pub fn NavBar() -> Element {
2222
span { class: "navbar-toggler-icon" }
2323
}
2424
Link { class: "navbar-brand ms-2", to: Route::Home {}, "JORDAN BAXTER" }
25-
2625
}
2726
div { class: "navbar-collapse collapse",
2827
ul { class: "navbar-nav ms-auto",
@@ -46,7 +45,6 @@ pub fn NavBar() -> Element {
4645
}
4746

4847

49-
5048
}
5149
}
5250
}

src/markdown.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(non_snake_case)]
22

33
use dioxus::prelude::*;
4-
use pulldown_cmark::Parser;
4+
use pulldown_cmark::{Options, Parser};
55

66
#[derive(Props, Clone, PartialEq)]
77
pub struct MarkdownProps {
@@ -16,7 +16,7 @@ pub struct MarkdownProps {
1616
/// Render some text as markdown.
1717
pub fn Markdown(props: MarkdownProps) -> Element {
1818
let content = &*props.content.read();
19-
let parser = Parser::new(content);
19+
let parser = Parser::new_ext(content, Options::ENABLE_TABLES);
2020

2121
let mut html_buf = String::new();
2222
pulldown_cmark::html::push_html(&mut html_buf, parser);

src/pages/about.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn About() -> Element {
1717
class: "img-fluid",
1818
src: "/assets/img/about/headshot_cropped.jpg",
1919
}
20-
20+
2121
}
2222
}
2323
div { class: "row justify-content-center my-3",
@@ -26,7 +26,7 @@ pub fn About() -> Element {
2626
class: "content centered img-lg container",
2727
content: "{ABOUT_MD}",
2828
}
29-
29+
3030
}
3131
}
3232
}
@@ -42,7 +42,7 @@ fn AboutHeaderWrap() -> Element {
4242
div { class: "col-lg-6",
4343
h4 { "SO YOU'RE CURIOUS" }
4444
h1 { "ABOUT ME" }
45-
45+
4646
}
4747
}
4848
}

src/pages/contact.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ pub fn Contact() -> Element {
2020
margin_width: "0",
2121
"Loading…"
2222
}
23-
2423
}
25-
2624
}
2725
}
2826
}
@@ -37,7 +35,6 @@ fn ContactHeaderWrap() -> Element {
3735
div { class: "col-lg-6",
3836
h4 { "INTERESTED IN WORKING WITH ME?" }
3937
h1 { "LET'S GET IN TOUCH" }
40-
4138
}
4239
}
4340
}

0 commit comments

Comments
 (0)