diff --git a/.eleventy.js b/.eleventy.js index 2bf81ff4..5949c88c 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -155,8 +155,38 @@ module.exports = function (config) { }); } - config.addLiquidShortcode("getStateFromDates", getStateFromDates); + // Get Date and Time as Seconds + // Datetime format: YYYY-MM-DD HH:MM + 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} EST`; + + // 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"; @@ -187,14 +217,16 @@ 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/.github/ISSUE_TEMPLATE/bug_report_form.yml b/.github/ISSUE_TEMPLATE/bug_report_form.yml new file mode 100644 index 00000000..7ca68e13 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report_form.yml @@ -0,0 +1,59 @@ +--- +name: Bug Report +description: Use this form to submit bug reports +projects: + - GSA-TTS/54 +labels: + - "bug" + +body: + - type: "markdown" + attributes: + value: > + This form is used to submit bug reports. A bug is when + something's not working the way that it should. If a + page says something and needs to say something else, + please use the Content Update form. + + - type: "input" + id: "url" + attributes: + label: "URL" + description: "Where do you see the bug?" + placeholder: "URL" + validations: + required: true + + - type: "textarea" + id: "current_behavior" + attributes: + label: "Current Behavior" + description: "This is the current behavior" + placeholder: "what it's doing now" + validations: + required: true + + - type: "textarea" + id: "expected" + attributes: + label: "Expected Behavior" + description: "This is what is expected" + placeholder: "what the it should be doing" + validations: + required: true + + - type: "textarea" + id: "reproduction_steps" + attributes: + label: "Steps to Reproduce Behavior" + description: "This is what is how to reproduce the bug" + placeholder: "how to make the bug show up" + validations: + required: true + + - type: "textarea" + id: "comments" + attributes: + label: "Comments" + description: "Another other comments, notes, thoughts, etc." + placeholder: "comments" diff --git a/.github/ISSUE_TEMPLATE/content_update_form.yml b/.github/ISSUE_TEMPLATE/content_update_form.yml index 562ce7b0..b715d37d 100644 --- a/.github/ISSUE_TEMPLATE/content_update_form.yml +++ b/.github/ISSUE_TEMPLATE/content_update_form.yml @@ -13,7 +13,9 @@ body: This form is used to request content updates. We'll need to know the URL / address of the page that the content is on (or should be on), what the content currently says, - and what the content should say. + and what the content should say. Bugs -- when something + isn't working properly -- should be reported using the bug + reporting form. - type: "input" id: "url" diff --git a/CODEOWNERS b/CODEOWNERS index cd680f0f..5968d3bd 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -23,4 +23,4 @@ *.png @GSA-TTS/tts-website-content *.jpg @GSA-TTS/tts-website-content -.github @GSA-TTS/tts-website-admins +.github @GSA-TTS/tts-website-developers diff --git a/_includes/footer.html b/_includes/footer.html index ffb1f3a0..a9543ff5 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -10,9 +10,6 @@ mobile-lg:grid-col-6 mobile-lg:grid-gap-2 " > -
- -

Built with: USWDS 3 | Cloud.gov Pages | Digital Analytics Program

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" %} - - - {% if open_job_count == 0 %} -

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

- {% endif %} - +

Upcoming positions

- - - {% 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..be211311 --- /dev/null +++ b/_includes/layouts/jointts/info-sessions-sidebar.html @@ -0,0 +1,37 @@ +
+
+
+

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-et | split: " ET" %} + + + {% 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 sessionEndTimestamp > 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..342bd1bf --- /dev/null +++ b/_includes/layouts/jointts/job-listing-info-sessions.html @@ -0,0 +1,57 @@ + +{% assign now = 'now' | date: "%s" %} +{% 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_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 %} + + + {% if sessionEndTimestamp > 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 @@ + + + {% 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 @@ + + + {% 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/_includes/scripts.html b/_includes/scripts.html index 3169cec2..ae9b8e2d 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -45,3 +45,21 @@ }); }); + + + 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 834fda14..1f440a52 100644 --- a/pages/jointts/positions/Presidential-Innovation-Fellows.md +++ b/pages/jointts/positions/Presidential-Innovation-Fellows.md @@ -117,14 +117,14 @@ key_objectives: # are TWO digits info_sessions: - 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#/registration - date: 2024-09-28 + - 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: | diff --git a/pages/jointts/positions/position-template.md b/pages/jointts/positions/position-template.md index d4c08e34..c4f0ca1f 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 # @@ -36,23 +36,23 @@ tags: jobs # The exception to this is a TTS role, for which you can just say TTS title: "" -# If the role is listed on a different site and you just want to link to it, -# put that link here. You can leave the rest of the template as-is, unless you -# need to add info sessions. -external_url: - # Put the opening and closing dates of your posting here, if you have them # These dates MUST be formatted as YYYY-MM-DD, where month and day are 2-digits opens: closes: +# If the role is listed on a different site and you just want to link to it, +# put that link here. You can leave the rest of the template as-is, unless you +# need to add info sessions. +external_url: + # To show the status alert for this job, leave this set to true. To hide it, change to false # To show the alert keyword association message, add the keywords separated by a semi-colon # e.g. Product Management; Strategy/Consulting; and Marketing status_alert: true alert_keywords: -# If this listing has been updated since it was published, put the updated date below in YYYY-MM-DD # format +# If this listing has been updated since it was published, put the updated date below in YYYY-MM-DD format. updated: # BASIC INFO @@ -90,8 +90,8 @@ appointment_type: # # - title: Key Objective 1 # items -# - Objective 1 Sub-Bullet -# - Objective 1 Sub-Bullet +# - Objective 1 Sub-Bullet +# - Objective 1 Sub-Bullet # - title: Key Objective 2 # # The placeholder information below shows an example of how to format the key @@ -99,13 +99,13 @@ appointment_type: key_objectives: - title: Key Objective 1 items: - - Objective 1 Sub-Bullet - - Objective 1 Sub-Bullet + - Objective 1 Sub-Bullet + - Objective 1 Sub-Bullet - title: Key Objective 2 items: - - Objective 2 Sub-Bullet - - Objective 2 Sub-Bullet - - Objective 2 Sub-Bullet + - Objective 2 Sub-Bullet + - Objective 2 Sub-Bullet + - Objective 2 Sub-Bullet # If there are any info sessions associated with this position, list them here # See the placeholder below for an example of how to add an info