-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from niaid/staging
NDS v1.0.4
- Loading branch information
Showing
65 changed files
with
889 additions
and
721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "niaid-design-system"] | ||
path = niaid-design-system | ||
url = [email protected]:niaid/niaid-design-system.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ const babel = require('gulp-babel'); | |
const replace = require('gulp-replace'); | ||
const htmlreplace = require('gulp-html-replace'); | ||
const del = require('del'); | ||
var fs = require("fs"); | ||
|
||
let srcPath = "./niaid-design-system/"; | ||
|
||
// copyFonts - Copy Font Awesome from node_modules into project. | ||
gulp.task('copyFonts', () => { | ||
|
@@ -173,6 +176,67 @@ gulp.task('moveAssets', () => { | |
.pipe(gulp.dest('./public_html/webfonts')); | ||
}); | ||
|
||
// GULP: cleanNDSSource - Cleans out any gitignored directories before fresh copies from Global Assets are added. | ||
gulp.task('cleanNDSSource', (cb) => { | ||
let dirs = [ | ||
'./source/_patterns/00-nds/**/*', | ||
'./source/css/global/**/*', | ||
'./source/css/libraries/**/*', | ||
'./source/images/global/**/*', | ||
'./source/js/global/**/*', | ||
'./source/js/libraries/**/*', | ||
'./source/js/utilities/**/*' | ||
]; | ||
return del(dirs, {'force': true, dot: true}, cb); | ||
}); | ||
|
||
// GULP: initializeGitSubmodule - Checks to see if NDS is installed. If not, it installs the NDS submodule. | ||
gulp.task('initializeGitSubmodule', (cb) => { | ||
if (!fs.existsSync('./niaid-design-system/')) { | ||
console.log("Initializing NDS Submodule"); | ||
return exec('git submodule add [email protected]:niaid/niaid-design-system.git', function(err, stdout, stderr) { | ||
console.log(stdout); | ||
cb(err); | ||
}); | ||
} | ||
console.log("NDS Submodule Already Installed, Skipping...") | ||
return gulp.src('.'); | ||
}); | ||
|
||
// GULP: updateGitSubmodules - Pulls latest code for each submodule dependency. | ||
gulp.task('updateGitSubmodules', (cb) => { | ||
return exec('git submodule update niaid-design-system', function(err, stdout, stderr) { | ||
console.log(stdout); | ||
cb(err); | ||
}); | ||
}); | ||
|
||
// GULP: copyGlobalSass - Copy CSS into NDS Documentation | ||
gulp.task('copyGlobalSass', () => { | ||
console.log("Transferring Assets from Global SASS..."); | ||
gulp.src(srcPath + 'source/css/libraries/**/*').pipe(gulp.dest('./source/css/libraries/')); | ||
return gulp.src(srcPath + 'source/css/global/**/*').pipe(gulp.dest('./source/css/global/')); | ||
}); | ||
|
||
// GULP: copyGlobalJS - Copy JS into NDS Documentation | ||
gulp.task('copyGlobalJS', () => { | ||
console.log("Transferring Assets from Global JS..."); | ||
return gulp.src(srcPath + 'source/js/**/*').pipe(gulp.dest('./source/js/')); | ||
}); | ||
|
||
// GULP: copyGlobalPatterns - Copy Patterns into NDS Documentation | ||
gulp.task('copyGlobalPatterns', () => { | ||
console.log("Transferring Assets from Global Patterns..."); | ||
console.log("Copying Patterns..."); | ||
return gulp.src(srcPath + 'source/_patterns/00-nds/**/*').pipe(gulp.dest('./source/_patterns/00-nds/')); | ||
}); | ||
|
||
// GULP: copyGlobalImages - Copy Images into NDS Documentation | ||
gulp.task('copyGlobalImages', () => { | ||
console.log("Transferring Assets from Global Images..."); | ||
return gulp.src(srcPath + 'source/images/**/*').pipe(gulp.dest('./source/images/')); | ||
}); | ||
|
||
// GULP: serveProject - Serves project locally and watches files for changes. | ||
gulp.task('serveProject', function() { | ||
browserSync.init({ | ||
|
@@ -205,6 +269,9 @@ gulp.task('default', gulp.series('transfer', 'compile', 'serveProject')); | |
// GULP: build - Compile your project assets and build public_html folder for deploy. | ||
gulp.task('build', gulp.series('clean', 'compile', 'computePaths', 'moveAssets')); | ||
|
||
// GULP: update - Update to the latest release of NDS. Warning: This will overwrite files in the _patterns/00-nds/ directory, as well as the global/ and libraries/ folders of css/ and js/ | ||
gulp.task('update', gulp.series('cleanNDSSource', 'initializeGitSubmodule', 'updateGitSubmodules', 'copyGlobalImages', 'copyGlobalSass', 'copyGlobalJS', 'copyGlobalPatterns')); | ||
|
||
// HELPER FUNCTIONS | ||
|
||
// addPage - Helper function for the computePaths() function. Determines the path and destination of the page. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
} | ||
|
||
.datepicker { | ||
position: absolute; | ||
border: 0; | ||
padding: 0; | ||
background-color: transparent; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
source/_patterns/00-nds/01-atoms/input/input-validation/_input-validation-main.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{# | ||
--- | ||
title: Input Validation | ||
--- | ||
Type: Atoms -> Input | ||
Description: | ||
A pattern to display validation errors on form inputs. | ||
Parameters: | ||
input_validation_classes: Additional input validation classes. | ||
input_validation_text: The validation error text. | ||
Last Updated: April 30, 2021 | ||
#} | ||
|
||
{% set input_validation_classes = input_validation_classes|default() %} | ||
{% set input_validation_text = input_validation_text|default("Error with Entry.") %} | ||
|
||
<div class="input-nds input--validation {{ input_validation_classes }}">{{ input_validation_text }}</div> |
7 changes: 7 additions & 0 deletions
7
source/_patterns/00-nds/01-atoms/input/input-validation/input-validation.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.input--validation { | ||
display: none; | ||
color: $error; | ||
font-size: $s-0-75; | ||
padding: $s-0-25 0; | ||
float: right; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,7 @@ | |
@include media-breakpoint-down(sm) { | ||
padding: $s-1-50; | ||
} | ||
h2, h3 { | ||
font-weight: $font-weight-light; | ||
} | ||
} |
Oops, something went wrong.