-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-fullpage.js
88 lines (79 loc) · 2.66 KB
/
init-fullpage.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
var myFullpage = new fullpage('#fullpage', {
// Navigation
menu: '.navigation-container',
lockAnchors: false,
anchors: ['section1', 'section2', 'section3', 'section4', 'section5', 'section6', 'section7', 'section8', 'section9'],
navigation: true,
navigationPosition: 'right',
showActiveTooltip: true,
slidesNavigation: true,
slidesNavPosition: 'bottom',
// Scrolling
css3: true,
scrollingSpeed: 700,
autoScrolling: true,
fitToSection: true,
fitToSectionDelay: 600,
scrollBar: false,
easing: 'easeInOutCubic',
easingcss3: 'ease',
loopBottom: false,
loopTop: false,
loopHorizontal: true,
continuousVertical: false,
continuousHorizontal: false,
scrollHorizontally: false,
interlockedSlides: false,
dragAndMove: false,
offsetSections: false,
resetSliders: false,
fadingEffect: false,
normalScrollElements: '#element1, .element2',
scrollOverflow: true,
scrollOverflowMacStyle: false,
scrollOverflowReset: false,
touchSensitivity: 10,
bigSectionsDestination: null,
// Accessibility
keyboardScrolling: true,
animateAnchor: true,
recordHistory: true,
// Design
controlArrows: true,
controlArrowsHTML: [
'<div class="fp-arrow"></div>',
'<div class="fp-arrow"></div>'
],
verticalCentered: true,
paddingTop: '0',
paddingBottom: '10px',
fixedElements: '#header, .footer',
responsiveWidth: 0,
responsiveHeight: 0,
responsiveSlides: false,
parallax: false,
parallaxOptions: { type: 'reveal', percentage: 62, property: 'translate' },
dropEffect: false,
dropEffectOptions: { speed: 2300, color: '#F82F4D', zIndex: 9999 },
waterEffect: false,
waterEffectOptions: { animateContent: true, animateOnMouseMove: true },
cards: false,
cardsOptions: { perspective: 100, fadeContent: true, fadeBackground: true },
// Custom selectors
sectionSelector: '.section',
slideSelector: '.slide',
lazyLoading: true,
observer: true,
// Events
afterLoad: () => {
let width = window.screen.width;
if (width >= 1058) {
let section;
const locals = document.querySelectorAll(`.navigation-container>ul>li>a`);
locals.forEach(e => { e.classList.remove('active-local') });
(fullpage_api.getActiveSection().anchor == 'section3' || fullpage_api.getActiveSection().anchor == 'section4') ? section = 'section2' : section = fullpage_api.getActiveSection().anchor;
const local = document.querySelector(`li>a[href="#${section}"]`);
local.classList.add('active-local');
}
},
});