From 587abdc81e1923cd8524627248f66c2f499a5985 Mon Sep 17 00:00:00 2001 From: Wes Dean <87149725+wesley-dean-gsa@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:02:58 -0400 Subject: [PATCH 1/5] Update .mega-linter.yml --- .mega-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mega-linter.yml b/.mega-linter.yml index b442c93d..c827369a 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -26,7 +26,7 @@ DISABLE_LINTERS: ] # only scan new / updated files, not everything -VALIDATE_ALL_CODEBASE: true +VALIDATE_ALL_CODEBASE: false # don't print the alpaca -- it's cute, but we don't need it in the logs PRINT_ALPACA: false From 6cb168b960a4ab1249e1aaaa76eaecc3239f2088 Mon Sep 17 00:00:00 2001 From: Wes Dean <87149725+wesley-dean-gsa@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:19:19 -0400 Subject: [PATCH 2/5] Update tts-custom-styles.scss The comments were refactored to use shorter lines and have at least one blank line between the comment and any code that they're documenting. This ought to help prevent overzealous tooling breaking the code and breaking builds. --- styles/tts-custom-styles.scss | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/styles/tts-custom-styles.scss b/styles/tts-custom-styles.scss index aa216e9f..f11e7786 100644 --- a/styles/tts-custom-styles.scss +++ b/styles/tts-custom-styles.scss @@ -1,12 +1,16 @@ @use "uswds-core" as *; // Add any USWDS overrides here -// Alternatively, you could create an overrides folder and create individual override files +// Alternatively, you could create an +// overrides folder and create individual +// override files // custom tts color + $tts-tagline-bg: #1F303E; // USWDS Hero component + .usa-hero--tts { height: 10rem; width: 100%; @@ -15,7 +19,16 @@ $tts-tagline-bg: #1F303E; background-size: cover; padding: 0; @include at-media('mobile-lg') { - // This shifts the hero over to the right so that most of the background image isn't covered by the tagline. The left side of the hero image will not line up perfectly with the right side of the tagline, since the widths of both elements will vary depending on screen width. A bit of overlap on this edge will prevent empty space between the two. + + // This shifts the hero over to the right so that + // most of the background image isn't covered by + // the tagline. The left side of the hero image + // will not line up perfectly with the right side + // of the tagline, since the widths of both + // elements will vary depending on screen width. + // A bit of overlap on this edge will prevent + // empty space between the two. + position: absolute; left:40%; height:100%; @@ -39,12 +52,15 @@ $tts-tagline-bg: #1F303E; .tts-tagline { @include at-media('mobile-lg') { + // Setting a min height so that the hero height doesn't need to rely on tagline length + min-height: 350px; } } // Services pages + .service .usa-card__container { border-radius: 0; } @@ -113,4 +129,4 @@ h2, h3, h4, h5 { .usa-prose .usa-card:last-child { margin-bottom: 1rem; -} \ No newline at end of file +} From 9582d5a208aee986827aea7c05fb2eaba1ec2a94 Mon Sep 17 00:00:00 2001 From: Wes Dean <87149725+wesley-dean-gsa@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:23:06 -0400 Subject: [PATCH 3/5] Enable APPLY_FIXES Note: `APPLY_FIXES` can only be set as an environment variable (i.e.,g one may not set it in `.mega-linter.yml`) so this is the codified way of getting from here to there. --- .github/workflows/megalinter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/megalinter.yml b/.github/workflows/megalinter.yml index 879b8f93..4b637048 100644 --- a/.github/workflows/megalinter.yml +++ b/.github/workflows/megalinter.yml @@ -18,7 +18,7 @@ permissions: env: # Comment env block if you do not want to apply fixes # Apply linter fixes configuration - APPLY_FIXES: none # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) + APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) APPLY_FIXES_EVENT: all # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) From 08412817adfeb34f8c12cb4db0fce6eef80b638f Mon Sep 17 00:00:00 2001 From: wesley-dean-gsa Date: Mon, 5 Aug 2024 20:24:40 +0000 Subject: [PATCH 4/5] [MegaLinter] Apply linters fixes --- .eleventy.js | 107 +++++++++++++++------------- .github/pull_request_template.md | 2 +- .github/workflows/megalinter.yml | 1 - .github/workflows/pa11y.yml | 4 +- .github/workflows/scorecard.yml | 2 +- .github/workflows/test.yml | 4 +- .grype.yaml | 9 ++- .mega-linter.yml | 9 +-- CONTRIBUTING.md | 2 +- README.md | 2 +- SECURITY.md | 2 +- _data/assetPaths.json | 2 +- _data/collections.yaml | 12 ++-- _data/services.yaml | 44 ++++++++---- config/buildAssets.js | 50 ++++++------- config/index.js | 34 ++++----- js/admin.js | 2 +- js/app.js | 5 +- pages/jointts/hiring-process.md | 2 +- pages/jointts/positions/designer.md | 24 +++---- pages/jointts/rolling-hiring.md | 2 +- postcss.config.js | 2 +- styles/tts-custom-styles.scss | 12 ++-- 23 files changed, 169 insertions(+), 166 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 179b240f..b156d34a 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,28 +1,33 @@ -const { DateTime } = require('luxon'); -const esbuild = require('esbuild'); -const fs = require('fs'); -const path = require('path'); -const pluginRss = require('@11ty/eleventy-plugin-rss'); -const pluginNavigation = require('@11ty/eleventy-navigation'); -const markdownIt = require('markdown-it'); -const markdownItAnchor = require('markdown-it-anchor'); +const { DateTime } = require("luxon"); +const esbuild = require("esbuild"); +const fs = require("fs"); +const path = require("path"); +const pluginRss = require("@11ty/eleventy-plugin-rss"); +const pluginNavigation = require("@11ty/eleventy-navigation"); +const markdownIt = require("markdown-it"); +const markdownItAnchor = require("markdown-it-anchor"); const yaml = require("js-yaml"); -const { sassPlugin } = require('esbuild-sass-plugin'); +const { sassPlugin } = require("esbuild-sass-plugin"); const svgSprite = require("eleventy-plugin-svg-sprite"); -const { imageShortcode, imageWithClassShortcode } = require('./config'); +const { imageShortcode, imageWithClassShortcode } = require("./config"); module.exports = function (config) { // Set pathPrefix for site - let pathPrefix = '/'; + let pathPrefix = "/"; // Copy the `admin` folders to the output - config.addPassthroughCopy('admin'); + config.addPassthroughCopy("admin"); // for #80 (update site favicon) // copy files from `_img/favicon/` to `_site/` - config.addPassthroughCopy({ "_img/favicon/favicon.ico": "/assets/favicon.ico" }); + config.addPassthroughCopy({ + "_img/favicon/favicon.ico": "/assets/favicon.ico", + }); // Copy USWDS init JS so we can load it in HEAD to prevent banner flashing - config.addPassthroughCopy({'./node_modules/@uswds/uswds/dist/js/uswds-init.js': 'assets/js/uswds-init.js'}); + config.addPassthroughCopy({ + "./node_modules/@uswds/uswds/dist/js/uswds-init.js": + "assets/js/uswds-init.js", + }); // Add plugins config.addPlugin(pluginRss); @@ -31,23 +36,23 @@ module.exports = function (config) { //// SVG Sprite Plugin for USWDS USWDS icons config.addPlugin(svgSprite, { path: "./node_modules/@uswds/uswds/dist/img/uswds-icons", - svgSpriteShortcode: 'uswds_icons_sprite', - svgShortcode: 'uswds_icons' + svgSpriteShortcode: "uswds_icons_sprite", + svgShortcode: "uswds_icons", }); //// SVG Sprite Plugin for USWDS USA icons config.addPlugin(svgSprite, { path: "./node_modules/@uswds/uswds/dist/img/usa-icons", - svgSpriteShortcode: 'usa_icons_sprite', - svgShortcode: 'usa_icons' + svgSpriteShortcode: "usa_icons_sprite", + svgShortcode: "usa_icons", }); // Allow yaml to be used in the _data dir - config.addDataExtension("yaml", contents => yaml.load(contents)); + config.addDataExtension("yaml", (contents) => yaml.load(contents)); // This is an example of creating an Eleventy collection from // a data file, in this case it's _data/services.yml - config.addCollection('services', (collection) => { + config.addCollection("services", (collection) => { const allServices = collection.getAll()[0].data.services; return allServices; }); @@ -57,7 +62,7 @@ module.exports = function (config) { function sortByProp(values, prop) { let vals = [...values]; return vals.sort((a, b) => { - if (typeof a[prop] == 'string' && typeof b[prop] == 'string') { + if (typeof a[prop] == "string" && typeof b[prop] == "string") { return a[prop].localeCompare(b[prop]); } else { return Math.sign(a[prop] - b[prop]); @@ -65,21 +70,21 @@ module.exports = function (config) { }); } - config.addFilter('sortByProp', sortByProp); + config.addFilter("sortByProp", sortByProp); - config.addFilter('readableDate', (dateObj) => { - return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat( - 'dd LLL yyyy' + config.addFilter("readableDate", (dateObj) => { + return DateTime.fromJSDate(dateObj, { zone: "utc" }).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'); + config.addFilter("htmlDateString", (dateObj) => { + return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat("yyyy-LL-dd"); }); // Get the first `n` elements of a collection. - config.addFilter('head', (array, n) => { + config.addFilter("head", (array, n) => { if (!Array.isArray(array) || array.length === 0) { return []; } @@ -91,20 +96,20 @@ module.exports = function (config) { }); // Return the smallest number argument - config.addFilter('min', (...numbers) => { + config.addFilter("min", (...numbers) => { return Math.min.apply(null, numbers); }); function filterTagList(tags) { return (tags || []).filter( - (tag) => ['all', 'nav', 'post', 'posts'].indexOf(tag) === -1 + (tag) => ["all", "nav", "post", "posts"].indexOf(tag) === -1, ); } - config.addFilter('filterTagList', filterTagList); + config.addFilter("filterTagList", filterTagList); // Create an array of all tags - config.addCollection('tagList', function (collection) { + config.addCollection("tagList", function (collection) { let tagSet = new Set(); collection.getAll().forEach((item) => { (item.data.tags || []).forEach((tag) => tagSet.add(tag)); @@ -120,26 +125,26 @@ module.exports = function (config) { linkify: true, }).use(markdownItAnchor, { permalink: markdownItAnchor.permalink.ariaHidden({ - placement: 'after', - class: 'direct-link', - symbol: '', + placement: "after", + class: "direct-link", + symbol: "", level: [1, 2, 3, 4], }), - slugify: config.getFilter('slug'), + slugify: config.getFilter("slug"), }); - config.setLibrary('md', markdownLibrary); + config.setLibrary("md", markdownLibrary); // Override Browsersync defaults (used only with --serve) config.setBrowserSyncConfig({ callbacks: { ready: function (err, browserSync) { - const content_404 = fs.readFileSync('_site/404/index.html'); + const content_404 = fs.readFileSync("_site/404/index.html"); - browserSync.addMiddleware('*', (req, res) => { + browserSync.addMiddleware("*", (req, res) => { // Provides the 404 content without redirect. - res.writeHead(404, { 'Content-Type': 'text/html; charset=UTF-8' }); + res.writeHead(404, { "Content-Type": "text/html; charset=UTF-8" }); res.write(content_404); -const svgSprite = require("eleventy-plugin-svg-sprite"); + const svgSprite = require("eleventy-plugin-svg-sprite"); res.end(); }); }, @@ -149,8 +154,8 @@ const svgSprite = require("eleventy-plugin-svg-sprite"); }); // Set image shortcodes - config.addLiquidShortcode('image', imageShortcode); - config.addLiquidShortcode('image_with_class', imageWithClassShortcode); + config.addLiquidShortcode("image", imageShortcode); + config.addLiquidShortcode("image_with_class", imageWithClassShortcode); config.addLiquidShortcode("uswds_icon", function (name) { return ` ${alt}`; -}; - +} async function imageShortcode(src, alt) { - return await imageWithClassShortcode(src, '', alt) -}; + return await imageWithClassShortcode(src, "", alt); +} module.exports = { imageWithClassShortcode, - imageShortcode -} + imageShortcode, +}; diff --git a/js/admin.js b/js/admin.js index 62bc5576..0d74cf62 100644 --- a/js/admin.js +++ b/js/admin.js @@ -1 +1 @@ -require('netlify-cms'); +require("netlify-cms"); diff --git a/js/app.js b/js/app.js index 60485c51..83ab4208 100644 --- a/js/app.js +++ b/js/app.js @@ -1,4 +1,4 @@ -require('@uswds/uswds'); +require("@uswds/uswds"); const applyMessage = () => { // This looks chaotic but every '\' needs escaped @@ -15,8 +15,7 @@ const applyMessage = () => { \\::/ / \\/__/ `; -console.log(message); + console.log(message); }; - applyMessage(); diff --git a/pages/jointts/hiring-process.md b/pages/jointts/hiring-process.md index f145daa6..738f1b37 100644 --- a/pages/jointts/hiring-process.md +++ b/pages/jointts/hiring-process.md @@ -33,7 +33,7 @@ averages, and length of process stages can vary based on a number of factors such as the number of applications received. | Process Stage | Average Duration/Days | -| :--------------------------------------------- | :-------------------: | +|:-----------------------------------------------|:---------------------:| | [Application](#application) collection | 12 to 14 | | TTS application review | 10 | | [Interviews](#interviews) | 30 | diff --git a/pages/jointts/positions/designer.md b/pages/jointts/positions/designer.md index 261c397d..a0588ef4 100644 --- a/pages/jointts/positions/designer.md +++ b/pages/jointts/positions/designer.md @@ -75,7 +75,7 @@ Please note, while a candidate's preference on teams may be taken into considera - [Login.gov](https://login.gov/): Teams supporting a product that manages identity for interactions with the federal government. ## Key objectives -### 1. Demonstrate excellence in design, while grasping the core questions and responsibilities of at least one design discipline. +### 1. Demonstrate excellence in design, while grasping the core questions and responsibilities of at least one design discipline In addition to strong skill in experience design, we expect expertise in at least one of the following disciplines: @@ -198,17 +198,17 @@ This is a term limited appointment with the ability to extend for a total of eig **Employee benefits:** [Learn more about the benefits we offer.](https://join.tts.gsa.gov/compensation-and-benefits/) - - Health insurance (choose from a wide range of plans) - - Life insurance coverage with several options - - Sick leave and vacation time, including 10 paid holidays per year - - Thrift Savings Plan (similar to a 401(k) plan) - - Flexible work schedules and telework - - Transit and child care subsidies - - Training and development - - Flexible spending accounts - - Long-term care insurance - - Training and development - - Direct Deposit of salary check to financial organization required. +- Health insurance (choose from a wide range of plans) +- Life insurance coverage with several options +- Sick leave and vacation time, including 10 paid holidays per year +- Thrift Savings Plan (similar to a 401(k) plan) +- Flexible work schedules and telework +- Transit and child care subsidies +- Training and development +- Flexible spending accounts +- Long-term care insurance +- Training and development +- Direct Deposit of salary check to financial organization required. ## Qualifications diff --git a/pages/jointts/rolling-hiring.md b/pages/jointts/rolling-hiring.md index 060bc0dd..8a410764 100644 --- a/pages/jointts/rolling-hiring.md +++ b/pages/jointts/rolling-hiring.md @@ -86,7 +86,7 @@ Note: If you are coming over from another agency where you received award leave, ## More about working at TTS The Technology Transformation Service (TTS) exists under the domain of the General Services Administration (GSA). TTS is home to the following offices: 18F, Centers of Excellence, Office of Acquisition, Office of Solutions, and Presidential Innovation Fellows. You can read more info about each office on our [Join page](https://join.tts.gsa.gov/tts-offices/). You can also read more about each of these groups at their TTS Handbook Pages: - [Acquisition](https://handbook.18f.gov/acqstack/) | [cloud.gov](https://cloud.gov/) | [Design](https://handbook.18f.gov/design/) | [Engineering](https://handbook.18f.gov/engineering/) | [login.gov](https://login.gov/) | [Product](https://handbook.18f.gov/product/) | [Strategy ](https://handbook.18f.gov/strategy/) + [Acquisition](https://handbook.18f.gov/acqstack/) | [cloud.gov](https://cloud.gov/) | [Design](https://handbook.18f.gov/design/) | [Engineering](https://handbook.18f.gov/engineering/) | [login.gov](https://login.gov/) | [Product](https://handbook.18f.gov/product/) | [Strategy](https://handbook.18f.gov/strategy/) Thank you for taking the time to talk to our team and for your interest in public service! diff --git a/postcss.config.js b/postcss.config.js index a0fa32b9..bb282ecf 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,3 +1,3 @@ module.exports = { - plugins: [require('autoprefixer')], + plugins: [require("autoprefixer")], }; diff --git a/styles/tts-custom-styles.scss b/styles/tts-custom-styles.scss index f11e7786..7accebb6 100644 --- a/styles/tts-custom-styles.scss +++ b/styles/tts-custom-styles.scss @@ -7,7 +7,7 @@ // custom tts color -$tts-tagline-bg: #1F303E; +$tts-tagline-bg: #1F303E;AddanyUSWDSoverrideshereAlternatively,youcouldcreateanoverridesfolderandcreateindividualoverridefilescustomttscolor$tts-tagline-bg // USWDS Hero component @@ -18,8 +18,8 @@ $tts-tagline-bg: #1F303E; background-position-x: right; background-size: cover; padding: 0; - @include at-media('mobile-lg') { + @include at-media('mobile-lg') { // This shifts the hero over to the right so that // most of the background image isn't covered by // the tagline. The left side of the hero image @@ -55,7 +55,7 @@ $tts-tagline-bg: #1F303E; // Setting a min height so that the hero height doesn't need to rely on tagline length - min-height: 350px; + min-height: 350px;Thisshiftstheheroovertotherightsothatmostofthebackgroundimageisn../_img/TTS_Header_Dev.pngmobile-lgtneedtorelyontaglinelengthmin-height } } @@ -87,6 +87,7 @@ footer { text-decoration: none; } + a:hover { text-decoration: underline; } @@ -98,6 +99,7 @@ footer { .tts-service-logo { height: 50px; + img { object-fit: contain; max-width: 180px; @@ -105,14 +107,14 @@ footer { } .tts-title-banner { - background: url(../_img/Services_Background.png) center no-repeat #000000; + background: url("../_img/Services_Background.png") center no-repeat #000; } .tts-title-banner h1 { text-transform: uppercase; font-size: 3.25rem; - color: #ffffff; + color: #fff; padding: 4.75rem 0; margin: 0; text-align: center; From 335717bbbe41e00e68fe182f9c8f7bba57cbee28 Mon Sep 17 00:00:00 2001 From: wesley-dean-gsa Date: Mon, 5 Aug 2024 20:26:22 +0000 Subject: [PATCH 5/5] [MegaLinter] Apply linters fixes --- styles/tts-custom-styles.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/styles/tts-custom-styles.scss b/styles/tts-custom-styles.scss index 7accebb6..214f6b21 100644 --- a/styles/tts-custom-styles.scss +++ b/styles/tts-custom-styles.scss @@ -7,7 +7,7 @@ // custom tts color -$tts-tagline-bg: #1F303E;AddanyUSWDSoverrideshereAlternatively,youcouldcreateanoverridesfolderandcreateindividualoverridefilescustomttscolor$tts-tagline-bg +$tts-tagline-bg: #1F303E;AddanyUSWDSoverrideshereAlternatively,youcouldcreateanoverridesfolderandcreateindividualoverridefilescustomttscolor$tts-tagline-bgAddanyUSWDSoverrideshereAlternatively,youcouldcreateanoverridesfolderandcreateindividualoverridefilescustomttscolor$tts-tagline-bg // USWDS Hero component @@ -55,7 +55,7 @@ $tts-tagline-bg: #1F303E;AddanyUSWDSoverrideshereAlternatively,youcouldcreateano // Setting a min height so that the hero height doesn't need to rely on tagline length - min-height: 350px;Thisshiftstheheroovertotherightsothatmostofthebackgroundimageisn../_img/TTS_Header_Dev.pngmobile-lgtneedtorelyontaglinelengthmin-height + min-height: 350px;Thisshiftstheheroovertotherightsothatmostofthebackgroundimageisn../_img/TTS_Header_Dev.pngmobile-lgtneedtorelyontaglinelengthmin-heightThisshiftstheheroovertotherightsothatmostofthebackgroundimageisn../_img/TTS_Header_Dev.pngmobile-lgtneedtorelyontaglinelengthmin-height } }