aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/static/js/content
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-08-14 05:34:27 +0200
committerGravatar Hassan Abouelela <[email protected]>2022-08-14 05:46:36 +0200
commit45cdb27a82297ede18d7bd908213dde54fef06a9 (patch)
treeb31c1aa6fa7d9676837f7dd8488b5e5a8eed6b4f /pydis_site/static/js/content
parentMove Tag URL To Property And Add Group (diff)
Add Tag Group Support
Adds support for tag groups in content. This involves some modification to the routing, and templating. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/static/js/content')
-rw-r--r--pydis_site/static/js/content/listing.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/pydis_site/static/js/content/listing.js b/pydis_site/static/js/content/listing.js
index 3502cb2a..4b722632 100644
--- a/pydis_site/static/js/content/listing.js
+++ b/pydis_site/static/js/content/listing.js
@@ -4,6 +4,11 @@
function trimTag() {
const containers = document.getElementsByClassName("tag-container");
for (const container of containers) {
+ if (container.textContent.startsWith("Contains the following tags:")) {
+ // Tag group, no need to trim
+ continue;
+ }
+
// Remove every element after the first two paragraphs
while (container.children.length > 2) {
container.removeChild(container.lastChild);