Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

DOT:7336: COD theme > Redesign the slider #201

Merged
merged 3 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions assets/desktop-slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@
.yc-slider__desktop .content .container > div {
max-width: 600px;
}

.splide__pagination {
display: flex !important;
margin-bottom: 20px;
}
Binary file added assets/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 6 additions & 11 deletions sections/desktop-slider.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

{% style %}
#yc_slider_{{ id }} .splide__arrow {
background: {{ section.settings.slider_mobile_arrows_background_color.hex }} !important;
background: {{ section.settings.slider_desktop_arrows_background_color.hex }} !important;
width: 54px;
height: 54px;
border-radius: 0 8px 8px 0;
margin: 0 100px;
}

#yc_slider_{{ id }} .splide__arrow svg {
height: {{ section.settings.slider_arrows_content_size }}px;
width: {{ section.settings.slider_arrows_content_size }}px;
background-color: {{ section.settings.slider_mobile_arrows_background_color.hex }};
}

.yc-slider__desktop .content {
Expand Down Expand Up @@ -116,16 +121,6 @@
"label": "Timeout between slides",
"default": 5
},
{
"type": "range",
"id": "slider_arrows_size",
"min": 20,
"max": 55,
"step": 1,
"unit": "px",
"label": "Arrows Size",
"default": 37
},
{
"type": "range",
"id": "slider_arrows_content_size",
Expand Down
2 changes: 1 addition & 1 deletion snippets/slider.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
>
<img
loading='lazy'
src='{{ block.settings.image.src }}'
src='{%- if block.settings.image.src -%} {{ block.settings.image.src }} {%- else -%} {{ 'hero.png' | asset_url }} {%- endif -%}'
>
{%- if block.settings.caption %}
<div class='content flex items-center h-full w-full'>
Expand Down