diff options
| author | 2022-08-14 05:34:27 +0200 | |
|---|---|---|
| committer | 2022-08-14 05:46:36 +0200 | |
| commit | 45cdb27a82297ede18d7bd908213dde54fef06a9 (patch) | |
| tree | b31c1aa6fa7d9676837f7dd8488b5e5a8eed6b4f /pydis_site/static | |
| parent | Move 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')
| -rw-r--r-- | pydis_site/static/css/content/color.css | 7 | ||||
| -rw-r--r-- | pydis_site/static/css/content/tag.css | 8 | ||||
| -rw-r--r-- | pydis_site/static/js/content/listing.js | 5 |
3 files changed, 12 insertions, 8 deletions
diff --git a/pydis_site/static/css/content/color.css b/pydis_site/static/css/content/color.css new file mode 100644 index 00000000..f4801c28 --- /dev/null +++ b/pydis_site/static/css/content/color.css @@ -0,0 +1,7 @@ +.content .fa-github { + color: black; +} + +.content .fa-github:hover { + color: #7289DA; +} diff --git a/pydis_site/static/css/content/tag.css b/pydis_site/static/css/content/tag.css index a3db046c..ec45bfc7 100644 --- a/pydis_site/static/css/content/tag.css +++ b/pydis_site/static/css/content/tag.css @@ -1,11 +1,3 @@ -h1.title a { - color: black; -} - -h1.title a:hover { - color: #7289DA; -} - .content a * { /* This is the original color, but propagated down the chain */ /* which allows for elements inside links, such as codeblocks */ 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); |