Refactor timeline to support bookshop component

This commit is contained in:
Mark Dumay
2025-06-04 07:17:33 +02:00
parent 2fb48b51f5
commit 494f203866
21 changed files with 357 additions and 207 deletions

View File

@@ -0,0 +1,24 @@
# Metadata about this component, to be used in the CMS
spec:
structures:
- content_blocks
label: Releases
description: Release timeline
icon: fingerprint
tags: []
# Defines the structure of this component, as well as the default values
blueprint:
heading:
preheading:
title:
content:
align:
arrangement:
width:
size:
background:
backdrop:
color:
subtle:
data:

View File

@@ -0,0 +1,27 @@
{{/*
Copyright © 2025 The Hinode Team / Mark Dumay. All rights reserved.
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
Visit gethinode.com/license for more details.
*/}}
{{/* Initialize arguments */}}
{{ $args := partial "utilities/InitArgs.html" (dict "bookshop" "releases" "args" .) }}
{{ if or $args.err $args.warnmsg }}
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
"partial" "component-library/components/releases/releases.hugo.html"
"msg" " Invalid arguments"
"details" ($args.errmsg | append $args.warnmsg)
"file" page.File
)}}
{{- end -}}
{{/* Main code */}}
{{ if not $args.error }}
{{ partial "assets/timeline.html" (dict
"page" page
"background" $args.background
"heading" $args.heading
"data" $args.data
)
}}
{{- end -}}