yggdrasil/components/skeletons/
archive_skeleton.rs1use crate::components::skeletons::atoms::*;
6use crate::components::skeletons::tags_skeleton::TagsSkeleton;
7use dioxus::prelude::*;
8
9#[component]
15pub fn ArchiveSkeleton(#[props(default = true)] include_tags: bool) -> Element {
16 rsx! {
17 div { class: "archive-skeleton", role: "status", aria_label: "正在加载文章归档",
18 if include_tags {
19 TagsSkeleton {}
20 }
21 div { class: "archive-timeline", aria_hidden: "true",
22 div { class: "archive-toolbar",
23 SkeletonBox { class: "h-5 w-40 rounded" }
24 SkeletonBox { class: "h-3 w-16 rounded" }
25 }
26 for y in 0..2 {
27 div { key: "{y}", class: "archive-year",
28 div { class: "archive-year-heading",
29 SkeletonBox { class: "h-2 w-20 rounded mb-3" }
30 SkeletonBox { class: "h-14 w-32 rounded mb-3" }
31 SkeletonBox { class: "h-3 w-28 rounded" }
32 }
33 div { class: "archive-months",
34 for m in 0..2 {
35 div { key: "{m}", class: "archive-month",
36 div { class: "archive-month-header",
37 SkeletonBox { class: "h-5 w-32 rounded" }
38 SkeletonBox { class: "h-3 w-8 rounded" }
39 }
40 for e in 0..3 {
41 div { key: "{e}", class: "archive-entry",
42 SkeletonBox { class: "h-4 w-5 rounded mt-1" }
43 div {
44 SkeletonBox { class: "h-5 w-3/4 rounded mb-2" }
45 SkeletonBox { class: "h-3 w-28 rounded" }
46 }
47 }
48 }
49 }
50 }
51 }
52 }
53 }
54 }
55 }
56 }
57}