From 2e30264f91a4f3a3ed5c3d9ec722b76999cb7809 Mon Sep 17 00:00:00 2001 From: Ray Estrada Date: Mon, 27 Nov 2023 17:09:42 -0800 Subject: [PATCH 01/22] VOTE-246 Integrate nvrf app into static site --- .gitignore | 2 +- assets/styles/main.scss | 6 + content/en/nvrf.html | 8 + gulp/build.js | 2 +- gulp/nvrf.js | 14 + gulpfile.js | 1 + layouts/nvrf/single.html | 19 + layouts/partials/footer.html | 2 + layouts/shortcodes/nvrfapp.html | 4 + package-lock.json | 2425 +++++++++++++++++++++++++++---- package.json | 3 +- 11 files changed, 2221 insertions(+), 265 deletions(-) create mode 100644 content/en/nvrf.html create mode 100644 gulp/nvrf.js create mode 100644 layouts/nvrf/single.html create mode 100644 layouts/shortcodes/nvrfapp.html diff --git a/.gitignore b/.gitignore index db9cb6a29..1708bc4cf 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ npm-debug.log *.indd/vendor/ # Assets generated by build pipeline -static/assets/* +static/**/* # The compiled Hugo site public/ diff --git a/assets/styles/main.scss b/assets/styles/main.scss index b1bcab891..b289db20b 100644 --- a/assets/styles/main.scss +++ b/assets/styles/main.scss @@ -18,6 +18,12 @@ $theme-show-notifications: false, @forward "usa-prose"; @forward "usa-intro"; @forward "usa-language-selector"; +// NVRF dependencies --------------- // +@forward "usa-card"; +@forward "usa-process-list"; +@forward "usa-step-indicator"; +@forward "uswds-fonts"; +@forward "uswds-helpers"; @forward 'component/language-switcher'; @forward 'component/identifier'; diff --git a/content/en/nvrf.html b/content/en/nvrf.html new file mode 100644 index 000000000..27d6f07e1 --- /dev/null +++ b/content/en/nvrf.html @@ -0,0 +1,8 @@ ++++ +title = "NVRF" +meta_title = "NVRF" +type = "nvrf" +meta_description = "Vote.gov is a United States government website that provides trusted voting information and can help you find voter registration rules for your state." ++++ + +{{< nvrfapp >}} diff --git a/gulp/build.js b/gulp/build.js index 55079ec40..361163138 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -136,7 +136,7 @@ exports.buildWebsite = buildWebsite; exports.watch = watch; exports.website= website; -var build = gulp.series(cleanAll, printPackageInfo, gulp.parallel('styles', 'scripts', 'images', 'fonts'), 'data'); +var build = gulp.series(cleanAll, printPackageInfo, gulp.parallel('styles', 'scripts', 'images', 'fonts', 'nvrf'), 'data'); var buildWebsite = gulp.series (build, buildWebsite); var website = gulp.series (build, website); diff --git a/gulp/nvrf.js b/gulp/nvrf.js new file mode 100644 index 000000000..5cf7c3ec8 --- /dev/null +++ b/gulp/nvrf.js @@ -0,0 +1,14 @@ +var gulp = require('gulp'); +var log = require('fancy-log'); +var colors = require('ansi-colors'); + +gulp.task('nvrf', function () { + + log(colors.cyan('nvrf'), 'Copying nvrf assets'); + var stream = gulp.src([ + './node_modules/vote-gov-nvrf-app/dist/**/*' + ]); + + return stream.pipe(gulp.dest('./static/nvrf')); + +}); diff --git a/gulpfile.js b/gulpfile.js index 8eaea6096..97fd5189b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,6 +7,7 @@ require('./gulp/styles'); require('./gulp/scripts'); require('./gulp/images'); require('./gulp/fonts'); +require('./gulp/nvrf'); require('./gulp/data'); var build = require('./gulp/build'); var gulp = require('gulp'); diff --git a/layouts/nvrf/single.html b/layouts/nvrf/single.html new file mode 100644 index 000000000..713c70325 --- /dev/null +++ b/layouts/nvrf/single.html @@ -0,0 +1,19 @@ +{{ $translation := ( index $.Site.Data.translations .Site.Language.Lang ) }} + +{{ partial "head.html" . }} + + +{{ partial "header.html" . }} +
+
+
+ {{ .Content }} +
+
+
+{{ partial "footer.html" . }} +{{ partial "analytics.html" . }} +{{ partial "scripts.html" . }} + + + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 9b1ea2c86..e55a5c022 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,6 @@ {{ $translation := ( index $.Site.Data.translations .Site.Language.Lang ) }}