Skip to content

Commit 5de5991

Browse files
Bryan QuigleyBryanQuigley
authored andcommitted
Several UI Tweaks - categories, but mostly datasets page
* Drop old Add-categories linl * UI: Sidebar: Increase spacing between Categories and Organizations * The original suggestion was Change count pill for selected category and X button to white background with Tim's suggestion moved to bg-light text-dark. Also changed in datasets.html to use primary blue. * UI: Results: Increase spacing to make list more legible. I just added top spacing to datasets to the separator is more in the middle.
1 parent a281c4e commit 5de5991

File tree

6 files changed

+75
-18
lines changed

6 files changed

+75
-18
lines changed

categories.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
---
66
{% include breadcrumbs.html %}
77

8-
<a href="{{ site.baseurl }}/add-category/" class="btn btn-outline-secondary float-end admin-only" data-hook="add-category-btn"><i class="fa fa-plus"></i> Add category</a>
9-
108
{% for category in site.dataset_categories %}
119
{% assign dataset_count = site.datasets | where:"category", category.name | size %}
1210
<div class="d-flex">

css/main.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ input[data-hook=search-query] {
1818
dataset {
1919
display: block;
2020
border-bottom: 1px #d6d6d6 solid;
21-
padding-bottom: 20px;
21+
padding-bottom: 10px;
22+
padding-top: 10px;
2223
}
2324

2425
.list-group-item-truncate {

datasets.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ <h3>Categories</h3>
1515
{% assign count = site.datasets | where: "category", category.name | size %}
1616
<a href="{{ site.baseurl }}{{ category.url }}" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
1717
{{ category.name }}
18-
<span class="badge bg-secondary rounded-pill">{{ count }}</span>
18+
<span class="badge bg-primary rounded-pill">{{ count }}</span>
1919
</a>
2020
{% endfor %}
2121
</div>
22-
22+
<br/>
2323
<h3>Organizations</h3>
2424
<div class="list-group js-shown" data-component="organizations-filter" data-show="15"></div>
2525
<div class="list-group js-hidden">
2626
{% for organization in site.organizations %}
2727
{% assign count = site.datasets | where: "organization", organization.title | size %}
2828
<a href="{{ site.baseurl}}{{ organization.url }}" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
2929
{{ organization.title }}
30-
<span class="badge bg-secondary rounded-pill">{{ count }}</span>
30+
<span class="badge bg-primary rounded-pill">{{ count }}</span>
3131
</a>
3232
{% endfor %}
3333
</div>

scripts/dist/legacy/index.js

Lines changed: 26 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/dist/modern/index.js

Lines changed: 41 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/src/templates/list-group-item.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ export default (data) => (
22
`<a href="${data.url}" class="list-group-item${data.selected ? ' active ' : ''} list-group-item-action d-flex justify-content-between align-items-center">
33
${data.title}
44
<span>
5-
${data.selected ? '<span class="badge bg-secondary rounded-pill"><i class="fa fa-times"></i></span>' : ''}
6-
<span class="badge bg-secondary rounded-pill">${data.count}</span>
5+
${data.selected ? '<span class="badge bg-light text-dark rounded-pill"><i class="fa fa-times"></i></span>' : ''}
6+
${data.selected ? '<span class="badge bg-light text-dark rounded-pill">' : '<span class="badge bg-primary rounded-pill">'}
7+
${data.count}</span>
78
</span>
89
</a>`
910
)

0 commit comments

Comments
 (0)