Skip to content

Commit

Permalink
Merge pull request #39 from samliew/new-events
Browse files Browse the repository at this point in the history
Fix order of events
  • Loading branch information
samliew authored Aug 23, 2024
2 parents 6a04c63 + 30a199e commit 5b4382a
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 64 deletions.
24 changes: 16 additions & 8 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,19 @@ $(async function () {
return false;
});

});



/* ===== DEV ===== */
['localhost', '127.0.0.1'].some(h => h === location.hostname) && (() => {
document.documentElement.classList.add('dev');
})();
/* ===== DEV-only ===== */
['localhost', '127.0.0.1'].some(h => h === location.hostname) && (() => {
document.documentElement.classList.add('dev');

// Check if timeline is sorted chronologically descending
const eventDates = [...document.querySelectorAll('.event .date-from')].map(v => v.textContent);
const sorted = eventDates.slice().sort((a, b) => new Date(b) - new Date(a));
if (eventDates.join() !== sorted.join()) {
console.error('Timeline not sorted chronologically.');
console.log(eventDates, sorted);
}
else {
console.log('Timeline is sorted chronologically.');
}
})();
});
112 changes: 56 additions & 56 deletions timeline_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,25 +285,6 @@
],
"tags": []
},
{
"date_str": "2020-06-01",
"title": "We're switching to CommonMark",
"slug": "we-re-switching-to-commonmark",
"type": "feature",
"body": "<p>As of June 20, 2020, all sites are on CommonMark.</p><blockquote>\n<p>In the past, changes to our Markdown renderers have been rather risky and high-effort. We needed to carefully evaluate if a change breaks anything for the millions of existing posts we have in place. By sticking to a well-defined specification like CommonMark, we can make sure that implementations that stick to this specification will work for us. If the specification gets extended, adopting changes will be easy and safe.</p>\n<p>Another reason is that this reduces some of the maintenance burdens of our development teams. Instead of maintaining two distinct Markdown renderers, we can now pick something off the shelf and use that instead. With markdig and markdown-it we&rsquo;ve found two reputable libraries that are beating our own implementations when it comes to performance and functionality. Both are great pieces of software that we're more than happy to use in our product.<br /><br />-- <a href=\"https://meta.stackexchange.com/users/507720/ham-vocke\">Ham Vocke</a></p>\n</blockquote>",
"links": [
{
"text": "MSE post",
"url": "https://meta.stackexchange.com/q/348746"
}
],
"tags": [
{
"text": "commonmark",
"url": "https://meta.stackexchange.com/questions/tagged/commonmark"
}
]
},
{
"date_str": "2021-05-11",
"title": "Sara Chipps resigns",
Expand Down Expand Up @@ -370,6 +351,25 @@
}
]
},
{
"date_str": "2020-06-01",
"title": "We're switching to CommonMark",
"slug": "we-re-switching-to-commonmark",
"type": "feature",
"body": "<p>As of June 20, 2020, all sites are on CommonMark.</p><blockquote>\n<p>In the past, changes to our Markdown renderers have been rather risky and high-effort. We needed to carefully evaluate if a change breaks anything for the millions of existing posts we have in place. By sticking to a well-defined specification like CommonMark, we can make sure that implementations that stick to this specification will work for us. If the specification gets extended, adopting changes will be easy and safe.</p>\n<p>Another reason is that this reduces some of the maintenance burdens of our development teams. Instead of maintaining two distinct Markdown renderers, we can now pick something off the shelf and use that instead. With markdig and markdown-it we&rsquo;ve found two reputable libraries that are beating our own implementations when it comes to performance and functionality. Both are great pieces of software that we're more than happy to use in our product.<br /><br />-- <a href=\"https://meta.stackexchange.com/users/507720/ham-vocke\">Ham Vocke</a></p>\n</blockquote>",
"links": [
{
"text": "MSE post",
"url": "https://meta.stackexchange.com/q/348746"
}
],
"tags": [
{
"text": "commonmark",
"url": "https://meta.stackexchange.com/questions/tagged/commonmark"
}
]
},
{
"classes": [
"featured-event",
Expand Down Expand Up @@ -464,6 +464,19 @@
],
"tags": []
},
{
"classes": [
"tag-staff",
"tag-resignation"
],
"slug": "mark-henderson-resigns",
"type": "staff resignation",
"date_str": "2020-03-05",
"title": "Mark Henderson resigns",
"summary": "Site Reliability Engineer",
"links": [],
"tags": []
},
{
"classes": [
"featured-event",
Expand All @@ -478,19 +491,6 @@
"links": [],
"tags": []
},
{
"classes": [
"tag-staff",
"tag-resignation"
],
"slug": "mark-henderson-resigns",
"type": "staff resignation",
"date_str": "2020-03-05",
"title": "Mark Henderson resigns",
"summary": "Site Reliability Engineer",
"links": [],
"tags": []
},
{
"classes": [
"featured-event",
Expand Down Expand Up @@ -1787,12 +1787,12 @@
"tag-moderator",
"tag-resignation"
],
"slug": "yvette-steps-down",
"slug": "aza-resigns",
"type": "moderator resignation",
"date_str": "2019-09-19",
"title": "Yvette steps down",
"summary": "moderator on Stack Overflow",
"body": "<p>stepped down to take a break for personal reasons, but later requested and failed to be reinstated in 2020 due to the new reinstatement process</p>",
"date_str": "2019-09-26",
"title": "Aza resigns",
"summary": "moderator on Literature",
"body": "<p><a href=\"https://literature.meta.stackexchange.com/questions/1195/resignation-notice\">Resignation notice</a></p>",
"links": [],
"tags": []
},
Expand All @@ -1801,12 +1801,12 @@
"tag-moderator",
"tag-resignation"
],
"slug": "aza-resigns",
"slug": "yvette-steps-down",
"type": "moderator resignation",
"date_str": "2019-09-26",
"title": "Aza resigns",
"summary": "moderator on Literature",
"body": "<p><a href=\"https://literature.meta.stackexchange.com/questions/1195/resignation-notice\">Resignation notice</a></p>",
"date_str": "2019-09-19",
"title": "Yvette steps down",
"summary": "moderator on Stack Overflow",
"body": "<p>stepped down to take a break for personal reasons, but later requested and failed to be reinstated in 2020 due to the new reinstatement process</p>",
"links": [],
"tags": []
},
Expand Down Expand Up @@ -3103,6 +3103,20 @@
"tags": [],
"icon": "https://assets.website-files.com/5e28e4d5ff9207d4429418f2/5e2a6fbb76f903fd40e2af53_salesforce.png"
},
{
"classes": [
"tag-site-graduation"
],
"slug": "academia-launches",
"type": "site-graduation",
"date_str": "2014-04-23",
"title": "Academia launches",
"summary": "for academics and those enrolled in higher education",
"body": "<p><a href=\"https://academia.stackexchange.com\">https://academia.stackexchange.com</a></p>",
"links": [],
"tags": [],
"icon": "https://assets.website-files.com/5e28e4d5ff9207d4429418f2/5e2a6fbabe4a7433d9205816_academia.png"
},
{
"classes": [
"featured-event",
Expand All @@ -3126,20 +3140,6 @@
}
]
},
{
"classes": [
"tag-site-graduation"
],
"slug": "academia-launches",
"type": "site-graduation",
"date_str": "2014-04-23",
"title": "Academia launches",
"summary": "for academics and those enrolled in higher education",
"body": "<p><a href=\"https://academia.stackexchange.com\">https://academia.stackexchange.com</a></p>",
"links": [],
"tags": [],
"icon": "https://assets.website-files.com/5e28e4d5ff9207d4429418f2/5e2a6fbabe4a7433d9205816_academia.png"
},
{
"classes": [
"featured-event",
Expand Down

0 comments on commit 5b4382a

Please sign in to comment.