Start working on new landing page

Remove old code
This commit is contained in:
Marco Ochse
2024-02-16 19:15:17 +01:00
parent 0c9b58b6ac
commit 0dda858ac1
32 changed files with 8231 additions and 1649 deletions

View File

@ -0,0 +1,11 @@
function updateClock() {
const now = new Date();
const hours = ('0' + now.getHours()).slice(-2);
const minutes = ('0' + now.getMinutes()).slice(-2);
const day = ('0' + now.getDate()).slice(-2);
const month = ('0' + (now.getMonth() + 1)).slice(-2);
const year = now.getFullYear();
document.getElementById('clock').textContent = hours + ':' + minutes + ' | ' + day + '/' + month + '/' + year;
setTimeout(updateClock, 1000);
}
updateClock();

View File

@ -1,27 +0,0 @@
// ┌─┐┬─┐┌─┐┌─┐┌┬┐┬┌┐┌┌─┐┌─┐
// │ ┬├┬┘├┤ ├┤ │ │││││ ┬└─┐
// └─┘┴└─└─┘└─┘ ┴ ┴┘└┘└─┘└─┘
// Get the hour
const today = new Date();
const hour = today.getHours();
// Here you can change your name
const name = CONFIG.name;
// Here you can change your greetings
const gree1 = `${CONFIG.greetingNight}\xa0`;
const gree2 = `${CONFIG.greetingMorning}\xa0`;
const gree3 = `${CONFIG.greetingAfternoon}\xa0`;
const gree4 = `${CONFIG.greetingEvening}\xa0`;
// Define the hours of the greetings
if (hour >= 23 || hour < 5) {
document.getElementById('greetings').innerText = gree1;
} else if (hour >= 6 && hour < 12) {
document.getElementById('greetings').innerText = gree2;
} else if (hour >= 12 && hour < 17) {
document.getElementById('greetings').innerText = gree3;
} else {
document.getElementById('greetings').innerText = gree4;
}

View File

@ -1,71 +0,0 @@
// ┬ ┬┌─┐┌┬┐┌─┐
// │ │└─┐ │ └─┐
// ┴─┘┴└─┘ ┴ └─┘
// Print the first List
const isLinkAvailable = async (link) => {
try {
const response = await fetch(link, { method: 'HEAD', mode: 'no-cors' });
if (response.ok) {
// The link is available
return true;
} else if (response.status === 301 || response.status === 302) {
// The link is a redirect, follow the redirect and check the final location
const newLocation = response.headers.get('Location');
if (newLocation) {
const newResponse = await fetch(newLocation, { method: 'HEAD', mode: 'no-cors' });
if (newResponse.ok) {
// The final location is available
return true;
}
}
}
} catch (error) {
console.error('Link check failed: ', error);
}
// The link is not available
return false;
};
const printFirstList = async () => {
let icon = `<i class="list__head" icon-name="${CONFIG.firstListIcon}"></i>`;
const position = 'beforeend';
list_1.insertAdjacentHTML(position, icon);
for (const link of CONFIG.lists.firstList) {
let item = `
<a
target="${CONFIG.openInNewTab ? '_blank' : ''}"
href="${link.link}"
class="list__link"
>${link.name}</a
>
`;
if (await isLinkAvailable(link.link)) {
const position = 'beforeend';
list_1.insertAdjacentHTML(position, item);
}
}
};
// Print the second List
const printSecondList = () => {
let icon = `<i class="list__head" icon-name="${CONFIG.secondListIcon}"></i>`;
const position = 'beforeend';
list_2.insertAdjacentHTML(position, icon);
for (const link of CONFIG.lists.secondList) {
// List item
let item = `
<a
target="${CONFIG.openInNewTab ? '_blank' : ''}"
href="${link.link}"
class="list__link"
>${link.name}</a
>
`;
const position = 'beforeend';
list_2.insertAdjacentHTML(position, item);
}
};
printFirstList();
printSecondList();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,54 @@
particlesJS('particles-js', {
particles: {
number: { value: 80, density: { enable: true, value_area: 800 } },
color: { value: '#e20074' },
shape: {
type: 'polygon',
stroke: { width: 0, color: '#000000' },
polygon: { nb_sides: 6 },
},
opacity: {
value: 0.5,
random: false,
anim: { enable: true, speed: 1, opacity_min: 0.1, sync: false }
},
size: {
value: 6,
random: true,
anim: { enable: false, speed: 40, size_min: 0.1, sync: false }
},
line_linked: {
enable: true,
distance: 150,
color: '#e20074',
opacity: 0.4,
width: 2
},
move: {
enable: true,
speed: 6,
direction: 'none',
random: false,
straight: false,
out_mode: 'out',
bounce: false,
attract: { enable: false, rotateX: 600, rotateY: 1200 }
},
},
interactivity: {
detect_on: 'canvas',
events: {
onhover: { enable: true, mode: 'repulse' },
onclick: { enable: true, mode: 'push' },
resize: true
},
modes: {
grab: { distance: 400, line_linked: { opacity: 1 } },
bubble: { distance: 400, size: 40, duration: 2, opacity: 8, speed: 3 },
repulse: { distance: 200, duration: 0.4 },
push: { particles_nb: 4 },
remove: { particles_nb: 2 }
}
},
retina_detect: true
});

View File

@ -1,7 +0,0 @@
// ┌┬┐┬ ┬┌─┐┌┬┐┌─┐
// │ ├─┤├┤ │││├┤
// ┴ ┴ ┴└─┘┴ ┴└─┘
if (CONFIG.imageBackground) {
document.body.classList.add('withImageBackground');
}

View File

@ -1,28 +0,0 @@
// ┌┬┐┬┌┬┐┌─┐
// │ ││││├┤
// ┴ ┴┴ ┴└─┘
// Set time and Date
window.onload = displayClock();
function displayClock() {
const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var d = new Date();
var mm = monthNames[d.getMonth()];
var dd = d.getDate();
var min = (mins = ('0' + d.getMinutes()).slice(-2));
var hh = d.getHours();
var ampm = '';
if (CONFIG.twelveHourFormat) {
ampm = hh >= 12 ? ' pm' : ' am';
hh = hh % 12;
hh = hh ? hh : 12;
}
document.getElementById('hour').innerText = hh;
document.getElementById('separator').innerHTML = ' : ';
document.getElementById('minutes').innerText = min + ampm;
setTimeout(displayClock, 1000);
}