diff --git a/.github/workflows/megalinter.yml b/.github/workflows/megalinter.yml index a9214729..479f0349 100644 --- a/.github/workflows/megalinter.yml +++ b/.github/workflows/megalinter.yml @@ -10,15 +10,13 @@ on: workflow_dispatch: permissions: - contents: write - issues: write - pull-requests: write + contents: read 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_EVENT: all # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) + 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: pull_request # 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) concurrency: @@ -49,7 +47,7 @@ jobs: # Upload MegaLinter artifacts - name: Archive production artifacts if: always() - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # pin@v3 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin@v4.3.6 with: name: MegaLinter reports path: | @@ -87,12 +85,12 @@ jobs: - name: Check to see if the SARIF a was generated id: sarif_file_exists - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # pin@v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # pin@v3.0.0 with: files: "megalinter-reports/megalinter-report.sarif" - name: Upload MegaLinter scan results to GitHub Security tab if: steps.sarif_file_exists.outputs.files_exists == 'true' - uses: github/codeql-action/upload-sarif@3e0e84636c6f5df46a2cb232ae1dd1384713150d # pin@v2 + uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # pin@v3.25.15 with: sarif_file: "megalinter-reports/megalinter-report.sarif" diff --git a/.mega-linter.yml b/.mega-linter.yml index 1947ee95..ac0bd3c6 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -21,7 +21,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 @@ -51,10 +51,19 @@ BASH_SHFMT_ARGUMENTS: -i 2 -bn -ci -sr -kp REPOSITORY_TRUFFLEHOG_ARGUMENTS: "--exclude-paths=.trufflehogignore" +# Don't let stylelint at the SCSS files -- it breaks 'em +CSS_STYLELINT_FILE_EXTENSIONS: + - ".css" + +# There aren't any validators for this custom schema YAML_V8R_FILTER_REGEX_EXCLUDE: ".*_data.*" +# Please don't spell check the filenames SPELL_CSPELL_ANALYZE_FILE_NAMES: false + +# Only spell check the content, not the data SPELL_CSPELL_FILE_EXTENSIONS: - ".md" +# So SARIF files for resolved issues aren't re-sent CLEAR_REPORT_FOLDER: true diff --git a/config/buildAssets.js b/config/buildAssets.js index 4e961960..f36b34d6 100644 --- a/config/buildAssets.js +++ b/config/buildAssets.js @@ -10,10 +10,11 @@ async function createAssetPaths() { pathPrefix = process.env.BASEURL; } - const assetPath = path.join(__dirname, '../_site/assets'); - let assetDirs = await fs.readdir(assetPath, {withFileTypes: true}) - assetDirs = assetDirs.filter(item => item.isDirectory()) - .map(item => item.name); + const assetPath = path.join(__dirname, "../_site/assets"); + let assetDirs = await fs.readdir(assetPath, { withFileTypes: true }); + assetDirs = assetDirs + .filter((item) => item.isDirectory()) + .map((item) => item.name); const assetsFiles = await Promise.all( assetDirs.map(async (dir) => { @@ -44,13 +45,13 @@ esbuild outdir: "_site/assets", format: "iife", loader: { - '.png': 'file', - '.jpg': 'file', - '.jpeg': 'file', - '.svg': 'file', - '.ttf': 'file', - '.woff': 'file', - '.woff2': 'file', + ".png": "file", + ".jpg": "file", + ".jpeg": "file", + ".svg": "file", + ".ttf": "file", + ".woff": "file", + ".woff2": "file", }, minify: process.env.ELEVENTY_ENV === "production", sourcemap: process.env.ELEVENTY_ENV !== "production", diff --git a/styles/tts-custom-styles.scss b/styles/tts-custom-styles.scss index 2dd0a11f..a7a28ce9 100644 --- a/styles/tts-custom-styles.scss +++ b/styles/tts-custom-styles.scss @@ -1,30 +1,28 @@ @use "uswds-core" as *; -// Add any USWDS overrides here -// Alternatively, you could create an overrides folder and create individual override files +$tts-tagline-bg: #1f303e; +$tts-title-banner-background-color: #000; +$tts-title-banner-h1-foreground-color: #fff; -// custom tts color -$tts-tagline-bg: #1F303E; - -// USWDS Hero component .usa-hero--tts { + background-position-x: right; + background-repeat: no-repeat; + background-size: cover; height: 10rem; + padding: 0; width: 100%; - background-repeat: no-repeat; - background-position-x: right; - 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. - position: absolute; - left:40%; - height:100%; + height: 100%; + left: 40%; + position: absolute; width: 60%; } } .tts-hero-wrap { background: url('../_img/TTS_Header_Dev.png'); + background-color: $tts-tagline-bg; background-size: cover; } @@ -33,18 +31,12 @@ $tts-tagline-bg: #1F303E; object-fit: contain; } -.tts-hero-wrap { - background-color: $tts-tagline-bg; -} - .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; } @@ -62,18 +54,18 @@ $tts-tagline-bg: #1F303E; } .usa-prose p { - max-width: unset; + max-width: unset; } footer { - a { - color: color('base-lightest'); - text-decoration: none; + a { + color: color('base-lightest'); + text-decoration: none; + } - } - a:hover { - text-decoration: underline; - } + a:hover { + text-decoration: underline; + } } .usa-social-link img { @@ -82,33 +74,36 @@ footer { .tts-service-logo { height: 50px; - img { - object-fit: contain; - max-width: 180px; - } -} -.tts-title-banner { - background: url(../_img/Services_Background.png) center no-repeat #000000; + img { + max-width: 180px; + object-fit: contain; + } } - -.tts-title-banner h1 { - text-transform: uppercase; - font-size: 3.25rem; - color: #ffffff; - padding: 4.75rem 0; - margin: 0; - text-align: center; +.tts-title-banner { + background: url('../_img/Services_Background.png') center no-repeat $tts-title-banner-background-color; + + h1 { + color: $tts-title-banner-h1-foreground-color; + font-size: 3.25rem; + margin: 0; + padding: 4.75rem 0; + text-align: center; + text-transform: uppercase; + } } -h2, h3, h4, h5 { - font-family: $theme-font-type-sans !important; +h2, +h3, +h4, +h5 { + font-family: $theme-font-type-sans !important; } .usa-identifier__logos img { - width: 2.5rem; height: 2.5rem; + width: 2.5rem; } .usa-prose .usa-card:last-child {