diff --git a/js/catalog.js b/js/catalog.js index 38382096..18da6d6b 100644 --- a/js/catalog.js +++ b/js/catalog.js @@ -28,7 +28,7 @@ if (active_page == 'catalog') $(function(){ $("#sort_by").change(function(){ var value = this.value; - $('#Grid').mixItUp('sort', value); + $('#Grid').mixItUp('sort', (value == "random" ? value : "sticky:desc " + value)); catalog.sort_by = value; localStorage.catalog = JSON.stringify(catalog); }); @@ -46,7 +46,7 @@ if (active_page == 'catalog') $(function(){ $('#Grid').mixItUp({ animation: { enable: false - }, + } }); if (catalog.sort_by !== undefined) { diff --git a/templates/themes/catalog/catalog.html b/templates/themes/catalog/catalog.html index 2ca66089..1011fdaf 100644 --- a/templates/themes/catalog/catalog.html +++ b/templates/themes/catalog/catalog.html @@ -38,6 +38,8 @@ data-bump="{{ post.bump }}" data-time="{{ post.time }}" data-id="{{ post.id }}" + data-sticky="{% if post.sticky %}true{% else %}false{% endif %}" + data-locked="{% if post.locked %}true{% else %}false{% endif %}" >