From c1cc880b5d595c0a8c231be87858e507bfcf3b49 Mon Sep 17 00:00:00 2001 From: Julia Kent <46687291+jukent@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:58:43 -0600 Subject: [PATCH] Fix 3D-tag not working (#210) * drop down menu without bullets * css and remove === * make subtext black * mess with javascript * jv edits * filtering working! * fix card margins, tag titling, and clear all filters * add all cookbooks back * fix merge conflicts * undo subtext changes * fix rel pointing to class starting with a number * rm duplicate cookbooks * fix button styling - color change on click --- site/_extensions/gallery_generator.py | 5 ++++- site/_static/custom.css | 22 +++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/site/_extensions/gallery_generator.py b/site/_extensions/gallery_generator.py index 00eb212..06b0141 100644 --- a/site/_extensions/gallery_generator.py +++ b/site/_extensions/gallery_generator.py @@ -117,6 +117,9 @@ def _generate_sorted_tag_keys(repo_dicts): def _title_case_preserve(s): return re.sub(r'\b(\w)', lambda m: m.group(1).upper(), s) +def _make_class(s): + return re.sub(r'^\d+', '', s.replace(" ", "-").lower()) + def _generate_tag_set(repo_dicts, tag_key=None): tag_set = set() @@ -137,7 +140,7 @@ def _generate_tag_menu(repo_dicts, tag_key): tag_list = sorted(tag_set) options = "".join( - f'
  • ' + f'
  • ' for tag in tag_list ) diff --git a/site/_static/custom.css b/site/_static/custom.css index d9e0cdb..09685e3 100644 --- a/site/_static/custom.css +++ b/site/_static/custom.css @@ -178,24 +178,32 @@ details.sd-dropdown summary.sd-card-header + div.sd-summary-content { border-radius: calc(.25rem - 1px); } -.bd-content .sd-card .sd-card-header { - background-color: var(--pst-color-panel-background) !important; -} - .sd-summary-content.sd-card-body.docutils { position: absolute; z-index: 100; } -details.sd-dropdown summary.sd-card-header { - border: 0.2rem solid var(--pst-sd-dropdown-color) !important; - border-radius: calc(.25rem - 1px); +details.sd-dropdown:not([open])>.sd-card-header { + background-color: white !important; + border: 2px solid #1a648f !important; + color: #1a648f; + border-radius: .5rem; +} + +details.sd-dropdown[open]>.sd-card-header { + background-color: #1a648f !important; + color: white; + border-radius: .5rem; } p { color: black; } +main.bd-content #main-content a { + color: #1a648f; +} + .sd-col.sd-d-flex-row.docutils.has-visible-card { margin-bottom: 1rem; }