Skip to content

Commit

Permalink
Merge pull request #682 from IATI/ui-tweaks
Browse files Browse the repository at this point in the history
UI tweaks
  • Loading branch information
Bjwebb authored Mar 5, 2025
2 parents 74ed45a + 99da951 commit 623bee6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 39 deletions.
13 changes: 13 additions & 0 deletions iati_dashboard/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,18 @@ a.popover-html:focus {
background-color: var(--color-teal-90);
padding: 0.2rem 0.6rem;
justify-content: space-between;
> h2 {
font-size: 1.5rem;
}
}

.dashboard-panel-heading__title {
color: #fff;
margin-top: 0;
margin-bottom: 0;
font-size: 1.2rem;
line-height: 1;
padding: 0.2rem;
}

.dashboard-panel-heading__titlenum {
Expand Down Expand Up @@ -171,3 +177,10 @@ the design system doesn't have a yellow colour */
.dashboard-mixed-flag:hover {
opacity: 0.5;
}

.iati-card {
border-top-width: 2px;
}
.iati-card p {
margin-top: 0;
}
28 changes: 0 additions & 28 deletions iati_dashboard/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,34 +189,6 @@ <h2 class="iati-footer-block__title">Useful links</h2>
</ul>
</div>
</div>
<div class="iati-footer-block">
<h2 class="iati-footer-block__title iati-footer-block__title--centered">
Sign up to our newsletter
</h2>
<div class="iati-footer-block__content">

<form class="iati-newsletter-form">
<div class="iati-newsletter-form__item">
<label for="newsletter-email" class="iati-newsletter-form__label">Email</label>
<input id="newsletter-email" type="text" class="iati-newsletter-form__input">
</div>
<div class="iati-newsletter-form__item">
<label for="newsletter-firstname" class="iati-newsletter-form__label">First name</label>
<input id="newsletter-firstname" type="text" class="iati-newsletter-form__input">
</div>
<div class="iati-newsletter-form__item">
<label for="newsletter-surname" class="iati-newsletter-form__label">Surname</label>
<input id="newsletter-surname" type="text" class="iati-newsletter-form__input">
</div>
<div class="iati-newsletter-form__item">
<button class="iati-newsletter-form__submit iati-button iati-button--submit">
Subscribe
</button>
</div>
</form>

</div>
</div>
</div>
</div>
<div class="iati-footer__section">
Expand Down
12 changes: 6 additions & 6 deletions iati_dashboard/templates/publisher.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ <h1>Publisher: {{ publisher_name[publisher] }}</h1>
<div class="dashboard-panel-body">
<ul>
<li><a href="#h_headlines">Headlines</a>
<li><a href="#h_errors">Data Quality</a>
<li><a href="#h_errors">Errors</a>
<ul>
{% if failure_count > 0 %}
<li><a href="#p_validation">Files Failing Validation</a>
<li><a href="#p_validation">Files Failing Schema Validation</a>
{% endif %}
{% if 1 in publisher_inverted.invalidxml.values() %}
<li><a href="#p_invalid">Files where XML is not well-formed</a>
Expand Down Expand Up @@ -111,7 +111,7 @@ <h2 id="h_headlines">Headlines</h2>
{% endfor %}
</td>
</tr><tr>
<td>Files failing validation</td>
<td>Files failing schema validation</td>
<td>
{{ failure_count }}
</td>
Expand All @@ -136,11 +136,11 @@ <h2 id="h_headlines">Headlines</h2>
</div>

<div class="row">
{{ boxes.box_h3('Files failing validation', publisher_stats.validation.get('fail',0), 'img/publishers/'+publisher+'_validation.png', publisher+'/validation.json', '', '-publisher') }}
{{ boxes.box_h3('Files failing schema validation', publisher_stats.validation.get('fail',0), 'img/publishers/'+publisher+'_validation.png', publisher+'/validation.json', '', '-publisher') }}
{{ boxes.box_h3('Files where XML is not well-formed', publisher_stats.invalidxml, 'img/publishers/'+publisher+'_invalidxml.png', publisher+'/invalidxml.json', '', '-publisher') }}
</div>

<h2 id="h_errors">Data Quality</h2>
<h2 id="h_errors">Errors</h2>

{% set data_quality_issue = false %}

Expand All @@ -149,7 +149,7 @@ <h2 id="h_errors">Data Quality</h2>
{% set data_quality_issue = true %}
<div class="col-md-6">
<div class="dashboard-panel" id="p_validation">
<div class="dashboard-panel-heading"><h3 class="dashboard-panel-heading__title" id="list_fail_validation">Files Failing Validation</h3></div>
<div class="dashboard-panel-heading"><h3 class="dashboard-panel-heading__title" id="list_fail_validation">Files Failing Schema Validation</h3></div>
<div class="dashboard-panel-body">
<table>
<thead>
Expand Down
6 changes: 2 additions & 4 deletions iati_dashboard/templates/section_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ <h2 class="dashboard-panel-heading__title">
</h2>
</div>
<nav>
<ul>
{% for item in (top_navigation if page=='index' else navigation[navigation_reverse[page]]) %}
<li>
<div class="iati-card">
<a href="{{ url(page_view_names[item]) }}">{{ page_titles[item] }}</a>
{% if item in page_leads %}
<p>{{ page_leads[item]|safe }}</p>
{% endif %}
</li>
</div>
{% endfor %}
</ul>
</nav>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion iati_dashboard/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
"org_ids",
],
"publishing_stats": [
"timeliness_timelag",
"timeliness_frequency",
"timeliness_timelag",
"forwardlooking",
"comprehensiveness_summary",
"comprehensiveness_core",
Expand Down

0 comments on commit 623bee6

Please sign in to comment.