Skip to content

Dropdown manipulation #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ site/_build/
site/index.md
dist/
cookbook-submission-input.txt

# IDEs
.vscode/
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ dependencies:
- pre-commit
- pyyaml
- sphinx-pythia-theme
- yaml
- requests
14 changes: 4 additions & 10 deletions site/_extensions/gallery_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,14 @@ 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(" ", "-")} onchange="change();">&nbsp;{tag}</label></li>'
f'<label class="dropdown-item checkbox {tag_key}"><input type="checkbox" rel={tag.replace(" ", "-")} onchange="change();">&nbsp;{tag}</label>'
for tag in tag_list
)

return f"""
<div class="dropdown">

<button class="btn btn-sm btn-outline-primary mx-1 dropdown-toggle" type="button" id="{tag_key}Dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{tag_key.title()}
</button>
<ul class="dropdown-menu" aria-labelledby="{tag_key}Dropdown">
{options}
</ul>
</div>
:::{{dropdown}} {tag_key.title()}
{options}
:::
"""


Expand Down
11 changes: 11 additions & 0 deletions site/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,14 @@ main.banner-main #project-pythia {
.tagsandbadges {
padding: 0 0;
}

details.sd-dropdown summary.sd-card-header {
padding-bottom: 0;
padding-top: 0;
box-shadow: none !important;
background-color: white;
border-left: none !important;
border: 1rem !important;
--pst-sd-dropdown-color: white;
--pst-sd-dropdown-bg-color: white;
}
Loading