This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-theme.js
71 lines (68 loc) · 2.23 KB
/
config-theme.js
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
/* --------------------------------------------------------------------------
* File : config-theme.js
* Author : indonez
* Author URI : http://www.indonez.com
*
* Indonez Copyright 2020 All Rights Reserved.
* --------------------------------------------------------------------------
* javascript handle initialization
1. Slideshow
2. Counter
3. Mobile nav button
4. Modal iframe
* -------------------------------------------------------------------------- */
'use strict';
const HomepageApp = {
//----------- 1. Slideshow -----------
theme_slideshow: function() {
UIkit.slideshow('.in-slideshow', {
autoplay: true,
autoplayInterval: 7000,
pauseOnHover: false,
animation: 'slide',
minHeight: 480,
maxHeight: 700
});
},
//---------- 2. Counter -----------
theme_counter: function() {
const counter = new counterUp({
selector: '.count',
start: 0,
duration: 3200,
intvalues: true,
interval: 50
});
counter.start();
},
//---------- 3. Mobile nav button -----------
theme_mobilenav: function() {
mobileNav({
addonButtons: true,
buttons: [{
name: 'Log in', // button name
url: '/signin.html', // button url
type: 'primary', // button type (default, primary, secondary, danger, text)
icon: 'sign-in-alt' // button icon, you can use all icons from here : https://fontawesome.com/icons?d=gallery&s=solid&m=free
}]
});
},
//---------- 4. Modal iframe -----------
theme_video: function() {
modalIframe({
videos: [{
id: 'video-1', // video id (should not be the same as the next video)
url: 'https://www.youtube.com/embed/F3QpgXBtDeo' // video embed url
}]
});
},
theme_init: function() {
HomepageApp.theme_slideshow();
HomepageApp.theme_counter();
HomepageApp.theme_mobilenav();
HomepageApp.theme_video();
}
}
document.addEventListener('DOMContentLoaded', function() {
HomepageApp.theme_init();
});