1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
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::{
node_page::{NodeUdata, aspect_class},
scaffold::RenderInfo,
};
use jellycommon::*;
markup::define! {
NodeCard<'a>(ri: &'a RenderInfo<'a>, nodeu: NodeUdata<'a>) {
@let cls = format!("node card poster {}", aspect_class(nodeu.node.get(NO_KIND).unwrap_or(KIND_COLLECTION)));
div[class=cls] {
// .poster {
// a[href=u_node_slug(&node.slug)] {
// img[src=u_node_image(&node.slug, PictureSlot::Cover, 512), loading="lazy"];
// }
// .cardhover.item {
// @if node.media.is_some() {
// a.play.icon[href=u_node_slug_player(&node.slug)] { "play_arrow" }
// }
// @Props { node, udata, full: false, lang }
// }
// }
// div.title {
// a[href=u_node_slug(&node.slug)] {
// @node.title
// }
// }
// div.subtitle {
// span {
// @node.subtitle
// }
// }
}
}
NodeCardWide<'a>(ri: &'a RenderInfo<'a>, nodeu: NodeUdata<'a>) {
div[class="node card widecard poster"] {
// div[class=&format!("poster {}", aspect_class(node.kind))] {
// a[href=u_node_slug(&node.slug)] {
// img[src=u_node_image(&node.slug, PictureSlot::Cover, 512), loading="lazy"];
// }
// .cardhover.item {
// @if node.media.is_some() {
// a.play.icon[href=u_node_slug_player(&node.slug)] { "play_arrow" }
// }
// }
// }
// div.details {
// a.title[href=u_node_slug(&node.slug)] { @node.title }
// @Props { node, udata, full: false, lang }
// span.overview { @node.description }
// }
}
}
}
|