Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shape divider section #1857

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Add animate
  • Loading branch information
sofiamatulis committed Jul 15, 2022
commit 8e2b89963b23b7e6e9fe7ca288aa89de099cf13d
27 changes: 25 additions & 2 deletions sections/shape.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
width: 100%;
display: block;
clip-path: url(#myGradient-{{ section.id }});
transform: {{ section.settings.direction }};
}

.shape-{{ section.id }} svg {
Expand All @@ -22,12 +23,28 @@
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}

.shape-{{ section.id }}--animate {
will-change: transform;
animation: divider 1s ease infinite;
}

@keyframes divider {
0% {
opacity: 1;
}
50% {
opacity: 0.8;
}
100% {
opacity: 1;
}
}
{% endstyle %}

<div class="section-{{ section.id }}-padding">
<div class="shape-{{ section.id }}" style="transform: {{ section.settings.direction }}">
<div class="shape-{{ section.id }}{% if section.settings.animate %} shape-{{ section.id }}--animate{% endif %}">
{% assign variable_id = 'myGradient-' | append: section.id -%}

{%- case section.settings.shape -%}
{%- when 'wave' -%}
{%- render 'icon-wave', variable: variable_id -%}
Expand Down Expand Up @@ -104,6 +121,12 @@
],
"default": "rotate(0deg)"
},
{
"type": "checkbox",
"id": "animate",
"default": false,
"label": "Add animation"
},
{
"type": "header",
"content": "Padding"
Expand Down