Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Commit

Permalink
fix(ui): fix collapse issue with libraries that contain spaces in the…
Browse files Browse the repository at this point in the history
… name (#268)
  • Loading branch information
ReenigneArcher authored Dec 12, 2023
1 parent 92425f7 commit 81191f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions Contents/Code/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def cache_data():

# add each section to the items dict
items[section.key] = dict(
key=section.key,
title=section.title,
agent=section.agent,
items=[],
Expand Down
10 changes: 5 additions & 5 deletions Contents/Resources/web/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

{% for section in items %}
<!-- Library sections -->
<section class="py-5 offset-anchor" id="{{ items[section]['title'] }}">
<section class="py-5 offset-anchor" id="section_{{ items[section]['key'] }}">
<div class="row">
<div class="col-12 d-flex justify-content-between align-items-center">
<!-- Section title -->
<h1 class="text-white">{{ items[section]['title'] }}</h1>
<!-- Collapse/Expand button -->
<h2><a class="text-black" role="button" data-bs-toggle="collapse"
data-bs-target="#{{ items[section]['title'] }}_collapse" aria-expanded="false"
aria-controls="{{ items[section]['title'] }}_collapse"
data-bs-target="#section_{{ items[section]['key'] }}_collapse" aria-expanded="false"
aria-controls="section_{{ items[section]['key'] }}_collapse"
onclick="toggleArrow(this)">
<i class="text-white fas fa-caret-up" id="{{ items[section]['title'] }}_arrow"></i>
<i class="text-white fas fa-caret-up" id="section_{{ items[section]['key'] }}_arrow"></i>
</a></h2>
</div>
</div>
Expand Down Expand Up @@ -90,7 +90,7 @@ <h2><a class="text-black" role="button" data-bs-toggle="collapse"
<!-- table -->
<div class="row">
<div class="col-12">
<div class="collapse show" id="{{ items[section]['title'] }}_collapse">
<div class="collapse show" id="section_{{ items[section]['key'] }}_collapse">
<table class="table table-sm table-bordered border-dark caption-top">
<caption>{{ items[section]['title'] }}</caption>
<tr class="d-flex table-dark">
Expand Down

0 comments on commit 81191f0

Please sign in to comment.