diff --git a/themes/jefklak-creative-portfolio/assets/js/codex.js b/themes/jefklak-creative-portfolio/assets/js/codex.js index f225f48..95b76b3 100644 --- a/themes/jefklak-creative-portfolio/assets/js/codex.js +++ b/themes/jefklak-creative-portfolio/assets/js/codex.js @@ -8,10 +8,10 @@ document.addEventListener("DOMContentLoaded",function() { } var sorts = { "year": (a, b) => toI(a, 'year') > toI(b, 'year'), - "name": (a, b) => a.innerHTML.localeCompare(b.innerHTML), + "name": (a, b) => a.querySelector('.name').innerHTML.toLowerCase() > b.querySelector('.name').innerHTML.toLowerCase(), "hours": (a, b) =>toI(a, 'hours') > toI(b, 'hours'), "date": (a, b) => a.querySelector('.date').dateTime.localeCompare(b.querySelector('.date').dateTime), - "rating": (a, b) => toI(a, 'rating') < toI(b, 'rating') + "rating": (a, b) => toI(a, 'rating') > toI(b, 'rating') } articles.sort(sorts[by])