This file contains hidden or 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
{ | |
"banner": { | |
"image": { | |
"source": "ClientApp/dist/images/nz-fern.jpg" | |
}, | |
"content": { | |
"color": "#ffffff", | |
"heading": "MPI Animal & Plant Import Permits", | |
"title": "Growing and protecting New Zealand", | |
"subtitle": "A permit is required to import live animals and plants, and specifie d animal products and plant products. A permit is also required for animals transiting through New Zealand. The requirement for a permit is included in the import health standard for that commodity.", |
This file contains hidden or 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
const path = require('path'); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
const devMode = process.env.NODE_ENV !== 'production' | |
module.exports = { | |
entry: ['./js/index.js', './scss/style.scss'], | |
plugins: [ | |
new MiniCssExtractPlugin({ | |
// Options similar to the same options in webpackOptions.output | |
// both options are optional |
This file contains hidden or 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
{ | |
"name": "mpi", | |
"version": "1.0.0", | |
"description": "Ministry for Primary Industries (MPI) website.", | |
"main": "index.js", | |
"dependencies": { | |
"bootstrap": "^3.1.1", | |
"include-media": "^1.4.9", | |
"infinite-scroll": "^3.0.5", | |
"moment": "^2.22.2", |
This file contains hidden or 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
<div class="filter"> | |
<label class="filter__item"> | |
<input type="checkbox" id="chkStatDraft" checked="" value="DRAFT"> | |
<span>Draft</span> | |
</label> | |
<label class="filter__item"> | |
<input type="checkbox" id="chkStatWD" value="WITHDRAWN"> | |
<span>Withdrawn</span> | |
</label> | |
<label class="filter__item"> |
This file contains hidden or 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 camelCaseToSentenceCase(word) { | |
const result = word.replace(/([A-Z])/g, ' $1'); | |
const finalResult = result.charAt(0).toUpperCase() + result.slice(1); | |
return ( | |
<span>{finalResult}</span> | |
); | |
} |
This file contains hidden or 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 VanillaTilt from 'vanilla-tilt'; | |
... | |
const initTilt = () => { | |
// init tilt | |
VanillaTilt.init(document.querySelector(".card"), { | |
max: 25, | |
speed: 400 | |
}); |
This file contains hidden or 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 React from 'react'; | |
import { render } from 'react-dom'; | |
import { BrowserRouter as Router, Route } from 'react-router-dom'; | |
import { createBrowserHistory } from 'history'; | |
const addScrollAnimation = () => { | |
const anchorLinks = document.querySelectorAll('[href*="#"]'); | |
anchorLinks.forEach((anchorLink) => { | |
anchorLink.addEventListener('click', (e) => { | |
const href = e.target.getAttribute('href'); |
This file contains hidden or 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
SilverStripe\MimeValidator\MimeUploadValidator: | |
MimeTypes: | |
'json': 'text/plain' |
This file contains hidden or 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
// add overflowing text indicator for cards with longer texts | |
var win2dOptionValues = document.getElementsByClassName('win2dOption-value'); | |
for (var i=0; i < win2dOptionValues.length; i++) { | |
var curOverflow = win2dOptionValues[i].style.overflow; | |
var isOverflowing = win2dOptionValues[i].clientWidth < win2dOptionValues[i].scrollWidth || | |
win2dOptionValues[i].clientHeight < win2dOptionValues[i].scrollHeight; | |
if (isOverflowing) { | |
win2dOptionValues[i].className += " win2dOption-value--overflowing"; | |
win2dOptionValues[i].style.overflowy = "scroll"; |
This file contains hidden or 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 hideScrollbar { | |
// https://blogs.msdn.microsoft.com/kurlak/2013/11/03/hiding-vertical-scrollbars-with-pure-css-in-chrome-ie-6-firefox-opera-and-safari/ | |
// There is a CSS rule that can hide scrollbars in Webkit-based browsers (Chrome and Safari). | |
&::-webkit-scrollbar { | |
width: 0 !important | |
} | |
// There is a CSS rule that can hide scrollbars in IE 10+. | |
-ms-overflow-style: none; | |
// Use -ms-autohiding-scrollbar if you wish to display on hover. |
OlderNewer