From 22b819452eab985b3a01d7a72d2a3b3b8931eddb Mon Sep 17 00:00:00 2001
From: YeSeul Cho <86948867+seul1230@users.noreply.github.com>
Date: Fri, 14 Jun 2024 03:24:57 +0900
Subject: [PATCH] Update carousel.html
[Fixed carousel problem]
Now you can add 2 or more carousels in a page.
---
_includes/elements/carousel.html | 112 ++++++++++++++++++++++++-------
1 file changed, 87 insertions(+), 25 deletions(-)
diff --git a/_includes/elements/carousel.html b/_includes/elements/carousel.html
index d0c811498..d9bc612f8 100644
--- a/_includes/elements/carousel.html
+++ b/_includes/elements/carousel.html
@@ -1,40 +1,102 @@
-{%- assign images = carousel_images | strip | newline_to_br | split: '
' -%}
-
-
-
+{%- assign images = carousel_images | strip | newline_to_br | split: '
' -%}
+{%- assign carousel_id = include.carousel_id -%}
+{%- if include.class -%}
+
- {% for image in images %}
- {%- if forloop.first -%}
-
- {%- else -%}
-
- {%- endif -%}
- {% endfor %}
+ {% for image in images %} {%- if forloop.first -%}
+
+ {%- else -%}
+
+ {%- endif -%} {% endfor %}
- {% for image in images %}
- {%- if forloop.first -%}
-
-
-
- {%- else -%}
-
-
-
- {%- endif -%}
- {% endfor %}
+ {% for image in images %} {%- if forloop.first -%}
+
+
+
+ {%- else -%}
+
+
+
+ {%- endif -%} {% endfor %}
-
+
+
Previous
-
+
Next
-
+{%- else -%}
+
+
+ {% for image in images %} {%- if forloop.first -%}
+
+ {%- else -%}
+
+ {%- endif -%} {% endfor %}
+
+
+
+ {% for image in images %} {%- if forloop.first -%}
+
+
+
+ {%- else -%}
+
+
+
+ {%- endif -%} {% endfor %}
+
+
+
+
+ Previous
+
+
+
+
+ Next
+
+
+{%- endif -%}
+