Skip to content

Commit

Permalink
Fix 3D-tag not working (#210)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jukent authored Jun 12, 2024
1 parent 2370c4b commit c1cc880
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
5 changes: 4 additions & 1 deletion site/_extensions/gallery_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -137,7 +140,7 @@ def _generate_tag_menu(repo_dicts, tag_key):
tag_list = sorted(tag_set)

options = "".join(
f'<li><label class="dropdown-item checkbox {tag_key}"><input type="checkbox" rel={tag.replace(" ", "-").lower()} onchange="change();">&nbsp;{tag}</label></li>'
f'<li><label class="dropdown-item checkbox {tag_key}"><input type="checkbox" rel={_make_class(tag)} onchange="change();">&nbsp;{tag}</label></li>'
for tag in tag_list
)

Expand Down
22 changes: 15 additions & 7 deletions site/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit c1cc880

Please sign in to comment.