Initial release of thiemoo.at

This commit is contained in:
2022-11-10 22:43:10 +01:00
commit 8e77e4eab7
28 changed files with 8225 additions and 0 deletions

3
js/intro.js Normal file
View File

@@ -0,0 +1,3 @@
particlesJS.load('particles-js', './json/particles.json', function() {
console.log('callback - particles.js config loaded');
});

4
js/jquery2.1.1.js Normal file

File diff suppressed because one or more lines are too long

1541
js/particles.js Normal file

File diff suppressed because it is too large Load Diff

51
js/sidebar.js Normal file
View File

@@ -0,0 +1,51 @@
var sidebar = document.getElementById("sidebar");
var content = document.getElementById("content");
var icon = document.getElementById("navbar-icon");
var navbar = document.getElementById("navbar");
function switchNav() {
if(sidebar.className == "sidebar uncolapsed") {
sidebar.className = "sidebar";
icon.className = "fa fa-bars";
content.className = "content";
updateNavbar();
} else if(sidebar.className == "sidebar") {
sidebar.className = "sidebar uncolapsed";
icon.className = "fa fa-bars";
content.className = "content visible";
navbar.className = "navbar colored";
}
}
function closeNav() {
sidebar.className = "sidebar";
icon.className = "fa fa-bars";
content.className = "content";
}
let home = document.getElementById("nav-home");
let portfolio = document.getElementById("nav-portfolio");
let server = document.getElementById("nav-server");
let projekte = document.getElementById("nav-projekte");
let blog = document.getElementById("nav-blog");
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
updateNavbar();
}
function updateNavbar() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
navbar.className = "navbar colored";
} else {
if(sidebar.className == "sidebar uncolapsed") {
navbar.className = "navbar colored";
} else {
navbar.className = "navbar";
}
}
}

56
js/typewriter.js Normal file
View File

@@ -0,0 +1,56 @@
var TxtRotate = function(el, toRotate, period) {
this.toRotate = toRotate;
this.el = el;
this.loopNum = 0;
this.period = parseInt(period, 10) || 2000;
this.txt = '';
this.tick();
this.isDeleting = false;
};
TxtRotate.prototype.tick = function() {
var i = this.loopNum % this.toRotate.length;
var fullTxt = this.toRotate[i];
if (this.isDeleting) {
this.txt = fullTxt.substring(0, this.txt.length - 1);
} else {
this.txt = fullTxt.substring(0, this.txt.length + 1);
}
this.el.innerHTML = '<span class="wrap">'+this.txt+'</span>';
var that = this;
var delta = 240 - 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;
}
setTimeout(function() {
that.tick();
}, delta);
};
$(document).ready(function() {
var elements = document.getElementsByClassName('txt-rotate');
for (var i=0; i<elements.length; i++) {
var toRotate = elements[i].getAttribute('data-rotate');
var period = elements[i].getAttribute('data-period');
if (toRotate) {
new TxtRotate(elements[i], JSON.parse(toRotate), period);
}
}
// INJECT CSS
//var css = document.createElement("style");
//css.type = "text/css";
//css.innerHTML = ".txt-rotate > .wrap { border-right: 0.08em solid #666 }";
//document.body.appendChild(css);
});