Tweaking
Finalize qhoneypots config, thanks to @giga-a for native JSON logging! Completely rework T-Pot Landing Page based on Bento (https://github.com/migueravila/Bento). New NGINX image is down by 100MB and only uses 3.3 MB of RAM at runtime. Keep legacy Sensor option (without logstash).
BIN
docker/nginx/dist/html/assets/.DS_Store
vendored
Normal file
BIN
docker/nginx/dist/html/assets/background.jpg
vendored
Normal file
After Width: | Height: | Size: 606 KiB |
BIN
docker/nginx/dist/html/assets/icons/.DS_Store
vendored
Normal file
BIN
docker/nginx/dist/html/assets/icons/favicon.png
vendored
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
docker/nginx/dist/html/assets/img/donation.png
vendored
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
docker/nginx/dist/html/assets/img/header.png
vendored
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
docker/nginx/dist/html/assets/img/icons.png
vendored
Normal file
After Width: | Height: | Size: 269 KiB |
BIN
docker/nginx/dist/html/assets/img/live.png
vendored
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
docker/nginx/dist/html/assets/img/previewbg.png
vendored
Normal file
After Width: | Height: | Size: 950 KiB |
BIN
docker/nginx/dist/html/assets/img/spanish.png
vendored
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
docker/nginx/dist/html/assets/img/subheader.png
vendored
Normal file
After Width: | Height: | Size: 239 KiB |
27
docker/nginx/dist/html/assets/js/greeting.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
// ┌─┐┬─┐┌─┐┌─┐┌┬┐┬┌┐┌┌─┐┌─┐
|
||||
// │ ┬├┬┘├┤ ├┤ │ │││││ ┬└─┐
|
||||
// └─┘┴└─└─┘└─┘ ┴ ┴┘└┘└─┘└─┘
|
||||
|
||||
// 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;
|
||||
}
|
46
docker/nginx/dist/html/assets/js/lists.js
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
// ┬ ┬┌─┐┌┬┐┌─┐
|
||||
// │ │└─┐ │ └─┐
|
||||
// ┴─┘┴└─┘ ┴ └─┘
|
||||
|
||||
// Print the first List
|
||||
const printFirstList = () => {
|
||||
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) {
|
||||
// List item
|
||||
let item = `
|
||||
<a
|
||||
target="${CONFIG.openInNewTab ? '_blank' : ''}"
|
||||
href="${link.link}"
|
||||
class="list__link"
|
||||
>${link.name}</a
|
||||
>
|
||||
`;
|
||||
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();
|
7
docker/nginx/dist/html/assets/js/theme.js
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// ┌┬┐┬ ┬┌─┐┌┬┐┌─┐
|
||||
// │ ├─┤├┤ │││├┤
|
||||
// ┴ ┴ ┴└─┘┴ ┴└─┘
|
||||
|
||||
if (CONFIG.imageBackground) {
|
||||
document.body.classList.add('withImageBackground');
|
||||
}
|
36
docker/nginx/dist/html/assets/js/time.js
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
// ┌┬┐┬┌┬┐┌─┐
|
||||
// │ ││││├┤
|
||||
// ┴ ┴┴ ┴└─┘
|
||||
|
||||
window.onload = displayClock();
|
||||
// Clock function
|
||||
function displayClock() {
|
||||
const monthNames = [
|
||||
'Jan',
|
||||
'Feb',
|
||||
'Mar',
|
||||
'Apr',
|
||||
'May',
|
||||
'Jun',
|
||||
'Jul',
|
||||
'Aug',
|
||||
'Sep',
|
||||
'Oct',
|
||||
'Nov',
|
||||
'Dec',
|
||||
];
|
||||
|
||||
// Get clock elements
|
||||
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 = '';
|
||||
|
||||
// Display clock elements
|
||||
document.getElementById('hour').innerText = hh;
|
||||
document.getElementById('separator').innerHTML = ' : ';
|
||||
document.getElementById('minutes').innerText = min + ampm;
|
||||
setTimeout(displayClock, 1000);
|
||||
}
|