cut out a number of changes from the hr PR (#2580)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-07-02 17:09:57 -07:00
1 parent 9bf46968cd
commit b30810e486
12 files changed
+89 -18

No files matched your search

+4 -2
View File
@@ -4,8 +4,8 @@ macro_rules! twoway {
// doc attrs
$( #[doc = $doc:expr] )*
$name:ident,
)*
$name:ident
),*
) => {
$(
$( #[doc = $doc] )*
@@ -51,4 +51,6 @@ twoway![
letsome,
fat_exprs,
nested,
staged,
misplaced
];
@@ -38,5 +38,9 @@ rsx! {
// todo some work in here
class: "hello world"
}
div {
div {}
}
}
}
+5 -1
View File
@@ -12,7 +12,11 @@ pub(crate) fn Nav() -> Element {
let mut sidebar = SHOW_SIDEBAR.write();
*sidebar = !*sidebar;
},
MaterialIcon { name: "menu", size: 24, color: MaterialIconColor::Dark }
MaterialIcon {
name: "menu",
size: 24,
color: MaterialIconColor::Dark
}
}
div { class: "flex z-50 md:flex-1 px-2", LinkList {} }
@@ -0,0 +1,35 @@
pub(crate) fn Nav() -> Element {
rsx! {
SearchModal {}
header {
class: "sticky top-0 z-30 bg-white dark:text-gray-200 dark:bg-ideblack border-b dark:border-stone-700 h-16 bg-opacity-80 backdrop-blur-sm",
class: if HIGHLIGHT_NAV_LAYOUT() { "border border-orange-600 rounded-md" },
div { class: "lg:py-2 px-2 max-w-screen-2xl mx-auto flex items-center justify-between text-sm leading-6 h-16",
button {
class: "bg-gray-100 rounded-lg p-2 mr-4 lg:hidden my-3 h-10 flex items-center text-lg z-[100]",
class: if !SHOW_DOCS_NAV() { "hidden" },
onclick: move |_| {
let mut sidebar = SHOW_SIDEBAR.write();
*sidebar = !*sidebar;
},
MaterialIcon {
name: "menu",
size: 24,
color: MaterialIconColor::Dark
}
}
div { class: "flex z-50 md:flex-1 px-2", LinkList {} }
}
}
}
}
#[component]
fn SidebarSection(chapter: &'static SummaryItem<BookRoute>) -> Element {
let link = chapter.maybe_link()?;
let sections = link.nested_items.iter().map(|chapter| {
rsx! {
SidebarChapter { chapter }
}
});
}
+26
View File
@@ -0,0 +1,26 @@
rsx! {
div {}
div { "hi" }
div { class: "helo", "hi" }
div { class: "helo", glass: "123", "hi" }
div { {some_expr} }
div {
{
POSTS.iter().enumerate().map(|(id, post)| rsx! {
BlogPostItem { post, id }
})
}
}
div { class: "123123123123123123123123123123123123",
{some_really_long_expr_some_really_long_expr_some_really_long_expr_some_really_long_expr_}
}
div { class: "-my-8 divide-y-2 divide-gray-100",
{POSTS.iter().enumerate().map(|(id, post)| rsx! { BlogPostItem { post: post, id: id } })}
}
}