aboutsummaryrefslogtreecommitdiff
path: root/ui/src/components/node_list.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-02-27 14:40:15 +0100
committermetamuffin <metamuffin@disroot.org>2026-02-27 14:40:15 +0100
commitc05bfcc2775f0e11db6e856bfcf06d0419c35d54 (patch)
treeffd0e9fcf6b476a6198287085a514cfa7940c200 /ui/src/components/node_list.rs
parent4ba86694e393c61107e27c4127efc0455b329524 (diff)
downloadjellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar
jellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar.bz2
jellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar.zst
ui changed before object slices
Diffstat (limited to 'ui/src/components/node_list.rs')
-rw-r--r--ui/src/components/node_list.rs47
1 files changed, 0 insertions, 47 deletions
diff --git a/ui/src/components/node_list.rs b/ui/src/components/node_list.rs
deleted file mode 100644
index df405ea..0000000
--- a/ui/src/components/node_list.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- This file is part of jellything (https://codeberg.org/metamuffin/jellything)
- which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
- Copyright (C) 2026 metamuffin <metamuffin.org>
-*/
-
-use crate::{
- RenderInfo,
- components::node_card::{NodeCard, NodeCardHightlight, NodeCardWide},
-};
-use jellycommon::{jellyobject::Object, routes::u_items_cont, *};
-use jellyui_locale::tr;
-
-markup::define! {
- NodeList<'a>(ri: &'a RenderInfo<'a>, nl: Object<'a>) {
- @let ds = nl.get(NODELIST_DISPLAYSTYLE).unwrap_or(NLSTYLE_GRID);
- @if let Some(title) = nl.get(NODELIST_TITLE) {
- h2 { @tr(ri.lang, title) }
- }
- @match ds {
- NLSTYLE_GRID => {
- ul.nl.grid { @for nku in nl.iter(NODELIST_ITEM) {
- li { @NodeCard { ri, nku } }
- }}
- }
- NLSTYLE_INLINE => {
- ul.nl.inline { @for nku in nl.iter(NODELIST_ITEM) {
- li { @NodeCard { ri, nku } }
- }}
- }
- NLSTYLE_LIST => {
- ol.nl.list { @for nku in nl.iter(NODELIST_ITEM) {
- li { @NodeCardWide { ri, nku } }
- }}
- }
- NLSTYLE_HIGHLIGHT => {
- @if let Some(nku) = nl.get(NODELIST_ITEM) {
- @NodeCardHightlight { ri, nku }
- }
- }
- _ => {}
- }
- @if let Some(cont) = nl.get(NODELIST_CONTINUATION) {
- a[href=u_items_cont(cont)] { button { "Show more" } }
- }
- }
-}