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
#!/bin/bash | |
# Hide all output | |
# exec 1>/dev/null 2>/dev/null | |
# Set git version tag | |
version="1.1.20" | |
# Set github repo url | |
repoUrl="https://github.com/dvsa/front-end.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
<!DOCTYPE html> | |
<!--[if lte IE 8 ]><html class="lte-ie8" lang="en"><![endif]--> | |
<!--[if IE 9 ]><html class="ie9" lang="en"><![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--><html class="" lang="en"><!--<![endif]--> |
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
@mixin ie-lte($version) { | |
@if & { | |
.lte-ie#{$version} & { | |
@content; | |
} | |
} @else { | |
.lte-ie#{$version} { | |
@content; | |
} | |
} |
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
{% macro button(text='', url=false, start=false, disabled=false) %} | |
{% set disabledCode = 'disabled="disabled" aria-disabled="true"' %} | |
{% if url %} | |
<a class="button {{ 'button-start' if start }}" href="{{ url }}" role="button">{{ text }}</a> | |
{% else %} | |
<input class="button" type="submit" value="{{ text }}" {{ disabledCode if disabled }}> | |
{% endif %} | |
{% endmacro %} |
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
{# Import macros for global use in all views #} | |
{% set components = {} %} | |
{% for component in macroFilePaths %} | |
{% import component as temp %}{% set macro = _.assign(components, temp) %} | |
{% endfor %} | |
{# end #} |
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
// Create express server | |
const app = express(); | |
// Create nunjucks fileloader instance for the views folder | |
const nunjucksFileLoader = new nunjucks.FileSystemLoader(path.resolve('/path/to/views/folder'), { | |
noCache: true, | |
}); | |
// Create a nunjucks instance to be used for the view engine | |
// This instance can be used to add filters and globals |
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
function(err, html) { | |
let outputFolder = path.resolve('output'); | |
// Check if folder does not exist | |
if ( !fs.existsSync(outputFolder) ) { | |
// Create folder | |
fs.mkdirSync(outputFolder); | |
} | |
// Write html output to file |
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
(function(document) { | |
// Object to store new query params, | |
// the current ones will be replaced, | |
// new ones will be added to the url | |
var newParams = { | |
'recall-ui': '', | |
'lambda-return-code': '', | |
'recall-outcome': '', | |
'recall-outcome-detail': '', |
NewerOlder