yggdrasil/components/skeletons/
post_preview_skeleton.rs1use crate::components::skeletons::atoms::SkeletonBox;
12use dioxus::prelude::*;
13
14#[component]
19pub fn PostPreviewSkeleton() -> Element {
20 rsx! {
21 article { class: "post-single w-full",
26 div { class: "flex flex-wrap items-center justify-between gap-3 mb-6 p-3 rounded-2xl bg-[var(--color-paper-entry)] border border-[var(--color-paper-border)]",
29 div { class: "flex items-center gap-2",
30 SkeletonBox { class: "h-4 w-16 rounded" }
31 SkeletonBox { class: "h-5 w-14 rounded-full" }
32 }
33 div { class: "flex items-center gap-2",
34 SkeletonBox { class: "h-9 w-24 rounded-full" }
35 SkeletonBox { class: "h-9 w-20 rounded-full" }
36 }
37 }
38
39 SkeletonBox { class: "h-4 w-48 rounded mb-6" }
41
42 SkeletonBox { class: "h-10 w-4/5 rounded mb-4" }
44
45 SkeletonBox { class: "h-5 w-2/3 rounded mb-4" }
47
48 div { class: "flex items-center gap-2 mb-8",
50 SkeletonBox { class: "h-4 w-16 rounded" }
51 SkeletonBox { class: "h-4 w-1 rounded" }
52 SkeletonBox { class: "h-4 w-24 rounded" }
53 SkeletonBox { class: "h-4 w-1 rounded" }
54 SkeletonBox { class: "h-4 w-20 rounded" }
55 }
56
57 SkeletonBox { class: "w-full aspect-video rounded-lg mb-8" }
59
60 div { class: "space-y-4 mb-8",
62 SkeletonBox { class: "h-4 w-full rounded" }
63 SkeletonBox { class: "h-4 w-full rounded" }
64 SkeletonBox { class: "h-4 w-5/6 rounded" }
65 SkeletonBox { class: "h-4 w-full rounded" }
66 SkeletonBox { class: "h-4 w-full rounded" }
67 SkeletonBox { class: "h-4 w-3/4 rounded" }
68 div { class: "h-2" }
70 SkeletonBox { class: "h-4 w-full rounded" }
71 SkeletonBox { class: "h-4 w-full rounded" }
72 SkeletonBox { class: "h-4 w-2/3 rounded" }
73 }
74
75 div { class: "border-t border-gray-200 dark:border-gray-700 pt-6 mt-8",
77 div { class: "flex items-center justify-between",
78 SkeletonBox { class: "h-4 w-32 rounded" }
79 SkeletonBox { class: "h-4 w-24 rounded" }
80 }
81 }
82 }
83 }
84}