Skip to content

Commit

Permalink
Merge pull request #410 from GSA-TTS/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
ximekilgsa authored Sep 30, 2024
2 parents 9972333 + ff215ee commit c623b65
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
elif [ -n "${GITHUB_HEAD_REF:-}" ] ; then
echo "${GITHUB_HEAD_REF}/"
else
echo "echo-summer20203/"
echo "staging/"
fi
echo -n "DELAY_SECONDS="
Expand Down
2 changes: 1 addition & 1 deletion _includes/info_sessions.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ul>
{% for session in future_sessions %}
<li>
<a href="{{ session.link }}">{{ session.date | human_friendly }}</a
<a href="{{ session.link | url }}">{{ session.date | human_friendly }}</a
><br />at {{ session.time }}
</li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/layouts/jointts/info-sessions-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h3 class="usa-summary-box__heading">Find out more</h3>

{% if sessionEndTimestamp > now %}
<li class="info-session" data-session-end-timestamp="{{ sessionEndTimestamp }}">
<a target="_blank" href="{{ session.link }}" rel="noopener">{{ session.date | date: "%A, %B %d, %Y" }}</a>
<a target="_blank" href="{{ session.link | url }}" rel="noopener">{{ session.date | date: "%A, %B %d, %Y" }}</a>
<p>{{ session.time-et }}</p>
<p>({{ session.time-pt }})</p>
</li>
Expand Down
2 changes: 1 addition & 1 deletion _includes/layouts/jointts/job-listing-info-sessions.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<!-- Show if session is still ongoing or upcoming -->
{% if sessionEndTimestamp > now %}
<li data-session-end-timestamp="{{ sessionEndTimestamp }}">
<p><a href="{{ session.link }}" target="_blank">{{ session.headline }}</a> at {{ session.time }}</p>
<p><a href="{{ session.link | url }}" target="_blank">{{ session.date | date: "%A, %B %d, %Y" }}</a> at {{ session.time }}</p>
</li>
{% endif %}
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/layouts/jointts/job-listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3 class="usa-summary-box__heading">
{% assign session_date = session.date | date: "%s" %}
{% if session_date > now %}
<li class="info-session">
<p><a href="{{session.link}}">{{session.headline}}</a> at {{session.time}}</p>
<p><a href="{{ session.link | url }}">{{session.headline}}</a> at {{session.time}}</p>
</li>
{% endif %}
{% endfor %}
Expand Down
28 changes: 22 additions & 6 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,29 @@
<script>
function hidePastInfoSessions() {
const now = new Date().toLocaleString("en-US", { timeZone: "America/New_York" });
const currentTimestamp = new Date(now).getTime();
const currentTimestamp = Math.floor(new Date(now).getTime() / 1000);

const infoSessions = document.querySelectorAll(".info-sessions-list li");
infoSessions.forEach(session => {
const session_timestamp = parseInt(session.getAttribute('data-session-end-timestamp'), 10);
if (session_timestamp < currentTimestamp) {
session.style.display = 'none';
const infoSessionsGroup = document.querySelectorAll(".info-sessions-list");
infoSessionsGroup.forEach(sessionGroup => {
let visibleSessions = 0;

// Convert sessionGroup.children to an array and loop over them
Array.from(sessionGroup.children).forEach(session => {
const session_timestamp = session.getAttribute('data-session-end-timestamp');

// Hide past sessions
if (session_timestamp < currentTimestamp) {
session.style.display = 'none'; // Hide past session
} else {
visibleSessions++; // Count future session
}
});

if (visibleSessions === 0) {
const asideParent = sessionGroup.closest('aside');
if (asideParent) {
asideParent.style.display = 'none';
}
}
});
}
Expand Down
5 changes: 2 additions & 3 deletions pages/jointts/positions/login-gov-data-analyist.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ updated:

# BASIC INFO
# The basic information and details of the position
info_intro:
info_intro: Open to U.S. citizens or nationals (residents of American Samoa and Swains Island). Subject to background check. Full information is available on [USAJOBS](https://www.usajobs.gov/job/810717200).

supervisory_status: Non-Supervisory

Expand Down Expand Up @@ -127,8 +127,7 @@ key_objectives:
info_sessions:
- link: https://gsa.zoomgov.com/meeting/register/vJItdOqgqD4vHGCXn9G1ijf1wVX1fXFCZW4
date: 2024-10-01
headline: Tuesday, October 1, 2024
time: 3:00pm-4:00pm EST (12:00pm - 1:00pm PT)
time: 3:00pm-4:00pm ET (12:00pm - 1:00pm PT)

# Make sure to leave the | on the first line. Start your content on the following line.
role_summary: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ updated:

# BASIC INFO
# The basic information and details of the position
info_intro:
info_intro: Open to U.S. citizens or nationals (residents of American Samoa and Swains Island). Subject to background check. Full information is available on [USAJOBS](https://www.usajobs.gov/job/810717200).

supervisory_status: Non-Supervisory

Expand Down
2 changes: 1 addition & 1 deletion pages/jointts/positions/position-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ updated:

# BASIC INFO
# The basic information and details of the position
info_intro:
info_intro: Open to U.S. citizens or nationals (residents of American Samoa and Swains Island). Subject to background check. Full information is available on [USAJOBS](https://www.usajobs.gov/job/810717200).

supervisory_status:

Expand Down

0 comments on commit c623b65

Please sign in to comment.