Clear Repo

This commit is contained in:
2022-04-22 20:00:18 +01:00
parent ff7d802b4c
commit a75c919929
22 changed files with 0 additions and 18728 deletions

View File

@ -1,10 +0,0 @@
function getAge(dateString) {
var today = new Date();
var birthDate = dateString;
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age;
}

View File

@ -1,58 +0,0 @@
class carouseltext{
constructor(elements, carousel, period){
this.elements = elements;
this.carousel = carousel;
this.period = parseInt(period, 10) || 2000;
this.loop = 0;
this.isDeleting = true;
this.text;
}
tick(){
var i = this.loop % this.carousel.length;
var fullTxt = this.toRotate[i];
if (this.isDeleting == true) {
this.txt = fullTxt.substring(0, this.txt.length - 1);
}else{
this.txt = fullTxt.substring(0, this.txt.length + 1);
}
this.element.innerHTML = '<span class="wrap">'+this.txt+'</span>';
var that = this;
var delta = 300 - Math.random() * 100;
if (this.isDeleting) { delta /= 2; }
if (!this.isDeleting && this.txt === fullTxt) {
delta = this.period;
this.isDeleting = true;
} else if (this.isDeleting && this.txt === '') {
this.isDeleting = false;
this.loopNum++;
delta = 500;
}
//Hold the function from executing again until delta time has passed.
setTimeout(function() {
that.tick();
}, delta);
}
textLoad() {
var elements = document.getElementsByClassName('txt-rotate');
for (var i=0; i<elements.length; i++) {
var carousel = elements[i].getAttribute('data-rotate');
var period = elements[i].getAttribute('data-period');
if (toRotate) {
new Text(elements[i], JSON.parse(carousel), period);
}
}
}
}

View File

@ -1,40 +0,0 @@
(function ($) {
"use strict"; // Start of use strict
// Smooth scrolling using anime.js
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').on('click', function () {
if (
location.pathname.replace(/^\//, "") ==
this.pathname.replace(/^\//, "") &&
location.hostname == this.hostname
) {
var target = $(this.hash);
target = target.length ?
target :
$("[name=" + this.hash.slice(1) + "]");
if (target.length) {
anime({
targets: 'html, body',
scrollTop: target.offset().top,
duration: 1000,
easing: 'easeInOutExpo'
});
return false;
}
}
});
// Closes responsive menu when a scroll trigger link is clicked
$(".js-scroll-trigger").on('click', function () {
$(".navbar-collapse").collapse("hide");
});
/* Activate scrollspy to add active class to navbar items on scroll
$('body').scrollspy({
target: "#sideNav"
});
*/
})(jQuery); // End of use strict

View File

@ -1,52 +0,0 @@
class typer{
constructor(text, retypeText){
this.i = 0;
this.x = 0;
this.item = document.getElementById("type");
this.text = text;
this.retypeText = retypeText;
}
type(){
this.item.innerHTML += this.text[this.x].charAt(this.i);
this.i++;
if (this.i < this.text[this.x].length) {
setTimeout(() => {
this.type();
}, 150);
}else{
if(this.retypeText == true){
this.i = 0;
setTimeout(() => {
this.retype();
}, 2000);
}
}
}
retype() {
this.item.innerHTML = this.item.innerHTML.substring(0, this.item.innerHTML.length-1);
if (this.item.innerHTML.length > 0) {
setTimeout(() => {
this.retype();
}, 100);
}else{
this.x++;
//this.x > this.text.length -1 || loop
if(this.x >= this.text.length - 1){
//this.x = 0;
this.retypeText = false;
}
this.type();
}
}
}
var pagetyper = new typer(["//Junior Software Developer", "//Aspiring Backend Engineer"], true);
setTimeout(() =>{
pagetyper.type();
}, 750)