Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates to the site #16

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading