Delete js directory
This commit is contained in:
1 parent
2490eebe70
commit
89db00cc28
5 files changed
-231
No files matched your search
-103
@@ -1,103 +0,0 @@
|
|||||||
let bioBtn = document.getElementById('short-desc');
|
|
||||||
let bioModel = document.getElementsByClassName('bio-text')[0];
|
|
||||||
let leftArrow = document.getElementById("left-arrow");
|
|
||||||
let rightArrow = document.getElementById("right-arrow");
|
|
||||||
let hidden = true;
|
|
||||||
bioBtn.onclick = function () {
|
|
||||||
if (hidden) {
|
|
||||||
bioModel.classList.remove("hidden");
|
|
||||||
leftArrow.classList.remove("fa-arrow-right");
|
|
||||||
leftArrow.classList.add("fa-arrow-down");
|
|
||||||
rightArrow.classList.remove("fa-arrow-left");
|
|
||||||
rightArrow.classList.add("fa-arrow-down");
|
|
||||||
leftArrow.style.position = "relative";
|
|
||||||
rightArrow.style.position = "relative";
|
|
||||||
unfade(bioModel);
|
|
||||||
} else {
|
|
||||||
bioModel.classList.add("hidden");
|
|
||||||
leftArrow.classList.remove("fa-arrow-down");
|
|
||||||
leftArrow.classList.add("fa-arrow-right");
|
|
||||||
rightArrow.classList.remove("fa-arrow-down");
|
|
||||||
rightArrow.classList.add("fa-arrow-left");
|
|
||||||
leftArrow.style.position = "relative";
|
|
||||||
rightArrow.style.position = "relative";
|
|
||||||
fade(bioModel);
|
|
||||||
}
|
|
||||||
hidden = !hidden;
|
|
||||||
};
|
|
||||||
|
|
||||||
bioModel.onclick = function (evt) {
|
|
||||||
if (evt.target == bioModel) {
|
|
||||||
bioModel.classList.add("hidden");
|
|
||||||
document.body.style.opacity = 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function fade(element) {
|
|
||||||
var op = 1;
|
|
||||||
var timer = setInterval(function () {
|
|
||||||
if (op <= 0.1) {
|
|
||||||
clearInterval(timer);
|
|
||||||
element.style.display = 'none';
|
|
||||||
}
|
|
||||||
element.style.opacity = op;
|
|
||||||
element.style.filter = 'alpha(opacity=' + op * 100 + ")";
|
|
||||||
op -= op * 0.1;
|
|
||||||
}, 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
function unfade(element) {
|
|
||||||
var op = 0.1;
|
|
||||||
element.style.display = 'block';
|
|
||||||
var timer = setInterval(function () {
|
|
||||||
if (op >= 1) {
|
|
||||||
clearInterval(timer);
|
|
||||||
}
|
|
||||||
element.style.opacity = op;
|
|
||||||
element.style.filter = 'alpha(opacity=' + op * 100 + ")";
|
|
||||||
op += op * 0.1;
|
|
||||||
}, 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
const coords = { x: 0, y: 0 };
|
|
||||||
const circles = document.querySelectorAll(".circle");
|
|
||||||
|
|
||||||
const colors = [
|
|
||||||
"#b0b8ce"
|
|
||||||
];
|
|
||||||
|
|
||||||
circles.forEach(function (circle, index) {
|
|
||||||
circle.x = 1;
|
|
||||||
circle.y = 1;
|
|
||||||
circle.style.backgroundColor = colors[index % colors.length];
|
|
||||||
});
|
|
||||||
|
|
||||||
window.addEventListener("mousemove", function(e){
|
|
||||||
coords.x = e.clientX;
|
|
||||||
coords.y = e.clientY;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function animateCircles() {
|
|
||||||
|
|
||||||
let x = coords.x;
|
|
||||||
let y = coords.y;
|
|
||||||
|
|
||||||
circles.forEach(function (circle, index) {
|
|
||||||
circle.style.left = x - 10 + "px";
|
|
||||||
circle.style.top = y - 10 + "px";
|
|
||||||
|
|
||||||
circle.style.scale = (circles.length - index) / circles.length;
|
|
||||||
|
|
||||||
circle.x = x;
|
|
||||||
circle.y = y;
|
|
||||||
|
|
||||||
const nextCircle = circles[index + 1] || circles[0];
|
|
||||||
x += (nextCircle.x - x) * 0.08;
|
|
||||||
y += (nextCircle.y - y) * 0.08;
|
|
||||||
});
|
|
||||||
|
|
||||||
requestAnimationFrame(animateCircles);
|
|
||||||
}
|
|
||||||
|
|
||||||
animateCircles();
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
fetch("https://api.github.com/users/fraujulian/events")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(events => {
|
|
||||||
let updates = document.getElementById("commits");
|
|
||||||
updates.innerHTML = "";
|
|
||||||
for (let i = 0; i < 10; i++) {
|
|
||||||
let singleCommit = document.createElement("div");
|
|
||||||
let commit = events[i].payload.commits[0];
|
|
||||||
if (commit != undefined) {
|
|
||||||
commit.sha = commit.sha.substr(0, 8);
|
|
||||||
singleCommit.innerHTML =
|
|
||||||
`<div class="media text-muted pt-3">
|
|
||||||
<p class="media-body pb-3 mb-0 small lh-125">
|
|
||||||
<a href="${commit.url}">
|
|
||||||
<strong class="d-block text-gray-dark">${commit.sha}</strong>
|
|
||||||
</a>
|
|
||||||
<a>${commit.message}</a>
|
|
||||||
</p>
|
|
||||||
</div>`;
|
|
||||||
updates.appendChild(singleCommit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
window.onload = function () {
|
|
||||||
let script = document.createElement("script");
|
|
||||||
script.src = "https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js";
|
|
||||||
document.body.appendChild(script);
|
|
||||||
|
|
||||||
const sortOnKey = (key, desc) => {
|
|
||||||
return (a, b) => {
|
|
||||||
a = a[key];
|
|
||||||
b = b[key];
|
|
||||||
return desc ? b - a : a - b;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
String.prototype.replaceAt = function (index, replacement) {
|
|
||||||
return this.substr(0, index) + replacement + this.substr(index + replacement.length);
|
|
||||||
}
|
|
||||||
fetch("https://api.github.com/users/fraujulian/repos?per_page=999")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(projects => {
|
|
||||||
projects = projects.sort(sortOnKey("stargazers_count", true));
|
|
||||||
let projectsDiv = document.getElementById("github_projects");
|
|
||||||
projectsDiv.innerHTML = "";
|
|
||||||
projectsDiv.classList = "";
|
|
||||||
for (let i = 0; i < 6; i++) {
|
|
||||||
let projectDiv = document.createElement("div");
|
|
||||||
projectDiv.classList = "card hoverable";
|
|
||||||
let project = projects[i];
|
|
||||||
if (project != undefined) {
|
|
||||||
if (project.description == null)
|
|
||||||
project.description = "This project has no description";
|
|
||||||
if (project.language == null)
|
|
||||||
project.language = "No language stored!";
|
|
||||||
project.name = project.name.replaceAll('_', ' ').replaceAll('-', ' ');
|
|
||||||
projectDiv.innerHTML = `
|
|
||||||
<div class="media">
|
|
||||||
<div class="media-body">
|
|
||||||
<a href="${project.html_url}" onclick="plausible('${project.name}')" target="_blank">
|
|
||||||
<strong class="d-block text-gray-dark">${project.name}</strong>
|
|
||||||
</a>
|
|
||||||
<div class="stars" style="float:right;">
|
|
||||||
📕 ${project.language} <br>
|
|
||||||
⭐ ${project.stargazers_count}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p>${project.description}</p>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
fetch(`https://raw.githubusercontent.com/${project.full_name}/master/README.md`)
|
|
||||||
.then(response => response.text())
|
|
||||||
.then(text => {
|
|
||||||
let converter = new showdown.Converter();
|
|
||||||
let html = converter.makeHtml(text);
|
|
||||||
let projectModal = document.createElement("div");
|
|
||||||
projectModal.classList = "modal github-modal hidden";
|
|
||||||
projectModal.innerHTML = `
|
|
||||||
<div class="card">
|
|
||||||
<a onclick="location.reload()" href="#" style="float: right"> ❌</a>
|
|
||||||
<a href="${project.html_url}" target="blank" style="float: left"> Visit on GitHub</a>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
${html}
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
projectDiv.onclick = function () {
|
|
||||||
projectModal.classList.remove("hidden");
|
|
||||||
document.body.scrollTop = 0; // Safari
|
|
||||||
document.documentElement.scrollTop = 0; // Chrome Firefox IE Opera
|
|
||||||
document.body.style.opacity = 0.2;
|
|
||||||
};
|
|
||||||
|
|
||||||
projectModal.onclick = function (evt) {
|
|
||||||
if (evt.target == projectModal) {
|
|
||||||
projectModal.classList.add("hidden");
|
|
||||||
document.body.style.opacity = 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.getElementsByTagName("html")[0].appendChild(projectModal);
|
|
||||||
});
|
|
||||||
projectsDiv.appendChild(projectDiv);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Vendored
-2
@@ -1,2 +0,0 @@
|
|||||||
/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
|
|
||||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|conLine truncated
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
var slideIndex = 0;
|
|
||||||
carousel();
|
|
||||||
|
|
||||||
function carousel() {
|
|
||||||
var items = [];
|
|
||||||
var bioContainer = document.getElementsByClassName("bio")[0];
|
|
||||||
bioContainer.style = "display: grid !important;";
|
|
||||||
document.getElementsByClassName("js-reminder")[0].style = "display: none !important;";
|
|
||||||
var rawListItems = bioContainer.getElementsByTagName("div");
|
|
||||||
for (var i = 1; i < rawListItems.length; i++) {
|
|
||||||
rawListItems[i].style = "display: none;";
|
|
||||||
}
|
|
||||||
slideIndex++;
|
|
||||||
if (slideIndex > rawListItems.length || slideIndex == 1) {
|
|
||||||
slideIndex = 2
|
|
||||||
}
|
|
||||||
rawListItems[slideIndex - 1].style.display = "block";
|
|
||||||
setTimeout(carousel, 1000);
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user