0
0

Updated author informations, updated location of included files, structured the website to the new layout, removed local fontawesome and moved to cloud CDN

This commit is contained in:
Bryan Pedini
2019-02-06 12:43:58 +01:00
parent b13167324a
commit d237a5443f
1608 changed files with 289 additions and 41171 deletions

41
lib/js/clean-blog.js Normal file
View File

@@ -0,0 +1,41 @@
(function($) {
"use strict"; // Start of use strict
// Floating label headings for the contact form
$("body").on("input propertychange", ".floating-label-form-group", function(e) {
$(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
}).on("focus", ".floating-label-form-group", function() {
$(this).addClass("floating-label-form-group-with-focus");
}).on("blur", ".floating-label-form-group", function() {
$(this).removeClass("floating-label-form-group-with-focus");
});
// Show the navbar when the page is scrolled up
var MQL = 992;
//primary navigation slide-in effect
if ($(window).width() > MQL) {
var headerHeight = $('#mainNav').height();
$(window).on('scroll', {
previousTop: 0
},
function() {
var currentTop = $(window).scrollTop();
//check if user is scrolling up
if (currentTop < this.previousTop) {
//if scrolling up...
if (currentTop > 0 && $('#mainNav').hasClass('is-fixed')) {
$('#mainNav').addClass('is-visible');
} else {
$('#mainNav').removeClass('is-visible is-fixed');
}
} else if (currentTop > this.previousTop) {
//if scrolling down...
$('#mainNav').removeClass('is-visible');
if (currentTop > headerHeight && !$('#mainNav').hasClass('is-fixed')) $('#mainNav').addClass('is-fixed');
}
this.previousTop = currentTop;
});
}
})(jQuery); // End of use strict

7
lib/js/clean-blog.min.js vendored Normal file
View File

@@ -0,0 +1,7 @@
/*!
* Start Bootstrap - Clean Blog v5.0.2 (https://startbootstrap.com/template-overviews/clean-blog)
* Copyright 2013-2018 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-clean-blog/blob/master/LICENSE)
*/
!function(o){"use strict";o("body").on("input propertychange",".floating-label-form-group",function(i){o(this).toggleClass("floating-label-form-group-with-value",!!o(i.target).val())}).on("focus",".floating-label-form-group",function(){o(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){o(this).removeClass("floating-label-form-group-with-focus")});if(992<o(window).width()){var s=o("#mainNav").height();o(window).on("scroll",{previousTop:0},function(){var i=o(window).scrollTop();i<this.previousTop?0<i&&o("#mainNav").hasClass("is-fixed")?o("#mainNav").addClass("is-visible"):o("#mainNav").removeClass("is-visible is-fixed"):i>this.previousTop&&(o("#mainNav").removeClass("is-visible"),s<i&&!o("#mainNav").hasClass("is-fixed")&&o("#mainNav").addClass("is-fixed")),this.previousTop=i})}}(jQuery);

View File

@@ -0,0 +1,25 @@
(function ($) {
$(function () {
$('#contact-form-send').click(function () {
$.ajax({
url: 'contactme/webform.php',
method: 'POST',
datatype: 'JSON',
data: {
name: $('#contact-form-name').val(),
email: $('#contact-form-email').val(),
message: $('#contact-form-message').val()
},
success: function () {
console.log( 'I ran the ajax request successfully' ); // debug purposes
}
});
});
$("#scrolldown-button").click(function() {
$('html,body').animate({
scrollTop: $("#contact-form").offset().top
}, 'slow');
});
$("#contact-form-message").css('overflow', 'hidden').autogrow({vertical: true, horizontal: false, flickering: false});
});
})(jQuery);

View File

@@ -0,0 +1,45 @@
(function($) {
current_section = -1;
function getPageContent (section) {
if ( section != current_section ) {
$.ajax({
url: 'index.php',
method: 'POST',
datatype: 'JSON',
data: {
section_id: section,
},
success: function ( data ) {
if ( data.status == 200 ) {
$('#page-title').html(data.pageTitle);
$('#user-content').html(data.html);
if ( section == 3 ) {
$('#content-contact-form').click(function () { getPageContent (5) });
}
}
else {
console.log("[" + data.status + "] " + data.errorCode + ": " + data.errorText);
}
current_section = section
},
error: function (jqXHR, exception) {
console.log(jqXHR.status + ": " + jqXHR.responseText + " | - | " + exception);
},
});
}
}
$(function() {
$('#navbar-home').click(function () { getPageContent (1) } );
$('#navbar-description').click(function () { getPageContent (2) });
$('#navbar-work').click(function () { getPageContent (3) });
$('#navbar-ideas').click(function () { getPageContent (4) });
$('#navbar-contact-form').click(function () { getPageContent (5) });
$('#navbar-contact-email').click(function () { window.location.href = "mailto:bryanpedini@bryanpedini.it"; });
$('ul.nav li.dropdown').hover(function () {
$(this).find('.dropdown-menu').stop(true, true).fadeIn(500);
}, function () {
$(this).find('.dropdown-menu').stop(true, true).fadeOut(500);
});
getPageContent(0);
});
})(jQuery);