diff --git a/assets/js/cards.js b/assets/js/cards.js
index 863b224..7eaee81 100644
--- a/assets/js/cards.js
+++ b/assets/js/cards.js
@@ -1,4 +1,7 @@
-console.log("Connected cards");
+// ┌─┐┌─┐┬─┐┌┬┐┌─┐
+// │ ├─┤├┬┘ ││└─┐
+// └─┘┴ ┴┴└──┴┘└─┘
+
const printCards = () => {
for (const card of CONFIG.cards) {
diff --git a/assets/js/lists.js b/assets/js/lists.js
index 4c99f58..ca21111 100644
--- a/assets/js/lists.js
+++ b/assets/js/lists.js
@@ -1,37 +1,39 @@
-console.log("Connected lists");
+// ┬ ┬┌─┐┌┬┐┌─┐
+// │ │└─┐ │ └─┐
+// ┴─┘┴└─┘ ┴ └─┘
const printFirstList = () => {
let icon = ``;
- const position = "beforeend";
+ const position = 'beforeend';
list_1.insertAdjacentHTML(position, icon);
for (const link of CONFIG.lists.firstList) {
let item = `
${link.name}
`;
- const position = "beforeend";
+ const position = 'beforeend';
list_1.insertAdjacentHTML(position, item);
}
};
const printSecondList = () => {
let icon = ``;
- const position = "beforeend";
+ const position = 'beforeend';
list_2.insertAdjacentHTML(position, icon);
for (const link of CONFIG.lists.secondList) {
let item = `
${link.name}
`;
- const position = "beforeend";
+ const position = 'beforeend';
list_2.insertAdjacentHTML(position, item);
}
};
diff --git a/assets/js/time.js b/assets/js/time.js
index f213600..7df9a12 100644
--- a/assets/js/time.js
+++ b/assets/js/time.js
@@ -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
diff --git a/assets/js/weather.js b/assets/js/weather.js
index 38d09ee..8aba353 100644
--- a/assets/js/weather.js
+++ b/assets/js/weather.js
@@ -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);
}
diff --git a/config.js b/config.js
index 561fa4a..acf0cee 100644
--- a/config.js
+++ b/config.js
@@ -14,6 +14,7 @@ const CONFIG = {
name: 'John',
imageBackground: false,
openInNewTab: true,
+ twelveHourFormat: false,
// Greetings
greetingMorning: 'Good morning!',