- Make Homepage redirect to Browse when logged out - Make Homepage redirect to Feed when logged in - Add a Browse button to nav, and expose a navigation modal when the browser is too narrow to show the full top bar navigation. This should change in the future, possibly to a left-side nav panel - Make Browse and Feed fill the full page width
42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
@use crate::extensions::ProfileExt;
|
|
@use crate::feed::ViewFeedState;
|
|
@use crate::nav::NavState;
|
|
@use crate::templates::layouts::wide;
|
|
@use hyaenidae_toolkit::templates::button_group;
|
|
@use hyaenidae_toolkit::{templates::{card, card_body, card_title}, Card};
|
|
@use hyaenidae_toolkit::templates::centered;
|
|
@use hyaenidae_toolkit::templates::{thumbnail, thumbnail_border, thumbnails};
|
|
|
|
@(state: &ViewFeedState, nav_state: &NavState)
|
|
|
|
@:wide("Feed", &format!("{}'s feed on Hyaenidae", state.profile.name()), nav_state, {}, {
|
|
@if state.has_submissions() {
|
|
@if state.has_nav() {
|
|
@:thumbnail_border({
|
|
@:button_group(&state.nav())
|
|
})
|
|
}
|
|
@:thumbnails({
|
|
@for view in state.submissions() {
|
|
@if let Some(thumb) = view.thumbnail() {
|
|
@:thumbnail(&thumb)
|
|
}
|
|
}
|
|
})
|
|
@if state.has_nav() {
|
|
@:thumbnail_border({
|
|
@:button_group(&state.nav())
|
|
})
|
|
}
|
|
} else {
|
|
@:centered(false, {
|
|
@:card(&Card::full_width().dark(nav_state.dark()), {
|
|
@:card_title({ There's nothing here })
|
|
@:card_body({
|
|
<p>Follow users on Hyaenidae to start seeing submissions in your feed</p>
|
|
})
|
|
})
|
|
})
|
|
}
|
|
})
|