Skip to content

Commit

Permalink
Merge pull request #136 from DDMAL/ui-fix
Browse files Browse the repository at this point in the history
UI fix
  • Loading branch information
yinanazhou authored Jul 24, 2024
2 parents 3214b63 + 57a81c6 commit fc6d596
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
<span class="text-start">View</span>
<input type="radio"
class="btn-check option-radio"
name="options-group2"
id="20"
autocomplete="off" />
<label class="btn" title="View 20 entries per page" for="20">20</label>
<label class="col-form-label mb-1">|</label>
<input type="radio"
class="btn-check option-radio"
name="options-group2"
id="50"
autocomplete="off" />
<label class="btn" title="View 50 entries per page" for="50">50</label>
<label class="col-form-label mb-1">|</label>
<input type="radio"
class="btn-check option-radio"
name="options-group2"
id="100"
autocomplete="off" />
<label class="btn" title="View 100 entries per page" for="100">100</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,24 @@ <h4>######</h4>
<h4 class="ms-3 me-2 my-auto">
<small>INSTRUMENT LIST</small>
</h4>
<div class="dropdown mx-2 notranslate" id="instrument-language-element">
<div class="dropdown mx-2 notranslate"
id="instrument-language-element"
data-bs-toggle="tooltip"
data-bs-title="Instrument Name Language"
aria-label="Instrument Name Language"
aria-pressed="true">
<button class="btn btn-warning dropdown-toggle position-relative py-0"
type="button"
aria-expanded="false"
data-bs-toggle="dropdown"
data-bs-title="Instrument name language">
{{ active_language.autonym|title }}
</button>
<ul class="dropdown-menu">
<ul class="dropdown-menu umil-dropdown-menu">
{% for language in languages %}
<li>
<a class="dropdown-item" href="?language={{ language.en_label }}">{{ language.autonym|title }}</a>
<a class="dropdown-item umil-dropdown-item"
href="?language={{ language.en_label }}">{{ language.autonym|title }}</a>
</li>
{% endfor %}
</ul>
Expand Down
11 changes: 8 additions & 3 deletions web-app/django/VIM/static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,22 @@ header {
font-family: 'Noto Sans', sans-serif;
}

.login-btn:hover {
.login-btn:hover,
.login-btn:focus {
color: #435334;
border: 1px solid #faf1e4;
background-color: #faf1e4;
}

.dropdown-menu {
.umil-dropdown-menu {
background-color: #faf1e4;
}

.dropdown-item:hover {
.umil-dropdown-item {
color: #435334;
}

.umil-dropdown-item:hover {
background-color: #cedebd;
}

Expand Down
2 changes: 1 addition & 1 deletion web-app/django/VIM/static/js/LanguageTooltip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const tooltipTriggerList = document.querySelectorAll(
'[data-bs-toggle="tooltip"], [data-bs-toggle="dropdown"]'
'[data-bs-toggle="tooltip"]'
);
const tooltipList = [...tooltipTriggerList].map(
(tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl)
Expand Down
13 changes: 8 additions & 5 deletions web-app/django/VIM/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,20 @@
</form>
<div class="text-end d-flex">
{% if user.is_authenticated %}
<div class="dropdown me-3">
<button class="btn dropdown-toggle"
<div class="dropdown me-2">
<button class="btn dropdown-toggle login-btn"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false">{{ user.username }}</button>
<ul class="dropdown-menu" aria-labelledby="userDropdown">
<ul class="dropdown-menu umil-dropdown-menu"
aria-labelledby="userDropdown">
<li>
<a class="dropdown-item" href="{% url 'main:change_password' %}">Change Password</a>
<a class="dropdown-item umil-dropdown-item"
href="{% url 'main:change_password' %}">Change Password</a>
</li>
<li>
<a class="dropdown-item" href="{% url 'main:logout' %}">Log out</a>
<a class="dropdown-item umil-dropdown-item"
href="{% url 'main:logout' %}">Log out</a>
</li>
</ul>
</div>
Expand Down

0 comments on commit fc6d596

Please sign in to comment.