Skip to content

Commit 2340e33

Browse files
authored
Merge pull request #1665 from gethinode/templatev2
Templatev2
2 parents 4ff11c1 + 4e1633a commit 2340e33

File tree

25 files changed

+1981
-68
lines changed

25 files changed

+1981
-68
lines changed

component-library/bookshop.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@import "modules/bookshop/components/cards/cards";
55
@import "modules/bookshop/components/cta/cta";
66
@import "modules/bookshop/components/faq/faq";
7+
@import "modules/bookshop/components/featured/featured";
78
@import "modules/bookshop/components/hero/hero";
89
@import "modules/bookshop/components/list/list";
910
@import "modules/bookshop/components/panels/panels";
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Metadata about this component, to be used in the CMS
2+
spec:
3+
structures:
4+
- content_blocks
5+
label: Featured
6+
description: Featured section
7+
icon: mode_heat
8+
tags: []
9+
10+
# Defines the structure of this component, as well as the default values
11+
blueprint:
12+
heading:
13+
preheading:
14+
title:
15+
content:
16+
align:
17+
arrangement:
18+
width:
19+
size:
20+
background:
21+
backdrop:
22+
color:
23+
subtle:
24+
illustration:
25+
image:
26+
icon:
27+
ratio:
28+
class:
29+
anchor:
30+
mode:
31+
order:
32+
width:
33+
justify:
34+
link-type:
35+
fluid:
36+
theme:
37+
cover:
38+
links:
39+
-
40+
title:
41+
url:
42+
download:
43+
icon:
44+
force:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{{/*
2+
Copyright © 2025 The Hinode Team / Mark Dumay. All rights reserved.
3+
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
4+
Visit gethinode.com/license for more details.
5+
*/}}
6+
7+
{{/* Initialize arguments */}}
8+
{{ $args := partial "utilities/InitArgs.html" (dict "bookshop" "featured" "args" .) }}
9+
{{ if or $args.err $args.warnmsg }}
10+
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
11+
"partial" "component-library/components/featured/featured.hugo.html"
12+
"warnid" "warn-invalid-arguments"
13+
"msg" "Invalid arguments"
14+
"details" ($args.errmsg | append $args.warnmsg)
15+
"file" page.File
16+
)}}
17+
{{- end -}}
18+
19+
{{/* Main code */}}
20+
{{ if not $args.error }}
21+
{{ partial "assets/hero.html" (dict
22+
"page" page
23+
"heading" (merge (dict "width" 8) (or $args.heading dict))
24+
"background" $args.background
25+
"illustration" (merge (dict "ratio" "auto") (or $args.illustration dict))
26+
"order" $args.order
27+
"link-type" $args.linkType
28+
"links" $args.links
29+
"orientation" "horizontal"
30+
"width" (or $args.width 8)
31+
)
32+
}}
33+
{{- end -}}

component-library/components/featured/featured.scss

Whitespace-only changes.

0 commit comments

Comments
 (0)