From 02eee8da81130f9dc74cbc61468933269bef2c0e Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 3 Apr 2024 21:35:18 +0300 Subject: [PATCH] Remove bootstrap-table from archive tables (#2306) The blog archive page tables have `table-borderless`, but bootstrap-table JS adds `table-bordered` by default and this forces an `!important` border. Since these tables are also supposed to be borderless, this PR excludes them from bootstrap-table, just like the news and CV table are. --- _layouts/archive-category.liquid | 2 +- _layouts/archive-tag.liquid | 2 +- _layouts/archive-year.liquid | 2 +- assets/js/no_defer.js | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/_layouts/archive-category.liquid b/_layouts/archive-category.liquid index 31b84c1..2fc5009 100644 --- a/_layouts/archive-category.liquid +++ b/_layouts/archive-category.liquid @@ -7,7 +7,7 @@ layout: default

an archive of posts in this category

-
+
{% for post in page.posts %} diff --git a/_layouts/archive-tag.liquid b/_layouts/archive-tag.liquid index 22e12ad..81019a0 100644 --- a/_layouts/archive-tag.liquid +++ b/_layouts/archive-tag.liquid @@ -7,7 +7,7 @@ layout: default

an archive of posts with this tag

-
+
{% for post in page.posts %} diff --git a/_layouts/archive-year.liquid b/_layouts/archive-year.liquid index 4671150..0ce93ef 100644 --- a/_layouts/archive-year.liquid +++ b/_layouts/archive-year.liquid @@ -7,7 +7,7 @@ layout: default

an archive of posts from this year

-
+
{% for post in page.posts %} diff --git a/assets/js/no_defer.js b/assets/js/no_defer.js index a58e196..e639595 100644 --- a/assets/js/no_defer.js +++ b/assets/js/no_defer.js @@ -8,7 +8,12 @@ $(document).ready(function () { } // only select tables that are not inside an element with "news" (about page) or "card" (cv page) class - if ($(this).parents('[class*="news"]').length == 0 && $(this).parents('[class*="card"]').length == 0 && $(this).parents("code").length == 0) { + if ( + $(this).parents('[class*="news"]').length == 0 && + $(this).parents('[class*="card"]').length == 0 && + $(this).parents('[class*="archive"]').length == 0 && + $(this).parents("code").length == 0 + ) { // make table use bootstrap-table $(this).attr("data-toggle", "table"); // add some classes to make the table look better