-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
292 lines (279 loc) · 26.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<!DOCTYPE html>
<html>
<head>
<title>yb-seal demo (npm library)</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1" />
<meta property="og:title" content="yb-seal demo">
<meta property="og:type" content="website">
<meta name="description" property="og:description" content="This is demo site to show the animations using yb-seal npm package.">
<meta property="og:image:width" content="250"/><meta property="og:image:height" content="250"/>
<style>body{overflow-y:scroll;scroll-behavior:smooth}</style>
<link href="https://fonts.googleapis.com/css2?family=Russo+One&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@500&family=Russo+One&display=swap" rel="stylesheet">
<!-- Font Awesome Icons -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.css" />
<style>
.bg {
background-image: linear-gradient(225deg, #0000ff 50%, #03a9f4 50%);
}
</style>
</head>
<body>
<div class="bg"></div>
<div class="bg bg2"></div>
<div class="bg bg3"></div>
<div class="links-content">
<div class="brand-link right"><i class="fa-brands fa-github" onclick="redirectToPage('git')"></i><i class="fa-brands fa-npm" onclick="redirectToPage('npm')"></i></div>
</div>
<header class="lib">
<div class="lib-content">
<h1 class="lib-name">SEAL</h1>
<h2 class="lib-text">Scroll Effect Animation Library</h2>
</div>
<span class="lib-scroll">
Scroll down <br>
<i class="fa-solid fa-angles-down"></i>
</span>
</header>
<!-- Slide -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Slide</h2>
<div class="section-seal-content left yb-seal yb-seal-slide-left">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-left"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-slide-right">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-right"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal yb-seal-slide-up">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-up"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-slide-down">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-down"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Zoom -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Zoom</h2>
<div class="section-seal-content left yb-seal yb-seal-zoom-in">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-zoom-in"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-zoom-out">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-zoom-out"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Flip -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Flip</h2>
<div class="section-seal-content left yb-seal yb-seal-flip-left">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-left"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-flip-right">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-right"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal yb-seal-flip-up">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-up"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-flip-down">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-down"</span>></span><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Slide with duration -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Slide with duration (in seconds)</h2>
<div class="section-seal-content left yb-seal yb-seal-slide-left" yb-seal-duration="1">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-left"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"1"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-slide-right" yb-seal-duration="2">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-right"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"2"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal yb-seal-slide-up" yb-seal-duration="3">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-up"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"3"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-slide-down" yb-seal-duration="4">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-down"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"4"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Zoom with duration -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Zoom with duration (in seconds)</h2>
<div class="section-seal-content left yb-seal yb-seal-zoom-in" yb-seal-duration="2">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-zoom-in"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"2"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-zoom-out" yb-seal-duration="3">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-zoom-out"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"3"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Flip with duration -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Flip with duration (in seconds)</h2>
<div class="section-seal-content left yb-seal yb-seal-flip-left" yb-seal-duration="1">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-left"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"1"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-flip-right" yb-seal-duration="2">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-right"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"2"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal yb-seal-flip-up" yb-seal-duration="3">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-up"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"3"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-flip-down" yb-seal-duration="4">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-down"</span><br/><span class="seal-styles-attribute">yb-seal-duration</span>=<span class="seal-styles-value">"4"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Slide with delay -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Slide with delay (in seconds)</h2>
<div class="section-seal-content left yb-seal yb-seal-slide-left" yb-seal-delay="1">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-left"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"1"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-slide-right" yb-seal-delay="2">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-right"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"2"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal yb-seal-slide-up" yb-seal-delay="3">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-up"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"3"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-slide-down" yb-seal-delay="4">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-slide-down"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"4"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Zoom with delay -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Zoom with delay (in seconds)</h2>
<div class="section-seal-content left yb-seal yb-seal-zoom-in" yb-seal-delay="1">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-zoom-in"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"1"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-zoom-out" yb-seal-delay="2">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-zoom-out"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"2"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Flip with delay -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Flip with delay (in seconds)</h2>
<div class="section-seal-content left yb-seal yb-seal-flip-left" yb-seal-delay="1">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-left"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"1"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-flip-right" yb-seal-delay="2">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-right"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"2"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal yb-seal-flip-up" yb-seal-delay="3">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-up"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"3"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal yb-seal-flip-down" yb-seal-delay="4">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal yb-seal-flip-down"</span><br/><span class="seal-styles-attribute">yb-seal-delay</span>=<span class="seal-styles-value">"4"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
<!-- Transition Timing functions -->
<section class="section section-seal">
<div class="container">
<h2 class="section-seal-title">Transition Timing functions<br/>(Hover on any of them below to see the transition)</h2>
<div class="section-seal-content left yb-seal" yb-seal-timing="ease" yb-seal-timing-width="500">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal"</span><br/><span class="seal-styles-attribute">yb-seal-timing</span>=<span class="seal-styles-value">"ease"</span><br/><span class="seal-styles-attribute">yb-seal-timing-width</span>=<span class="seal-styles-value">"500"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal" yb-seal-timing="ease-in" yb-seal-timing-width="500">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal"</span><br/><span class="seal-styles-attribute">yb-seal-timing</span>=<span class="seal-styles-value">"ease-in"</span><br/><span class="seal-styles-attribute">yb-seal-timing-width</span>=<span class="seal-styles-value">"500"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal" yb-seal-timing="ease-out" yb-seal-timing-width="500">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal"</span><br/><span class="seal-styles-attribute">yb-seal-timing</span>=<span class="seal-styles-value">"ease-out"</span><br/><span class="seal-styles-attribute">yb-seal-timing-width</span>=<span class="seal-styles-value">"500"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content right yb-seal" yb-seal-timing="ease-in-out" yb-seal-timing-width="500">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal"</span><br/><span class="seal-styles-attribute">yb-seal-timing</span>=<span class="seal-styles-value">"ease-in-out"</span><br/><span class="seal-styles-attribute">yb-seal-timing-width</span>=<span class="seal-styles-value">"500"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
<div class="section-seal-content left yb-seal" yb-seal-timing="linear" yb-seal-timing-width="500">
<pre><code class="html seal-styles xml"><span class="seal-styles-tag"><<span class="seal-styles-title">div </span><span class="seal-styles-attribute">class</span>=<span class="seal-styles-value">"yb-seal"</span><br/><span class="seal-styles-attribute">yb-seal-timing</span>=<span class="seal-styles-value">"linear"</span><br/><span class="seal-styles-attribute">yb-seal-timing-width</span>=<span class="seal-styles-value">"500"</span>></span><br/><span class="seal-styles-tag"></<span class="seal-styles-title">div</span>></span></code></pre>
</div>
</div>
</section>
</body>
<script>
function redirectToPage(text) {
if (text == 'git') window.open('https://github.com/Yashwanthbyalla/yb-seal-demo', 'name', 'noopener=yes');
if (text == 'npm') window.open('https://www.npmjs.com/package/yb-seal', 'name', 'noopener=yes');
}
"use strict";
function loadSEAL() {
window.addEventListener('scroll', () => {
document.body.style.setProperty('--seal', window.pageYOffset / (document.body.offsetHeight - window.innerHeight) + 'px');
document.body.style.setProperty('overflow-x', 'hidden');
}, false);
window.addEventListener("scroll", scrollAnimate);
scrollAnimate();
}
function scrollAnimate() {
const y_elements = document.querySelectorAll(".yb-seal");
const triggerBottom = (window.innerHeight / 5) * 4.5;
y_elements.forEach((y_item) => {
const y_itemTop = y_item.getBoundingClientRect().top;
if (y_itemTop < triggerBottom) {
y_item.classList.add("seal-show");
// duration
const durationValue = y_item.getAttribute("yb-seal-duration");
if (durationValue) {
y_item.style.transition = durationValue + 's all ease';
}
else {
y_item.style.transition = '0.6s all ease';
}
// Delay
const delayValue = y_item.getAttribute("yb-seal-delay");
if (delayValue) {
y_item.style.transitionDelay = delayValue + 's';
}
// Timing function
const timingValue = y_item.getAttribute("yb-seal-timing");
const timingWidthValue = y_item.getAttribute("yb-seal-timing-width");
if (timingValue) {
y_item.style.transitionTimingFunction = timingValue;
y_item.style.transition = 'width 2s' + timingValue;
y_item.addEventListener('mouseenter', function () {
y_item.style.width = timingWidthValue + 'px';
});
y_item.addEventListener('mouseleave', function () {
y_item.style.width = '';
});
}
if ((Array.from(y_item.classList).includes('yb-seal-slide-up')) || (Array.from(y_item.classList).includes('yb-seal-slide-down'))) {
let op = 0.1;
while (op < 1) {
op += 0.1;
if (op == 1)
return;
y_item.style.opacity = op.toString();
}
}
}
else {
y_item.classList.remove("seal-show");
if ((Array.from(y_item.classList).includes('yb-seal-slide-up')) || (Array.from(y_item.classList).includes('yb-seal-slide-down'))) {
let op = 1;
while (op > 0) {
op -= 0.1;
if (op == 0)
return;
y_item.style.opacity = op.toString();
}
}
}
});
}
loadSEAL();
</script>