From d5895dc0dbc605ad988625bdbc5c304102257dfa Mon Sep 17 00:00:00 2001 From: Chaoming Li Date: Mon, 18 Nov 2024 15:23:01 +1100 Subject: [PATCH] feat: convert testimonials section into reusable shortcode with animation support --- layouts/index.html | 23 -------- layouts/shortcodes/testimonials.html | 88 ++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 23 deletions(-) create mode 100644 layouts/shortcodes/testimonials.html diff --git a/layouts/index.html b/layouts/index.html index 339147f..f495df1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,29 +4,6 @@ {{ .Content }} {{ end }} - -
-
-
-

Loved by Teams Worldwide

-

See what our customers have to say about their experience with our platform.

-
- -
-
-
- Testimonial -
-

John Smith

-

Product Manager at Company

-
-
-

"This platform has transformed how we understand our users. The insights we've gained have been invaluable for our product development."

-
-
-
-
-
diff --git a/layouts/shortcodes/testimonials.html b/layouts/shortcodes/testimonials.html new file mode 100644 index 0000000..60e48d0 --- /dev/null +++ b/layouts/shortcodes/testimonials.html @@ -0,0 +1,88 @@ +
+
+
+

{{ .Get "title" | default "Loved by Teams Worldwide" }}

+

{{ .Get "description" | default "See what our customers have to say about their experience with our platform." }}

+
+ +
+
+ {{ range .Page.Params.testimonials }} +
+
+ {{ .name }} +
+

{{ .name }}

+

{{ .title }}

+
+
+

{{ .quote }}

+
+ {{ end }} + {{ if ne (.Get "animate" | default "true") "false" }} + {{ range .Page.Params.testimonials }} +
+
+ {{ .name }} +
+

{{ .name }}

+

{{ .title }}

+
+
+

{{ .quote }}

+
+ {{ end }} + {{ end }} +
+
+
+
+ +