mirror of
https://github.com/driftywinds/driftywinds.github.io.git
synced 2025-12-19 19:13:33 +00:00
Indent code with spaces instead of tabs
This commit is contained in:
12
js/news.js
12
js/news.js
@@ -1,12 +1,12 @@
|
||||
insertNavigationBar("All News");
|
||||
|
||||
function main(json) {
|
||||
// Set tab title
|
||||
document.title = `News - ${json.name}`;
|
||||
// Set tab title
|
||||
document.title = `News - ${json.name}`;
|
||||
|
||||
// Sort news by latest
|
||||
json.news.sort((a, b) => (new Date(b.date)).valueOf() - (new Date(a.date)).valueOf());
|
||||
// Sort news by latest
|
||||
json.news.sort((a, b) => (new Date(b.date)).valueOf() - (new Date(a.date)).valueOf());
|
||||
|
||||
// Create & insert news items
|
||||
json.news.forEach(news => document.getElementById("news").insertAdjacentHTML("beforeend", newsItemHTML(news)));
|
||||
// Create & insert news items
|
||||
json.news.forEach(news => document.getElementById("news").insertAdjacentHTML("beforeend", newsItemHTML(news)));
|
||||
}
|
||||
Reference in New Issue
Block a user