Skip to content

Commit 7c0cf05

Browse files
authored
Update webinar transition (#113)
Signed-off-by: Md Mohin Uddin <[email protected]>
1 parent 0d1c4da commit 7c0cf05

File tree

7 files changed

+2224
-380
lines changed

7 files changed

+2224
-380
lines changed

layouts/_default/webinar.html

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44
{{ end }}
55

66
{{ define "main" }}
7+
<!-- preloader start -->
8+
<div class="is-flex is-justify-content-center is-align-items-center is-flex-direction-column ac-preloader">
9+
<span class="spinner"></span>
10+
<p class="font-size-12 mt-10 pl-5">
11+
LOADING
12+
</p>
13+
</div>
14+
<!-- preloader end -->
15+
716
<!-- hero area start -->
8-
<section class="hero-area-2" id="webinarHeroArea">
17+
<section class="hero-area-2 is-hidden" id="webinarHeroArea">
918
<div class="container">
1019
<div class="columns">
1120
<div class="column is-8">
@@ -103,7 +112,7 @@ <h6>Pulak Kanti Bhowmick</h6>
103112
<!-- form start -->
104113
<div class="registration-form">
105114
<h3>Register Now</h3>
106-
<div class="circle-shape"><img src="/assets/images/webinar/circle-shape.jpg" alt=""></div>
115+
<div class="circle-shape"><img src="/assets/images/webinar/circle-shape.png" alt=""></div>
107116
<!-- registration form start -->
108117
<!-- https://stackoverflow.com/a/29014676 -->
109118
<form method="post" action="https://x.appscode.com/_/webinars/register"
@@ -397,10 +406,10 @@ <h1 class="is-ellipsis-3 mb-8">{{ .snippet.title }}</h1>
397406
wbody.replaceChildren();
398407

399408
var webinars = JSON.parse(xhr.responseText);
400-
// console.log( webinars );
401-
if(webinars === null) {
402-
document.querySelector('#webinarHeroArea').classList.add('is-hidden')
403-
}else {
409+
// Add preloader
410+
document.querySelector('.ac-preloader')?.classList.add('is-hidden')
411+
if(webinars !== null) {
412+
document.querySelector('#webinarHeroArea')?.classList.remove('is-hidden')
404413
for (let i = 0; i < Math.min(webinars.length, 3); i++) {
405414
let w = webinars[i];
406415
let date = new Date(w.schedules[0]);
@@ -499,8 +508,7 @@ <h5 class="mb-20 mt-30">Webinar Speakers</h5>
499508
})
500509
// Webinar tabs end
501510
}
502-
503-
} else {
511+
} else {
504512
// location.reload();
505513
}
506514
}

static/assets/js/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ document.addEventListener("DOMContentLoaded", () => {
235235

236236
// features products
237237
$(document).ready(function () {
238+
$(this).scrollTop(0);
239+
238240
$('[data-serialscrolling]').serialscrolling({
239241

240242
// selector
@@ -341,7 +343,7 @@ owlSocialProve.owlCarousel({
341343
const searchWebinar = document.querySelector(".search-box input");
342344
let allWebinar = document.querySelectorAll('.webinar-video')
343345

344-
searchWebinar.addEventListener('keyup', function(){
346+
searchWebinar?.addEventListener('keyup', function(){
345347
Array.from(allWebinar).forEach(singleWebinar => {
346348
let titleHtml = singleWebinar.querySelectorAll('h1');
347349
Array.from(titleHtml).forEach(title => {

static/assets/sass/base/_webinar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ $poppins: "Poppins", sans-serif;
536536
height: 0;
537537
position: relative;
538538
padding-top: 56.25%;
539+
background-color: #f2f3f4;
539540

540541
&.active-overlay {
541542
&:after {
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.ac-preloader {
2+
position: fixed;
3+
height: 100vh;
4+
top: 0;
5+
z-index: 999;
6+
width: 100%;
7+
background-color: $ac-white;
8+
}
9+
10+
.spinner {
11+
position: relative;
12+
}
13+
14+
.spinner:before,
15+
.spinner:after {
16+
content: "";
17+
position: relative;
18+
display: block;
19+
}
20+
21+
.spinner:before {
22+
-webkit-animation: spinner 2.5s cubic-bezier(0.75, 0, 0.5, 1) infinite normal;
23+
animation: spinner 2.5s cubic-bezier(0.75, 0, 0.5, 1) infinite normal;
24+
width: 2em;
25+
height: 2em;
26+
background-color: $ac-primary;
27+
}
28+
29+
.spinner:after {
30+
-webkit-animation: shadow 2.5s cubic-bezier(0.75, 0, 0.5, 1) infinite normal;
31+
animation: shadow 2.5s cubic-bezier(0.75, 0, 0.5, 1) infinite normal;
32+
bottom: -0.5em;
33+
height: 0.25em;
34+
border-radius: 50%;
35+
background-color: rgba(0, 0, 0, 0.2);
36+
}
37+
38+
@-webkit-keyframes spinner {
39+
50% {
40+
border-radius: 50%;
41+
transform: scale(0.5) rotate(360deg);
42+
}
43+
100% {
44+
transform: scale(1) rotate(720deg);
45+
}
46+
}
47+
48+
@keyframes spinner {
49+
50% {
50+
border-radius: 50%;
51+
transform: scale(0.5) rotate(360deg);
52+
}
53+
100% {
54+
transform: scale(1) rotate(720deg);
55+
}
56+
}
57+
@-webkit-keyframes shadow {
58+
50% {
59+
transform: scale(0.5);
60+
background-color: rgba(0, 0, 0, 0.1);
61+
}
62+
}
63+
@keyframes shadow {
64+
50% {
65+
transform: scale(0.5);
66+
background-color: rgba(0, 0, 0, 0.1);
67+
}
68+
}

0 commit comments

Comments
 (0)