From d882d73b5ae6990e6a94a49e649b66d6cefe08f4 Mon Sep 17 00:00:00 2001 From: Maximus7474 Date: Sun, 20 Oct 2024 13:00:26 +0200 Subject: [PATCH] refactor: got round edges on the thead -> hacky method but works --- web/main/resources.ejs | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/web/main/resources.ejs b/web/main/resources.ejs index bb81af915..47c99f7db 100644 --- a/web/main/resources.ejs +++ b/web/main/resources.ejs @@ -12,6 +12,25 @@ .fix-pill-form { min-width: 65px; } + .table { + border-spacing: 0; + border-collapse: separate; + border-radius: 10px; + /* border: 1px solid black; */ + } + thead.expanded { + border-radius: 0; + border-spacing: 1; + border-collapse: collapse; + /* border-bottom-left-radius: 0; + border-bottom-right-radius: 0; */ + } + body.theme--dark .table .thead-light th { + border-spacing: 0; + border-collapse: separate; + border-radius: 10px; + overflow: hidden; + }
@@ -67,10 +86,10 @@
<% for (const resGroup of resGroups) { %> -
+
- +
<%= resGroup.subPath %> @@ -380,6 +399,7 @@ function toggleResGroup(groupCardElement, single, show) { + const thead = groupCardElement.querySelector('thead'); const tbody = groupCardElement.querySelector("tbody"); const icon = groupCardElement.querySelector('.toggle-icon i'); if (show === undefined) { @@ -387,6 +407,7 @@ } const groupDivName = groupCardElement.id.split('-').pop(); if (show) { + thead.classList.add('expanded'); tbody.classList.remove('collapse'); icon.classList.remove('icon-arrow-down'); icon.classList.add('icon-arrow-up'); @@ -395,6 +416,7 @@ } collapsedGroups.delete(groupDivName); } else { + thead.classList.remove('expanded'); tbody.classList.add('collapse'); icon.classList.add('icon-arrow-down'); icon.classList.remove('icon-arrow-up');