🎨 Comments and titles
This commit is contained in:
parent
764b93951b
commit
93bfc062f1
@ -1,4 +1,7 @@
|
||||
console.log("Connected cards");
|
||||
// ┌─┐┌─┐┬─┐┌┬┐┌─┐
|
||||
// │ ├─┤├┬┘ ││└─┐
|
||||
// └─┘┴ ┴┴└──┴┘└─┘
|
||||
|
||||
|
||||
const printCards = () => {
|
||||
for (const card of CONFIG.cards) {
|
||||
|
@ -1,37 +1,39 @@
|
||||
console.log("Connected lists");
|
||||
// ┬ ┬┌─┐┌┬┐┌─┐
|
||||
// │ │└─┐ │ └─┐
|
||||
// ┴─┘┴└─┘ ┴ └─┘
|
||||
|
||||
const printFirstList = () => {
|
||||
let icon = `<i class="list__head" data-feather="${CONFIG.firstListIcon}"></i>`;
|
||||
const position = "beforeend";
|
||||
const position = 'beforeend';
|
||||
list_1.insertAdjacentHTML(position, icon);
|
||||
for (const link of CONFIG.lists.firstList) {
|
||||
let item = `
|
||||
<a
|
||||
target="${CONFIG.openInNewTab ? "_blank" : ""}"
|
||||
target="${CONFIG.openInNewTab ? '_blank' : ''}"
|
||||
href="${link.link}"
|
||||
class="list__link"
|
||||
>${link.name}</a
|
||||
>
|
||||
`;
|
||||
const position = "beforeend";
|
||||
const position = 'beforeend';
|
||||
list_1.insertAdjacentHTML(position, item);
|
||||
}
|
||||
};
|
||||
|
||||
const printSecondList = () => {
|
||||
let icon = `<i class="list__head" data-feather="${CONFIG.secondListIcon}"></i>`;
|
||||
const position = "beforeend";
|
||||
const position = 'beforeend';
|
||||
list_2.insertAdjacentHTML(position, icon);
|
||||
for (const link of CONFIG.lists.secondList) {
|
||||
let item = `
|
||||
<a
|
||||
target="${CONFIG.openInNewTab ? "_blank" : ""}"
|
||||
target="${CONFIG.openInNewTab ? '_blank' : ''}"
|
||||
href="${link.link}"
|
||||
class="list__link"
|
||||
>${link.name}</a
|
||||
>
|
||||
`;
|
||||
const position = "beforeend";
|
||||
const position = 'beforeend';
|
||||
list_2.insertAdjacentHTML(position, item);
|
||||
}
|
||||
};
|
||||
|
@ -1,3 +1,7 @@
|
||||
// ┌┬┐┬┌┬┐┌─┐
|
||||
// │ ││││├┤
|
||||
// ┴ ┴┴ ┴└─┘
|
||||
|
||||
window.onload = displayClock();
|
||||
function displayClock() {
|
||||
const monthNames = [
|
||||
@ -15,9 +19,6 @@ function displayClock() {
|
||||
'Dec',
|
||||
];
|
||||
|
||||
// Set to true to use a 12 hour date format
|
||||
var format_12hour = false;
|
||||
|
||||
var d = new Date();
|
||||
var mm = monthNames[d.getMonth()];
|
||||
var dd = d.getDate();
|
||||
@ -25,7 +26,7 @@ function displayClock() {
|
||||
var hh = d.getHours();
|
||||
var ampm = '';
|
||||
|
||||
if (format_12hour) {
|
||||
if (CONFIG.twelveHourFormat) {
|
||||
ampm = hh >= 12 ? ' pm' : ' am';
|
||||
hh = hh % 12;
|
||||
hh = hh ? hh : 12; //show mod 0 as 12
|
||||
|
@ -1,6 +1,12 @@
|
||||
// ┬ ┬┌─┐┌─┐┌┬┐┬ ┬┌─┐┬─┐
|
||||
// │││├┤ ├─┤ │ ├─┤├┤ ├┬┘
|
||||
// └┴┘└─┘┴ ┴ ┴ ┴ ┴└─┘┴└─
|
||||
|
||||
const iconElement = document.querySelector('.weather-icon');
|
||||
const tempElement = document.querySelector('.temperature-value p');
|
||||
const descElement = document.querySelector('.temperature-description p');
|
||||
const descElement = document.querySelector(
|
||||
'.temperature-description p'
|
||||
);
|
||||
|
||||
// App data
|
||||
const weather = {};
|
||||
@ -8,7 +14,6 @@ weather.temperature = {
|
||||
unit: 'celsius',
|
||||
};
|
||||
|
||||
// Change to 'F' for Fahrenheit
|
||||
var tempUnit = CONFIG.weatherUnit;
|
||||
|
||||
const KELVIN = 273.15;
|
||||
@ -19,7 +24,6 @@ const key = `${CONFIG.weatherKey}`;
|
||||
setPosition();
|
||||
|
||||
function setPosition(position) {
|
||||
|
||||
getWeather(CONFIG.weatherLatitude, CONFIG.weatherLongitude);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user