|
@@ -1,10 +1,49 @@
|
|
|
-$(function () {
|
|
|
+document.addEventListener('DOMContentLoaded', function() {
|
|
|
+ var calendarEl = document.getElementById('calendar');
|
|
|
+ var calendar = new FullCalendar.Calendar(calendarEl, {
|
|
|
+ height: 'auto',
|
|
|
+ headerToolbar: { start: 'title', center: '', end: 'list,timeGridWeek,dayGridMonth,prev,next' },
|
|
|
+ buttonText: { list:'day' },
|
|
|
+ views: {
|
|
|
+ dayGrid: { hiddenDays: [ 0,6,7 ] },
|
|
|
+ timeGrid: {
|
|
|
+ slotMinTime: '08:00:00',
|
|
|
+ slotMaxTime: '17:00:00',
|
|
|
+ dayHeaderFormat: {
|
|
|
+ weekday: 'short'
|
|
|
+ },
|
|
|
+ hiddenDays: [ 0,6,7 ]
|
|
|
+ },
|
|
|
+ },
|
|
|
+ displayEventEnd: { month: true, basicWeek: true, "default": true },
|
|
|
+ stickyHeaderDates: false,
|
|
|
+ eventDataTransform: function(event) {
|
|
|
+ event.url = "";
|
|
|
+ return event;
|
|
|
+ },
|
|
|
+ firstDay : 1,
|
|
|
+ googleCalendarApiKey: 'AIzaSyAGowGJYx6dOaQvG_vSUI73uT88VWOTcNQ',
|
|
|
+ events: {
|
|
|
+ googleCalendarId: 'davidawindham.com_bvrht1f8n2vgldgjenpgfdd4bk@group.calendar.google.com',
|
|
|
+ className: 'gcal-event',
|
|
|
+ displayEventEnd: true,
|
|
|
+ },
|
|
|
+ eventClick: function(info) {
|
|
|
+ info.jsEvent.preventDefault();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ calendar.render();
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+window.onload = function () {
|
|
|
header();
|
|
|
hamburger();
|
|
|
+ parallax();
|
|
|
waypoint_init();
|
|
|
waypoints();
|
|
|
why();
|
|
|
-});
|
|
|
+};
|
|
|
|
|
|
function header() {
|
|
|
var $window = $(window),
|
|
@@ -21,14 +60,15 @@ function header() {
|
|
|
$smallHeader.removeClass('showing');
|
|
|
smallHeaderShowing = false;
|
|
|
}
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
-$window.scroll(small_header);
|
|
|
- small_header();
|
|
|
+ $window.on('scroll', function() {
|
|
|
+ small_header();
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function hamburger() {
|
|
|
-var isOpen = false,
|
|
|
+ var isOpen = false,
|
|
|
$hamburger = $('.hamburger'),
|
|
|
$headerSmall = $('.header-small');
|
|
|
|
|
@@ -38,7 +78,7 @@ var isOpen = false,
|
|
|
$headerSmall.toggleClass('menu-open');
|
|
|
});
|
|
|
|
|
|
- $(window).on('scroll', function(){
|
|
|
+ $(window).on('scroll', function() {
|
|
|
if(isOpen){
|
|
|
$hamburger.removeClass('is-active');
|
|
|
$headerSmall.removeClass('menu-open');
|
|
@@ -47,59 +87,28 @@ var isOpen = false,
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+function parallax() {
|
|
|
+ var backgroundsvg = document.querySelector('#backgroundsvg');
|
|
|
+ var backgroundsvg2 = document.querySelector('#backgroundsvg2');
|
|
|
+ var backgroundsvg3 = document.querySelector('#backgroundsvg3');
|
|
|
+ var xScrollPosition;
|
|
|
+ var yScrollPosition;
|
|
|
+ function setTranslate(xPos, yPos, el) {
|
|
|
+ el.style.transform = "translate3d(" + xPos + ", " + yPos + "px, 0)";
|
|
|
+ };
|
|
|
+ function scrollLoop() {
|
|
|
+ xScrollPosition = window.scrollX;
|
|
|
+ yScrollPosition = window.scrollY;
|
|
|
+ setTranslate(0, yScrollPosition * -0.2, backgroundsvg);
|
|
|
+ setTranslate(0, yScrollPosition * -1.5, backgroundsvg2);
|
|
|
+ setTranslate(0, yScrollPosition * 0.5, backgroundsvg3);
|
|
|
+ requestAnimationFrame(scrollLoop);
|
|
|
+ };
|
|
|
+ window.addEventListener("DOMContentLoaded", scrollLoop, false);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-document.addEventListener('DOMContentLoaded', function() {
|
|
|
- var calendarEl = document.getElementById('calendar');
|
|
|
- var calendar = new FullCalendar.Calendar(calendarEl, {
|
|
|
- //plugins: [ 'dayGrid','timeGrid', 'googleCalendar' ],
|
|
|
- height: 'auto',
|
|
|
- headerToolbar: {
|
|
|
- start: 'title',
|
|
|
- center: '',
|
|
|
- end: 'list,timeGridWeek,dayGridMonth,prev,next'
|
|
|
- },
|
|
|
- buttonText: {
|
|
|
- list:'day'
|
|
|
- },
|
|
|
- views: {
|
|
|
- dayGrid: {
|
|
|
- hiddenDays: [ 0,6,7 ]
|
|
|
- },
|
|
|
- timeGrid: {
|
|
|
- slotMinTime: '08:00:00',
|
|
|
- slotMaxTime: '17:00:00',
|
|
|
- dayHeaderFormat: {
|
|
|
- weekday: 'short'
|
|
|
- },
|
|
|
- hiddenDays: [ 0,6,7 ]
|
|
|
- },
|
|
|
- },
|
|
|
- displayEventEnd: {
|
|
|
- month: true,
|
|
|
- basicWeek: true,
|
|
|
- "default": true
|
|
|
- },
|
|
|
- stickyHeaderDates: false,
|
|
|
- eventDataTransform: function(event) {
|
|
|
- event.url = "";
|
|
|
- return event;
|
|
|
- },
|
|
|
- firstDay : 1,
|
|
|
- //defaultView: 'dayGridMonth',
|
|
|
- googleCalendarApiKey: 'AIzaSyAGowGJYx6dOaQvG_vSUI73uT88VWOTcNQ',
|
|
|
- events: {
|
|
|
- googleCalendarId: 'davidawindham.com_bvrht1f8n2vgldgjenpgfdd4bk@group.calendar.google.com',
|
|
|
- className: 'gcal-event',
|
|
|
- displayEventEnd: true,
|
|
|
- },
|
|
|
- //eventRender: function(info) {
|
|
|
- //},
|
|
|
- eventClick: function(info) {
|
|
|
- info.jsEvent.preventDefault();
|
|
|
- }
|
|
|
- });
|
|
|
- calendar.render();
|
|
|
-});
|
|
|
|
|
|
function why() {
|
|
|
var index = 0,
|