From 03e9b119cc2d0b48edf5c93f664b5142fb7252a4 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Mon, 22 Jul 2024 15:12:55 +0800 Subject: [PATCH] :zap: Feat(igonre): Timeline feature enhancement --- assets/css/_shortcodes/_timeline.scss | 4 ++- layouts/partials/plugin/timeline.html | 37 ++++++++++++++++++++++----- layouts/partials/single/footer.html | 1 + layouts/shortcodes/timeline.html | 5 ++++ 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/assets/css/_shortcodes/_timeline.scss b/assets/css/_shortcodes/_timeline.scss index 65d6e736..237b489b 100644 --- a/assets/css/_shortcodes/_timeline.scss +++ b/assets/css/_shortcodes/_timeline.scss @@ -1,6 +1,8 @@ .#{$prefix}timeline { list-style: none; - margin-block: 1rem; + box-sizing: border-box; + overflow: auto; + margin: 1rem auto; --timeline-color: #{darken($global-border-color, 5%)}; --timeline-circle-color: #FF735A; --timeline-circle-size: 10px; diff --git a/layouts/partials/plugin/timeline.html b/layouts/partials/plugin/timeline.html index bd78859f..27d66a87 100644 --- a/layouts/partials/plugin/timeline.html +++ b/layouts/partials/plugin/timeline.html @@ -4,22 +4,47 @@ {{- $animation := .Options.animation | default false -}} {{- $size := .Options.size | default "medium" -}} {{- $node := .Options.node | default "circle" -}} -{{- $events := sort (.Inner | transform.Unmarshal).events "timestamp" (cond $reverse "desc" "asc") -}} -