Skip to content

Commit

Permalink
Merge pull request #457 from GSA-TTS/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
ximekilgsa authored Oct 8, 2024
2 parents 76e6a99 + 25ac56b commit acff235
Show file tree
Hide file tree
Showing 21 changed files with 503 additions and 280 deletions.
14 changes: 11 additions & 3 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,17 @@ module.exports = function (config) {

// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
config.addFilter("htmlDateString", (dateObj) => {
return DateTime.fromJSDate(dateObj, { zone: "America/New_York" }).toFormat(
"yyyy-LL-dd",
);
if (dateObj !== undefined && dateObj !== null) {
let dateTime = DateTime.fromJSDate(dateObj);

// If working locally, add one day to the date to match what is in the actual environments.
if (baseUrl.includes("localhost")) {
dateTime = dateTime.plus({ days: 1 });
return dateTime.toFormat("yyyy-LL-dd");
} else {
return dateTime.toFormat("yyyy-LL-dd");
}
}
});

// Get the first `n` elements of a collection.
Expand Down
4 changes: 2 additions & 2 deletions _data/assetPaths.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"app.js": "/assets/js/app-U5OIPSUD.js",
"app.map": "/assets/js/app-U5OIPSUD.js.map",
"uswds.js": "/assets/js/uswds-init.js",
"styles.css": "/assets/styles/styles-6QTB7FLT.css",
"styles.map": "/assets/styles/styles-6QTB7FLT.css.map"
"styles.css": "/assets/styles/styles-EQTR2GJL.css",
"styles.map": "/assets/styles/styles-EQTR2GJL.css.map"
}
6 changes: 2 additions & 4 deletions _data/global_info_sessions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
---
- link: https://gsa.zoomgov.com/meeting/register/vJIsc-qhqj0jHl6nkKV8IA7TyuNDlxlHeV8
date: 2024-10-17
time-et: 12:30-1:30pm ET
time-pt: 9:30-10:30am PT
time: 12:30pm-1:30pm

- link: https://gsa.zoomgov.com/webinar/register/WN_xKx0akUhTLClTGto7jmXeQ#
date: 2024-11-21
time-et: 12:30-1:30pm ET
time-pt: 9:30-10:30am PT
time: 12:30pm-1:30pm
10 changes: 2 additions & 8 deletions _includes/layouts/jointts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ <h1>{{ title }}</h1>
</div>
<div class="grid-row grid-gap">
<div class="desktop:grid-col-8 usa-prose">
<!-- Open Jobs -->
<h2 id="open-positions">Open positions</h2>
<p>We are hiring and will be sharing upcoming jobs and open positions as they are available.</p>
{% include "layouts/jointts/open-jobs.html" %}

<!-- Upcoming Jobs -->
<h2>Upcoming positions</h2>
{% include "layouts/jointts/upcoming-jobs.html" %}
<!-- Jobs -->
{% include "layouts/jointts/jobs.html" %}

<!-- Other Opportunities -->
<h2>Other GSA Opportunities</h2>
Expand Down
11 changes: 1 addition & 10 deletions _includes/layouts/jointts/info-sessions-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@
<div class="usa-summary-box">
<div class="usa-summary-box__body">
<h3 class="usa-summary-box__heading">Join an info session</h3>
<div class="usa-summary-box__text">
<div class="usa-summary-box__text" id="global-info-sessions-wrapper">
<p>Join us at one of our monthly online information sessions. Come learn more about working at TTS, available positions, and our application process. Register for a session below.</p>
<ul>
{% for session in sorted_info_sessions %}
<li class="info-session" data-session-end-timestamp="{{ sessionEndTimestamp }}">
<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>
{% endfor %}
</ul>
</div>
</div>
</div>
Expand Down
57 changes: 0 additions & 57 deletions _includes/layouts/jointts/job-listing-info-sessions.html

This file was deleted.

77 changes: 3 additions & 74 deletions _includes/layouts/jointts/job-listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
layout: layouts/default
---

{% if info_sessions.size > 0 %}
{%- assign sorted_info_sessions = info_sessions | sort: 'date' -%}
{% else %}
{%- assign sorted_info_sessions = global_info_sessions | sort: 'data' -%}
{% endif %}

{% capture state %}{% getStateFromDates opens closes %}{% endcapture %}

<div class="grid-container">
Expand All @@ -27,74 +21,6 @@ <h1>{{ title }}</h1>
{% endif %}

<div class="grid-row grid-gap padding-top-4">
<div class="desktop:grid-col-4 desktop:margin-top-0" style="order:1">
{% assign now = 'now' | date: "%s" %}
{% assign future_sessions = false %}

{% for session in sorted_info_sessions %}
<!-- Format the date for comparison -->
{% assign session_date = session.date | date: "%Y-%m-%d" %}

<!-- Extract ET time range from session.time (e.g., "1:00-2:00pm ET") -->
{% assign time_et = session.time | split: " ET" | first %}

<!-- Extract start time and end time (e.g., "1:00pm" and "2:00pm") -->
{% assign session_end_time = time_et | split: "-" | last | strip %}

<!-- Combine the date with the start and end times -->
{% assign session_end_str = session_date | append: " " | append: session_end_time %}

{% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %}

<!-- Check if session is still upcoming or ongoing -->
{% if sessionEndTimestamp > now %}
{% assign future_sessions = true %}
{% break %}
{% endif %}
{% endfor %}

{% if future_sessions %}
<div class="usa-summary-box">
<div class="usa-summary-box__body">
<h3 class="usa-summary-box__heading">
Attend an information session for this position
</h3>
<div class="usa-summary-box__text" markdown="1">
Attend an information session to learn more about these roles, working at TTS, and our application process. Register for a session using the links below.
<ul class="info-sessions-list">
{% for session in sorted_info_sessions %}
<!-- Format the date for comparison -->
{% assign session_date = session.date | date: "%Y-%m-%d" %}

<!-- Extract ET time range from session.time (e.g., "1:00-2:00pm ET") -->
{% assign time_et = session.time | split: " ET" | first %}

<!-- Extract start time and end time (e.g., "1:00pm" and "2:00pm") -->
{% assign session_end_time = time_et | split: "-" | last | strip %}

<!-- Combine the date with the start and end times -->
{% assign session_end_str = session_date | append: " " | append: session_end_time %}

{% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %}

{{ session_end_time }}
{{ sessionEndTimestamp }}
{{ now }}

<!-- Show if session is still ongoing or upcoming -->
{% if sessionEndTimestamp > now %}
<li data-session-end-timestamp="{{ sessionEndTimestamp }}">
<p><a href="{{ session.link | url }}">{{ session.date | date: "%A, %B %d, %Y" }}</a> at {{session.time}}</p>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}
</div>

<div class="desktop:grid-col-8 usa-prose" markdown="1">
{% if updated %}
{% assign updated_date = updated | date: "%B %d, %Y" %}
Expand All @@ -112,6 +38,9 @@ <h3 class="usa-summary-box__heading">
{% endif %}
{% include "layouts/jointts/job/how_to_apply.html" %}
</div>
<div class="desktop:grid-col-4 desktop:margin-top-0" id="job-listing-info-sessions">
<!-- Info Sessions -->
</div>
</div>
</div>
</div>
Expand Down
12 changes: 9 additions & 3 deletions _includes/layouts/jointts/job/how_to_apply.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ <h3 class="usa-alert-heading">This job posting has closed.</h3>
{% endif %}
</p>
{% elsif state == 'open' %}
<p class="usa-alert-text">This role is open for applications until {{ closes | date: "%A, %B %d, %Y" }} at 11:59PM ET.
Please fill out all applicable fields. <a href="{{ application_link }}" target="_blank">Click here to apply</a>.
</p>
{% if max_applications != 0 %}
<p class="usa-alert-text">This role is open for applications until {{ closes | date: "%A, %B %d, %Y" }} at 11:59PM ET or until {{max_applications}} applications have been received.
Please fill out all applicable fields. <a href="{{ application_link }}" target="_blank">Click here to apply</a>.
</p>
{% else %}
<p class="usa-alert-text">This role is open for applications until {{ closes | date: "%A, %B %d, %Y" }} at 11:59PM ET.
Please fill out all applicable fields. <a href="{{ application_link }}" target="_blank">Click here to apply</a>.
</p>
{% endif %}
<p><strong>Need Assistance in applying or have questions regarding this job opportunity, please email the
TTS Talent Team at <a href="mailto:jointts@gsa.gov">jointts@gsa.gov</a>.</strong></p>
{% endif %}
8 changes: 7 additions & 1 deletion _includes/layouts/jointts/job/status_alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ <h3 class="usa-alert-heading">Coming soon</h3>
<div class="usa-alert usa-alert-info">
<div class="usa-alert-body">
<h3 class="usa-alert-heading">Apply now!</h3>
<p class="usa-alert-text">This role is open for applications until {{ closes | date: "%A, %B %d, %Y" }}.</p>
{% if max_applications != 0 %}
<p class="usa-alert-text">
This role is open for applications until {{ closes | date: "%A, %B %d, %Y" }} at 11:59PM ET or until {{max_applications}} applications have been received.
</p>
{% else %}
<p class="usa-alert-text">This role is open for applications until {{ closes | date: "%A, %B %d, %Y" }}.</p>
{% endif %}
</div>
</div>
{% endif %}
12 changes: 12 additions & 0 deletions _includes/layouts/jointts/jobs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Open Jobs -->
<section class="open-jobs">
<h2 id="open-positions">Open positions</h2>
<p>We are hiring and will be sharing upcoming jobs and open positions as they are available.</p>
</section>

<section class="upcoming-jobs">
<h2 id="upcoming-positions">Upcoming positions</h2>
</section>



29 changes: 0 additions & 29 deletions _includes/layouts/jointts/open-jobs.html

This file was deleted.

38 changes: 0 additions & 38 deletions _includes/layouts/jointts/upcoming-jobs.html

This file was deleted.

Loading

0 comments on commit acff235

Please sign in to comment.