From f8081b145855341b3b47da58567dbe8537f0ce6c Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 10:41:58 -0400 Subject: [PATCH 01/19] Update instructions --- pages/jointts/positions/position-template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/jointts/positions/position-template.md b/pages/jointts/positions/position-template.md index d4c08e34..87d4f740 100644 --- a/pages/jointts/positions/position-template.md +++ b/pages/jointts/positions/position-template.md @@ -9,8 +9,8 @@ tags: jobs # # # -----------------------------------------------------------------------------# # If you are editing this file on GitHub, first make sure you are creating a # -# new file, and are not editing the template file! To create a new file, go to # -# in your browser # +# new file, and are not editing the template file! To create a new file, copy # +# and paste this file in your code editor and rename it. # # # # Your file name should reflect the URL you would like # # For example, if you are posting a job for a content designer, you might # From 290272fa2925027341ed7541a640e5dd5471686f Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 13:10:52 -0400 Subject: [PATCH 02/19] Additional templating and adjust the logic for showing info sessions to include time --- .eleventy.js | 4 +- _data/assetPaths.json | 2 +- _includes/layouts/jointts/home.html | 153 ++---------------- .../jointts/info-sessions-sidebar.html | 23 +++ .../jointts/job-listing-info-sessions.html | 65 ++++++++ _includes/layouts/jointts/open-jobs.html | 29 ++++ _includes/layouts/jointts/upcoming-jobs.html | 38 +++++ package-lock.json | 4 +- package.json | 2 +- .../Presidential-Innovation-Fellows.md | 6 +- 10 files changed, 178 insertions(+), 148 deletions(-) create mode 100644 _includes/layouts/jointts/info-sessions-sidebar.html create mode 100644 _includes/layouts/jointts/job-listing-info-sessions.html create mode 100644 _includes/layouts/jointts/open-jobs.html create mode 100644 _includes/layouts/jointts/upcoming-jobs.html diff --git a/.eleventy.js b/.eleventy.js index 2bf81ff4..ad61c0ff 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -187,14 +187,14 @@ module.exports = function (config) { config.addFilter("sortByProp", sortByProp); config.addFilter("readableDate", (dateObj) => { - return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat( + return DateTime.fromJSDate(dateObj, { zone: "America/New_York" }).toFormat( "dd LLL yyyy", ); }); // https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string config.addFilter("htmlDateString", (dateObj) => { - return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat("yyyy-LL-dd"); + return DateTime.fromJSDate(dateObj, { zone: "America/New_York" }).toFormat("yyyy-LL-dd"); }); // Get the first `n` elements of a collection. diff --git a/_data/assetPaths.json b/_data/assetPaths.json index bc6d8cd1..e35e2aab 100644 --- a/_data/assetPaths.json +++ b/_data/assetPaths.json @@ -6,4 +6,4 @@ "uswds.js": "/assets/js/uswds-init.js", "styles.css": "/assets/styles/styles-6UNDCLW2.css", "styles.map": "/assets/styles/styles-6UNDCLW2.css.map" -} +} \ No newline at end of file diff --git a/_includes/layouts/jointts/home.html b/_includes/layouts/jointts/home.html index fb03dcca..c5f7920e 100644 --- a/_includes/layouts/jointts/home.html +++ b/_includes/layouts/jointts/home.html @@ -27,133 +27,20 @@

{{ title }}

+

Open positions

We are hiring and will be sharing upcoming jobs and open positions as they are available.

+ {% include "layouts/jointts/open-jobs.html" %} -
    - {% assign open_job_count = 0 %} - {% for pg in collections.jobs %} - {% capture state %}{% getStateFromDates pg.data.opens pg.data.closes %}{% endcapture %} - {% if state == "open" %} - {% unless pg.data.path contains 'template' %} - {% unless pg.data.path contains 'performance-profiles' %} - {% assign open_job_count = open_job_count | plus: 1 %} -
  • - {% if pg.data.external_url %} - {{ pg.data.title }} - {% else %} - {{ pg.data.title }} - {% endif %} - (Open now {% if pg.data.weeks_open %}for {% if pg.data.weeks < 52 %}{{ pg.data.weeks }}{% else %} one year or until all selections have been made{% endif %},{% endif %} through {{ pg.data.closes | date: '%A, %B %e, %Y at 11:59pm' }} ET) - - {% assign now = 'now' | date: "%s" %} - {% assign future_sessions = false %} - - {% for session in pg.data.info_sessions %} - {% assign session_date = session.date | date: "%s" %} - {% if session_date > now %} - {% assign future_sessions = true %} - {% break %} - {% endif %} - {% endfor %} - {% if future_sessions %} - - {% endif %} -
  • - {% endunless %} - {% endunless %} - {% endif %} - {% endfor %} -
- - {% if open_job_count == 0 %} -

No open positions at this time. Sign up for job alerts!

- {% endif %} - +

Upcoming positions

-
    - {% assign upcoming_job_count = 0 %} - - {% for pg in collections.jobs %} - {% capture state %}{% getStateFromDates pg.data.opens pg.data.closes %}{% endcapture %} - - {% assign show_job = false %} - - {% if pg.data.title != "" %} - {% if state == "upcoming" %} - {% assign show_job = true %} - {% elsif state == "unknown" %} - {% assign show_job = true %} - {% endif %} - {% endif %} - - {% if show_job %} - {% assign upcoming_job_count = upcoming_job_count | plus: 1 %} - {% unless pg.data.path contains 'template' %} - {% unless pg.data.path contains 'performance-profiles' %} -
  • - {% if pg.data.external_url %} - {{ pg.data.title }} - {% else %} - {{ pg.data.title }} - {% endif %} - - - {% assign now = 'now' | date: "%s" %} - {% assign future_sessions = false %} - - {% for session in pg.data.info_sessions %} - {% assign session_date = session.date | date: "%s" %} - {% if session_date > now %} - {% assign future_sessions = true %} - {% break %} - {% endif %} - {% endfor %} - {% if future_sessions %} - - {% endif %} -
  • - {% endunless %} - {% endunless %} - {% endif %} - {% endfor %} -
- - {% if upcoming_job_count == 0 %} -

No upcoming positions at this time. Sign up for job alerts!

- {% endif %} + {% include "layouts/jointts/upcoming-jobs.html" %} +

Other GSA Opportunities

Check out careers at GSA and more Information Technology opportunities.

+

Application process

We have an amazing recruitment team who will usher you from application to interview to onboarding with TTS. @@ -164,29 +51,11 @@

Application process

our Talent Team at joinTTS@gsa.gov.

-
-
-
-

Find out more

-
-

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.

-
    - {% for session in sorted_info_sessions %} - {% assign session_date = session.date | date: "%s" %} - {% assign now = 'now' | date: "%s" %} - {% if session_date > now %} -
  • - {{ session.date | date: "%A, %B %d, %Y" }} -

    {{ session.time-et }}

    -

    ({{ session.time-pt }})

    -
  • - {% endif %} - {% endfor %} -
-
-
-
-
+ + + {% if sorted_info_sessions.size > 0 %} + {% include "layouts/jointts/info-sessions-sidebar.html" %} + {% endif %}
diff --git a/_includes/layouts/jointts/info-sessions-sidebar.html b/_includes/layouts/jointts/info-sessions-sidebar.html new file mode 100644 index 00000000..b83241c9 --- /dev/null +++ b/_includes/layouts/jointts/info-sessions-sidebar.html @@ -0,0 +1,23 @@ +
+
+
+

Find out more

+
+

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.

+
    + {% for session in sorted_info_sessions %} + {% assign session_date = session.date | date: "%s" %} + {% assign now = 'now' | date: "%s" %} + {% if session_date > now %} +
  • + {{ session.date | date: "%A, %B %d, %Y" }} +

    {{ session.time-et }}

    +

    ({{ session.time-pt }})

    +
  • + {% endif %} + {% endfor %} +
+
+
+
+
\ No newline at end of file diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html new file mode 100644 index 00000000..08c53811 --- /dev/null +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -0,0 +1,65 @@ + +{% assign now = 'now' | date: "%s" %} +{% assign future_sessions = false %} + +{% for session in pg.data.info_sessions %} + + {% assign time_et = session.time | split: " ET" | first %} + + + {% assign session_start_time = time_et | split: "-" | first | strip %} + {% assign session_end_time = time_et | split: "-" | last | strip %} + + + {% assign session_start_str = session.date | append: " " | append: session_start_time %} + {% assign session_end_str = session.date | append: " " | append: session_end_time %} + + + {% assign session_start = session_start_str | date: "%Y-%m-%d %I:%M%p" | date: "%s" %} + {% assign session_end = session_end_str | date: "%Y-%m-%d %I:%M%p" | date: "%s" %} + + + {% if session_end > now %} + {% assign future_sessions = true %} + {% break %} + {% endif %} +{% endfor %} + +{% if future_sessions %} + +{% endif %} diff --git a/_includes/layouts/jointts/open-jobs.html b/_includes/layouts/jointts/open-jobs.html new file mode 100644 index 00000000..6b12cf21 --- /dev/null +++ b/_includes/layouts/jointts/open-jobs.html @@ -0,0 +1,29 @@ +
    + {% assign open_job_count = 0 %} + {% for pg in collections.jobs %} + {% capture state %}{% getStateFromDates pg.data.opens pg.data.closes %}{% endcapture %} + {% if state == "open" %} + {% unless pg.data.path contains 'template' %} + {% unless pg.data.path contains 'performance-profiles' %} + {% assign open_job_count = open_job_count | plus: 1 %} +
  • + {% if pg.data.external_url %} + {{ pg.data.title }} + {% else %} + {{ pg.data.title }} + {% endif %} + (Open now {% if pg.data.weeks_open %}for {% if pg.data.weeks < 52 %}{{ pg.data.weeks }}{% else %} one year or until all selections have been made{% endif %},{% endif %} through {{ pg.data.closes | date: '%A, %B %e, %Y at 11:59pm' }} ET) + + + {% include "layouts/jointts/job-listing-info-sessions.html" %} + +
  • + {% endunless %} + {% endunless %} + {% endif %} + {% endfor %} +
+ + {% if open_job_count == 0 %} +

No open positions at this time. Sign up for job alerts!

+ {% endif %} \ No newline at end of file diff --git a/_includes/layouts/jointts/upcoming-jobs.html b/_includes/layouts/jointts/upcoming-jobs.html new file mode 100644 index 00000000..dcf0ee28 --- /dev/null +++ b/_includes/layouts/jointts/upcoming-jobs.html @@ -0,0 +1,38 @@ +
    + {% assign upcoming_job_count = 0 %} + + {% for pg in collections.jobs %} + {% capture state %}{% getStateFromDates pg.data.opens pg.data.closes %}{% endcapture %} + + {% assign show_job = false %} + + {% if pg.data.title != "" %} + {% if state == "upcoming" %} + {% assign show_job = true %} + {% elsif state == "unknown" %} + {% assign show_job = true %} + {% endif %} + {% endif %} + + {% if show_job %} + {% assign upcoming_job_count = upcoming_job_count | plus: 1 %} + {% unless pg.data.path contains 'template' %} + {% unless pg.data.path contains 'performance-profiles' %} +
  • + {% if pg.data.external_url %} + {{ pg.data.title }} + {% else %} + {{ pg.data.title }} + {% endif %} + + {% include "layouts/jointts/job-listing-info-sessions.html" %} +
  • + {% endunless %} + {% endunless %} + {% endif %} + {% endfor %} +
+ + {% if upcoming_job_count == 0 %} +

No upcoming positions at this time. Sign up for job alerts!

+ {% endif %} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 059087aa..b74102ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "esbuild": "^0.14.25", "esbuild-sass-plugin": "^2.2.4", "js-yaml": "^4.1.0", - "luxon": "^2.3.1", + "luxon": "^2.5.2", "markdown-it": "^12.3.2", "markdown-it-anchor": "^8.4.1", "npm-run-all": "^4.1.5", @@ -2407,6 +2407,7 @@ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -4712,6 +4713,7 @@ "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.5.2.tgz", "integrity": "sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" } diff --git a/package.json b/package.json index 57c543a9..5b8cc454 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "esbuild": "^0.14.25", "esbuild-sass-plugin": "^2.2.4", "js-yaml": "^4.1.0", - "luxon": "^2.3.1", + "luxon": "^2.5.2", "markdown-it": "^12.3.2", "markdown-it-anchor": "^8.4.1", "npm-run-all": "^4.1.5", diff --git a/pages/jointts/positions/Presidential-Innovation-Fellows.md b/pages/jointts/positions/Presidential-Innovation-Fellows.md index e09fd48b..28f5cacc 100644 --- a/pages/jointts/positions/Presidential-Innovation-Fellows.md +++ b/pages/jointts/positions/Presidential-Innovation-Fellows.md @@ -129,9 +129,13 @@ info_sessions: headline: Monday, September 23rd, 2024 time: 4:00-5:00pm ET (1:00pm-2:00pm PT) - link: https://gsa.zoomgov.com/webinar/register/WN_pEhDPgcHRGKxOOlQr4S-Cw#/registration - date: 2024-09-26 + date: 2024-09-25 headline: Wednesday, September 25th, 2024 time: 1:00-2:00pm ET (10:00am-11:00am PT) + - link: https://gsa.zoomgov.com/webinar/register/WN_UFTZZb0VRyyTDlvPcR-gWw + date: 2024-09-27 + headline: Friday, September 27th, 2024 + time: 1:00-2:00pm ET (10:00am-11:00am PT) # Make sure to leave the | on the first line. role_summary: | From aa3b29ca50df7e1c14fdc905fb8cc46edba3bade Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 13:55:24 -0400 Subject: [PATCH 03/19] Add shortcode to convert string to timestamp --- .eleventy.js | 33 ++++++++++++++++++- .../jointts/job-listing-info-sessions.html | 26 +++++---------- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index ad61c0ff..b3ef999e 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -155,8 +155,39 @@ module.exports = function (config) { }); } - config.addLiquidShortcode("getStateFromDates", getStateFromDates); + // Get Date and Time as Seconds + // Datetime format: YYYY-MM-DD HH: + config.addLiquidShortcode("getDateTimeinSeconds", getDateTimeinSeconds); + function getDateTimeinSeconds(datetime) { + // Split the datetime string into date and time parts + const dateParts = datetime.split(" "); + const date = dateParts[0]; + const time = dateParts[1]; + + // Extract hours, minutes, and AM/PM + let hours = parseInt(time.slice(0, time.length - 2).split(":")[0], 10); // Adjusted to capture full hour + const minutes = time.length === 6 ? time.slice(2, 4) : time.slice(3, 5); + const amPm = time.slice(-2).toLowerCase(); // Handle AM/PM case + + // Convert hours to 24-hour format + if (amPm === "pm" && hours !== 12) { + hours += 12; + } else if (amPm === "am" && hours === 12) { + hours = 0; + } + + // Format the datetime string for timestamp conversion + const formattedDatetime = `${date} ${String(hours).padStart(2, '0')}:${minutes}`; + + // Convert to timestamp (in seconds) + const timestamp = Math.floor(new Date(formattedDatetime).getTime() / 1000); + return timestamp; + } + + + // Get State From Dates + config.addLiquidShortcode("getStateFromDates", getStateFromDates); function getStateFromDates(opens, closes) { if (!opens && !closes) { return "unknown"; diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index 08c53811..e73e4632 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -3,23 +3,22 @@ {% assign future_sessions = false %} {% for session in pg.data.info_sessions %} + + {% assign session_date = session.date | date: "%Y-%m-%d" %} + {% assign time_et = session.time | split: " ET" | first %} - {% assign session_start_time = time_et | split: "-" | first | strip %} {% assign session_end_time = time_et | split: "-" | last | strip %} - {% assign session_start_str = session.date | append: " " | append: session_start_time %} - {% assign session_end_str = session.date | append: " " | append: session_end_time %} - - - {% assign session_start = session_start_str | date: "%Y-%m-%d %I:%M%p" | date: "%s" %} - {% assign session_end = session_end_str | date: "%Y-%m-%d %I:%M%p" | date: "%s" %} + {% assign session_end_str = session_date | append: " " | append: session_end_time %} + + {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} - {% if session_end > now %} + {% if sessionEndTimestamp > now %} {% assign future_sessions = true %} {% break %} {% endif %} @@ -38,22 +37,15 @@ {% assign time_et = session.time | split: " ET" | first %} - {% assign session_start_time = time_et | split: "-" | first | strip %} {% assign session_end_time = time_et | split: "-" | last | strip %} - {% assign session_start_str = session_date | append: " " | append: session_start_time %} {% assign session_end_str = session_date | append: " " | append: session_end_time %} - - - {% assign session_start = session_start_str | date: "%Y-%m-%d %I:%M%p" | date: "%s" %} - {% assign session_end = session_end_str | date: "%Y-%m-%d %I:%M%p" | date: "%s" %} - - {% assign timeNow = 'now' | date: "%Y-%m-%d %I:%M%p" %} + {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} - {% if session_end > timeNow %} + {% if sessionEndTimestamp > now %}
  • {{ session.headline }} at {{ session.time }}

  • From fd99b47b096963e585e592b59ac4ce979aca4b32 Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 13:57:10 -0400 Subject: [PATCH 04/19] Output some variables for testing --- _includes/layouts/jointts/job-listing-info-sessions.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index e73e4632..4c64bac8 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -16,6 +16,9 @@ {% assign session_end_str = session_date | append: " " | append: session_end_time %} {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} + + {{ session_end_str }} + {{ sessionEndTimestamp }} {% if sessionEndTimestamp > now %} From bc9cc205eda03a195721ad0d63cdda1ab337a411 Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 13:57:24 -0400 Subject: [PATCH 05/19] Add now to the output vars --- _includes/layouts/jointts/job-listing-info-sessions.html | 1 + 1 file changed, 1 insertion(+) diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index 4c64bac8..c9da4a5c 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -19,6 +19,7 @@ {{ session_end_str }} {{ sessionEndTimestamp }} + {{ now }} {% if sessionEndTimestamp > now %} From 514c69f9f54d6260aff6d1c9236e0634b6f71f7a Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 14:04:26 -0400 Subject: [PATCH 06/19] Adjust for timezone and more testing --- .eleventy.js | 4 +++- pages/jointts/positions/Presidential-Innovation-Fellows.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index b3ef999e..099044f6 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -177,11 +177,13 @@ module.exports = function (config) { } // Format the datetime string for timestamp conversion - const formattedDatetime = `${date} ${String(hours).padStart(2, '0')}:${minutes}`; + const formattedDatetime = `${date} ${String(hours).padStart(2, '0')}:${minutes} EST`; // Convert to timestamp (in seconds) const timestamp = Math.floor(new Date(formattedDatetime).getTime() / 1000); + console.log(timestamp); + return timestamp; } diff --git a/pages/jointts/positions/Presidential-Innovation-Fellows.md b/pages/jointts/positions/Presidential-Innovation-Fellows.md index 28f5cacc..2a58b57e 100644 --- a/pages/jointts/positions/Presidential-Innovation-Fellows.md +++ b/pages/jointts/positions/Presidential-Innovation-Fellows.md @@ -129,7 +129,7 @@ info_sessions: headline: Monday, September 23rd, 2024 time: 4:00-5:00pm ET (1:00pm-2:00pm PT) - link: https://gsa.zoomgov.com/webinar/register/WN_pEhDPgcHRGKxOOlQr4S-Cw#/registration - date: 2024-09-25 + date: 2024-09-26 headline: Wednesday, September 25th, 2024 time: 1:00-2:00pm ET (10:00am-11:00am PT) - link: https://gsa.zoomgov.com/webinar/register/WN_UFTZZb0VRyyTDlvPcR-gWw From 15472b9ed72a4f1f9a8d691071759b1af4244c2e Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 14:06:16 -0400 Subject: [PATCH 07/19] Change where we're logging, we only want the two --- _includes/layouts/jointts/job-listing-info-sessions.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index c9da4a5c..74063a25 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -16,10 +16,6 @@ {% assign session_end_str = session_date | append: " " | append: session_end_time %} {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} - - {{ session_end_str }} - {{ sessionEndTimestamp }} - {{ now }} {% if sessionEndTimestamp > now %} @@ -48,6 +44,10 @@ {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} + {{ session_end_str }} + {{ sessionEndTimestamp }} + {{ now }} + {% if sessionEndTimestamp > now %}
  • From 4677ea6eadcc833f87b36a0ecd018d7d18d305a3 Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 14:09:32 -0400 Subject: [PATCH 08/19] Output session date --- _includes/layouts/jointts/job-listing-info-sessions.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index 74063a25..35d28e44 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -44,9 +44,10 @@ {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} - {{ session_end_str }} - {{ sessionEndTimestamp }} - {{ now }} + {{ session_date }} + {{ session.date }} + {% if sessionEndTimestamp > now %} From b364159b13d9f7cb8e51f18c2b83401a122dfe72 Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 14:10:12 -0400 Subject: [PATCH 09/19] One last check --- _includes/layouts/jointts/job-listing-info-sessions.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index 35d28e44..6fb77b69 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -44,13 +44,10 @@ {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} - {{ session_date }} - {{ session.date }} - - {% if sessionEndTimestamp > now %} + {{ sessionEndTimestamp }} + {{ now }}
  • {{ session.headline }} at {{ session.time }}

  • From 9e5ff98568cdce6edb95459a139976d10d259c88 Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 14:56:39 -0400 Subject: [PATCH 10/19] Remove logging and revert date --- _includes/layouts/jointts/job-listing-info-sessions.html | 2 -- pages/jointts/positions/Presidential-Innovation-Fellows.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index 6fb77b69..e73e4632 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -46,8 +46,6 @@ {% if sessionEndTimestamp > now %} - {{ sessionEndTimestamp }} - {{ now }}
  • {{ session.headline }} at {{ session.time }}

  • diff --git a/pages/jointts/positions/Presidential-Innovation-Fellows.md b/pages/jointts/positions/Presidential-Innovation-Fellows.md index 2a58b57e..28f5cacc 100644 --- a/pages/jointts/positions/Presidential-Innovation-Fellows.md +++ b/pages/jointts/positions/Presidential-Innovation-Fellows.md @@ -129,7 +129,7 @@ info_sessions: headline: Monday, September 23rd, 2024 time: 4:00-5:00pm ET (1:00pm-2:00pm PT) - link: https://gsa.zoomgov.com/webinar/register/WN_pEhDPgcHRGKxOOlQr4S-Cw#/registration - date: 2024-09-26 + date: 2024-09-25 headline: Wednesday, September 25th, 2024 time: 1:00-2:00pm ET (10:00am-11:00am PT) - link: https://gsa.zoomgov.com/webinar/register/WN_UFTZZb0VRyyTDlvPcR-gWw From 35c989b77b35a5b3006cf6d4b890c07bbc01412b Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 15:24:36 -0400 Subject: [PATCH 11/19] Lets readd debugging --- _includes/layouts/jointts/job-listing-info-sessions.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index e73e4632..e412cfcb 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -44,6 +44,8 @@ {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} + {{ sessionEndTimestamp }} + {{ now }} {% if sessionEndTimestamp > now %}
  • From ab24b3f5ae4e2284f6c7a562665f0488852430b1 Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Wed, 25 Sep 2024 16:33:02 -0400 Subject: [PATCH 12/19] Add time logic to info sessions --- .../layouts/jointts/info-sessions-sidebar.html | 18 ++++++++++++++++-- .../jointts/job-listing-info-sessions.html | 4 +--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/_includes/layouts/jointts/info-sessions-sidebar.html b/_includes/layouts/jointts/info-sessions-sidebar.html index b83241c9..e322683e 100644 --- a/_includes/layouts/jointts/info-sessions-sidebar.html +++ b/_includes/layouts/jointts/info-sessions-sidebar.html @@ -6,9 +6,23 @@

    Find out more

    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.

      {% for session in sorted_info_sessions %} - {% assign session_date = session.date | date: "%s" %} + + {% assign session_date = session.date | date: "%Y-%m-%d" %} + + + {% assign time_et = session.time | split: " ET" | first %} + + + {% assign session_end_time = time_et | split: "-" | last | strip %} + + + {% assign session_end_str = session_date | append: " " | append: session_end_time %} + + {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} + {% assign now = 'now' | date: "%s" %} - {% if session_date > now %} + + {% if sessionEndTimestamp > now %}
    • {{ session.date | date: "%A, %B %d, %Y" }}

      {{ session.time-et }}

      diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index e412cfcb..f48df15d 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -43,9 +43,7 @@ {% assign session_end_str = session_date | append: " " | append: session_end_time %} {% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %} - - {{ sessionEndTimestamp }} - {{ now }} + {% if sessionEndTimestamp > now %}
    • From 548236bcedd7d971ed41988a284aa2338497464c Mon Sep 17 00:00:00 2001 From: Ximena Kilroe Date: Thu, 26 Sep 2024 09:46:41 -0400 Subject: [PATCH 13/19] Add client side JS --- .eleventy.js | 3 --- _data/assetPaths.json | 5 ++--- .../layouts/jointts/info-sessions-sidebar.html | 6 +++--- .../layouts/jointts/job-listing-info-sessions.html | 6 +++--- js/app.js | 13 +++++++++++++ 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 099044f6..6d59bb15 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -181,13 +181,10 @@ module.exports = function (config) { // Convert to timestamp (in seconds) const timestamp = Math.floor(new Date(formattedDatetime).getTime() / 1000); - - console.log(timestamp); return timestamp; } - // Get State From Dates config.addLiquidShortcode("getStateFromDates", getStateFromDates); function getStateFromDates(opens, closes) { diff --git a/_data/assetPaths.json b/_data/assetPaths.json index e35e2aab..fc3e30c8 100644 --- a/_data/assetPaths.json +++ b/_data/assetPaths.json @@ -1,9 +1,8 @@ { "admin.js": "/assets/js/admin-77FHK54G.js", "admin.map": "/assets/js/admin-77FHK54G.js.map", - "app.js": "/assets/js/app-U5OIPSUD.js", - "app.map": "/assets/js/app-U5OIPSUD.js.map", - "uswds.js": "/assets/js/uswds-init.js", + "app.js": "/assets/js/app-LK2IXTVG.js", + "app.map": "/assets/js/app-LK2IXTVG.js.map", "styles.css": "/assets/styles/styles-6UNDCLW2.css", "styles.map": "/assets/styles/styles-6UNDCLW2.css.map" } \ No newline at end of file diff --git a/_includes/layouts/jointts/info-sessions-sidebar.html b/_includes/layouts/jointts/info-sessions-sidebar.html index e322683e..be211311 100644 --- a/_includes/layouts/jointts/info-sessions-sidebar.html +++ b/_includes/layouts/jointts/info-sessions-sidebar.html @@ -4,13 +4,13 @@

      Find out more

      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.

      -
        +
          {% for session in sorted_info_sessions %} {% assign session_date = session.date | date: "%Y-%m-%d" %} - {% assign time_et = session.time | split: " ET" | first %} + {% assign time_et = session.time-et | split: " ET" %} {% assign session_end_time = time_et | split: "-" | last | strip %} @@ -23,7 +23,7 @@

          Find out more

          {% assign now = 'now' | date: "%s" %} {% if sessionEndTimestamp > now %} -
        • +
        • {{ session.date | date: "%A, %B %d, %Y" }}

          {{ session.time-et }}

          ({{ session.time-pt }})

          diff --git a/_includes/layouts/jointts/job-listing-info-sessions.html b/_includes/layouts/jointts/job-listing-info-sessions.html index f48df15d..342bd1bf 100644 --- a/_includes/layouts/jointts/job-listing-info-sessions.html +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -28,7 +28,7 @@