Skip to content

Commit

Permalink
Merge pull request #16 from GSA-TTS/site-style-and-content-updates
Browse files Browse the repository at this point in the history
Minor updates to the site
  • Loading branch information
natashapl authored Apr 2, 2024
2 parents 796412c + 531da9e commit a93dfd3
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 23 deletions.
4 changes: 2 additions & 2 deletions _data/assetPaths.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"admin.map": "/assets/js/admin-C7YAUYZM.js.map",
"app.js": "/assets/js/app-DBWFVBND.js",
"app.map": "/assets/js/app-DBWFVBND.js.map",
"index.css": "/assets/styles/index-TY2KJRCJ.css",
"index.map": "/assets/styles/index-TY2KJRCJ.css.map"
"index.css": "/assets/styles/index-UHUJ6A2J.css",
"index.map": "/assets/styles/index-UHUJ6A2J.css.map"
}
26 changes: 14 additions & 12 deletions _includes/filterpanel.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ <h4 class="site-preview-heading">Resource Level</h4>
value="national" data-section-id="national-mutual-aid-section" checked />
<label class="usa-checkbox__label" for="national">National</label>
</div>
<div class="contentRow">
<input class="usa-button" type="submit" value="Apply" />
</div>
</section>
</fieldset>
</form>
Expand Down Expand Up @@ -80,18 +83,17 @@ <h4 class="site-preview-heading">Resource Level</h4>
return newUrl;
}

// Attach event listener directly to state dropdown
const stateSelect = document.getElementById('state');
if (stateSelect) {
stateSelect.addEventListener('change', function () {
var selectedState = this.value;
if (/^[A-Za-z]{2}$/.test(selectedState)) {
window.location.href = buildStateUrl(selectedState);
} else {
console.error('Invalid state selected');
}
});
}
//Attach event listener directly to state dropdown after submit
document.getElementById('stateForm').addEventListener('submit', function(event) {
event.preventDefault();
var selectedState = document.getElementById('state').value;
if (/^[A-Za-z]{2}$/.test(selectedState)) {
var encodedState = encodeURIComponent(selectedState);
window.location.href = buildStateUrl(encodedState);
} else {
console.error('Invalid state selected');
}
});

// Event listener for checkboxes
document.querySelectorAll('.filter-checkbox').forEach(function (checkbox) {
Expand Down
8 changes: 5 additions & 3 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="usa-footer site-footer" role="contentinfo">
<div class="footer-section-bottom bg-base-lighter" style="background-color: #3D4551; color: white;">
<div class="footer-section-bottom">
<div class="grid-container">
<div class="grid-row padding-3">
<div class="tablet:grid-col">
Expand Down Expand Up @@ -31,8 +31,10 @@ <h5>Partner sites</h4>
</div>
<div class="tablet:grid-col">
<div class="logo-links">
<a class="footer-logo media_link" href="https://cloud.gov">
{% image_with_class "./theme/img/logo-img.png" "Agency logo" %}
<a class="footer-logo media_link" href="{{ '/' | url }}">
<div class="usa-logo">
<img alt="10x Bring Mutual Aid logo" src="{{ '/assets/img/bm-logo.svg' | url }}">
</div>
</a>
</div>
<div style="font-size: smaller;">
Expand Down
5 changes: 0 additions & 5 deletions _includes/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@

{% include "footer.html" %}

<!-- {% comment %} Hide SVG Sprites {% endcomment %}
<div style="display: none;">
{% usa_icons_sprite %}
{% uswds_icons_sprite %}
</div> -->
</div>

{% include "scripts.html" %}
Expand Down
5 changes: 5 additions & 0 deletions _includes/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
<meta name="MobileOptimized" content="320" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

{% if item %}
<title>{{ item.State }} | {{ site.title -}}</title>
{% else %}
<title>{{ title }} | {{ site.title -}}</title>
{% endif %}

<meta property="og:site_name" content="{{- site.title -}}">
<meta property="og:title" content="{{- title }} | {{ site.title -}}">

Expand Down
3 changes: 2 additions & 1 deletion pages/states.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ pagination:
size: 1
alias: item
addAllPagesToCollections: true
title: '{{ item.State }}'
permalink: "/states/{{ item.Abbr | slug }}/index.html"
---
---
19 changes: 19 additions & 0 deletions theme/styles/_templates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ body {
margin: 0;
}

iframe:focus,
[href]:focus,
[tabindex]:focus,
[contentEditable=true]:focus {
outline: 1px auto color('blue-40v');
outline-offset: 0.3rem;
}

.usa-app {
box-sizing: border-box;
min-height: 100%;
Expand Down Expand Up @@ -356,11 +364,22 @@ body {
.usa-checkbox {
background: none;
}

.usa-button {
width: 100%;
}
}
}

.usa-footer {
background: color('gray-cool-70');
color: white;
flex-shrink: 0;
font-size: size('body', 5);

h5 {
font-size: size('heading', 5);
}

ul {
li {
Expand Down

0 comments on commit a93dfd3

Please sign in to comment.