Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Feature/embed react #941

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions assets/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ $theme-show-notifications: false,
@forward 'global/typography';
@forward 'global/media';
@forward 'global/layout';

// NVRF --------------- //
@forward "usa-card";
@forward "usa-process-list";
@forward "usa-step-indicator";
@forward "uswds-fonts";
@forward "uswds-helpers";
2 changes: 2 additions & 0 deletions content/en/about-us.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ <h2>History</h2>
Get Registered
</button></a>
</div>

{{< reactapp >}}
8 changes: 8 additions & 0 deletions content/en/nvrf.html
Original file line number Diff line number Diff line change
@@ -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."
+++

{{< reactapp >}}
2 changes: 2 additions & 0 deletions content/ypk/about-us.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ <h2>Taagnanga</h2>
Ilaten
</button></a>
</div>

{{< reactapp >}}
2 changes: 1 addition & 1 deletion gulp/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
14 changes: 14 additions & 0 deletions gulp/nvrf.js
Original file line number Diff line number Diff line change
@@ -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([
'./assets/NVRF/**/*'
]);

return stream.pipe(gulp.dest('./static/assets/NVRF'));

});
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ <h2>{{ $translation.homepage.state_selection__heading }}</h2>

</div>
<div class="tablet:grid-col-8 right-shift">

<!-- <div id="root"></div> -->

{{ partial "accordion-group.html" . }}

Expand Down
20 changes: 20 additions & 0 deletions layouts/nvrf/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ $translation := ( index $.Site.Data.translations .Site.Language.Lang ) }}


{{ partial "head.html" . }}

<body class="page-basic">
{{ partial "header.html" . }}
<main id="main-content">
<div class="grid-container">
<section class="voter-info page-type--basic">
{{ .Content }}
</section>
</div>
</main>
{{ partial "footer.html" . }}
{{ partial "analytics.html" . }}
{{ partial "scripts.html" . }}
</body>

</html>
2 changes: 2 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ $translation := ( index $.Site.Data.translations .Site.Language.Lang ) }}
<footer role="contentinfo">
{{ if ne .Type "nvrf" }}
<section class="bg-white" title="{{ $translation.footer.section_sign_up }}" aria-label="{{ $translation.footer.section_sign_up }}">
<div class="grid-container">
<div class="grid-row grid-gap">
Expand All @@ -21,6 +22,7 @@ <h2 class="text-blue font-size-medium">{{ replace $translation.footer.subscribe_
</div>
</div>
</section>
{{ end }}

{{ partial "partials/contact-identifier.html" . }}

Expand Down
4 changes: 4 additions & 0 deletions layouts/shortcodes/reactapp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div id="root"></div>

<script type="module" crossorigin src="{{ .Site.BaseURL }}/assets/NVRF/assets/index-78294268.js"></script>
<link rel="stylesheet" href="{{ .Site.BaseURL }}/assets/NVRF/assets/index-586e8603.css">
24 changes: 8 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file removed static/.gitkeep
Empty file.