-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
6,315 additions
and
614 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,26 +1,42 @@ | ||
import React from 'react' | ||
import React from 'react'; | ||
|
||
// Import PDS Global wrapper for applying global context providers. | ||
import { GlobalWrapper } from "@pantheon-systems/pds-toolkit-react" | ||
import { MOBILE_MENU_BREAKPOINT } from './src/vars/responsive' | ||
import { GlobalWrapper } from '@pantheon-systems/pds-toolkit-react'; | ||
import { MOBILE_MENU_BREAKPOINT } from './src/vars/responsive'; | ||
|
||
/* | ||
* Add global scripts to ensure Bootstrap and jQuery JS is included | ||
*/ | ||
export const onRenderBody = ({ setPostBodyComponents }) => { | ||
setPostBodyComponents([ | ||
<script key="jquery" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js" />, | ||
<script key="bootstrap" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" />, | ||
<script | ||
key="jquery" | ||
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js" | ||
/>, | ||
<script | ||
key="bootstrap" | ||
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" | ||
/>, | ||
<script key="twitter" src="https://platform.twitter.com/widgets.js" />, | ||
|
||
// OneTrust Banner | ||
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="fba5027b-04c0-4165-8778-4e10fb9f5fa3" />, | ||
function OptanonWrapper() { | ||
window.dataLayer.push({'event':'OneTrustGroupsUpdated'}) | ||
} | ||
]) | ||
} | ||
<script | ||
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" | ||
type="text/javascript" | ||
charset="UTF-8" | ||
data-domain-script="fba5027b-04c0-4165-8778-4e10fb9f5fa3" | ||
/>, | ||
function OptanonWrapper() { | ||
window.dataLayer.push({ event: 'OneTrustGroupsUpdated' }); | ||
}, | ||
]); | ||
}; | ||
|
||
// Global context providers | ||
export const wrapRootElement = ({ element }) => { | ||
return <GlobalWrapper mobileMenuMaxWidth={MOBILE_MENU_BREAKPOINT}>{element}</GlobalWrapper> | ||
} | ||
return ( | ||
<GlobalWrapper mobileMenuMaxWidth={MOBILE_MENU_BREAKPOINT}> | ||
{element} | ||
</GlobalWrapper> | ||
); | ||
}; |
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.