redbadger/website-honestly

View on GitHub
site/index.pug

Summary

Maintainability
Test Coverage
doctype html
html(lang='en-GB')
    head
        meta(charset='utf-8')
        meta(name='viewport' content='width=device-width, initial-scale=1.0')
        meta(name='format-detection' content='telephone=no')
        meta(name='msapplication-TileColor' content='#fc1d42')
        meta(name='theme-color' content='#212121')
        meta(name='apple-mobile-web-app-status-bar-style' content='#212121')
        meta(name='facebook-domain-verification' content='ghxc1xtgxxb2xh209kx7cxpgeqwop8')
        meta(name='msapplication-TileImage' content='/assets-honestly/favicons/mstile-144x144.png')
        each size in ['57x57', '60x60', '72x72', '76x76', '114x114', '120x120', '144x144', '152x152', '180x180']
            link(rel='apple-touch-icon' href=`/assets-honestly/favicons/apple-touch-icon-${size}.png` type='image/png' sizes=size)
        each size in ['96x96', '192x192', '16x16', '32x32', '194x194']
            link(rel='icon' href=`/assets-honestly/favicons/favicon-${size}.png` type='image/png' sizes=size)
        link(rel='manifest' href='/manifest.json')
        link(rel='stylesheet' href='https://cloud.typography.com/7838134/6842972/css/fonts.css')
        title #{title}
        if description
            meta(name="description" content=description)
        if meta
            //- Include raw html for meta tags:
            .
                !{meta}
        if cssPath
            link(rel="stylesheet" href=cssPath charset="utf-8")

        script.
            /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
            !function(e){"use strict";var n=function(n,t,o){function i(e){return a.body?e():void setTimeout(function(){i(e)})}function r(){l.addEventListener&&l.removeEventListener("load",r),l.media=o||"all"}var d,a=e.document,l=a.createElement("link");if(t)d=t;else{var s=(a.body||a.getElementsByTagName("head")[0]).childNodes;d=s[s.length-1]}var f=a.styleSheets;l.rel="stylesheet",l.href=n,l.media="only x",i(function(){d.parentNode.insertBefore(l,t?d:d.nextSibling)});var u=function(e){for(var n=l.href,t=f.length;t--;)if(f[t].href===n)return e();setTimeout(function(){u(e)})};return l.addEventListener&&l.addEventListener("load",r),l.onloadcssdefined=u,u(r),l};"undefined"!=typeof exports?exports.loadCSS=n:e.loadCSS=n}("undefined"!=typeof global?global:this);
            /*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */
            !function(e){if(e.loadCSS){var t=loadCSS.relpreload={};if(t.support=function(){try{return e.document.createElement("link").relList.supports("preload")}catch(t){return!1}},t.poly=function(){for(var t=e.document.getElementsByTagName("link"),n=0;n<t.length;n++){var o=t[n];"preload"===o.rel&&"style"===o.getAttribute("as")&&(e.loadCSS(o.href,o,o.getAttribute("media")),o.rel=null)}},!t.support()){t.poly();var n=e.setInterval(t.poly,300);e.addEventListener&&e.addEventListener("load",function(){t.poly(),e.clearInterval(n)}),e.attachEvent&&e.attachEvent("onload",function(){e.clearInterval(n)})}}}(this);
            
    body
        .js-app.
            !{bodyContent}
        input(id="state-hash" type="hidden" value=stateHash || 'none')
        if jsPath
            script(src=jsPath)

        //- Start of HubSpot Embed Code
        script(id="hs-script-loader" async defer src="//js.hs-scripts.com/4210858.js")
        //- End of HubSpot Embed Code

        style
            :clean-css
                /* Start of HubSpot Cookie Banner CSS overrides */
                /* The banner is injected by the HB script, so this needs to be as far as possible in the DOM.
                    Specificity matches/exceeds the one in HB. */

                div#hs-en-cookie-confirmation-buttons-area,
                div#hs-eu-cookie-confirmation-button-group {
                    display: block !important;
                }

                div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner a#hs-eu-confirmation-button {
                    font-family: 'ProximaNova-Bold', sans-serif;
                    font-size: 24px !important;
                    line-height: 1;
                    padding: 14px 20px !important;
                    border: 0 !important;
                    border-radius: 0 !important;
                }

                div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner p {
                    font-family: 'ProximaNova-Bold', sans-serif;
                    font-size: 16px !important;
                    line-height: 1.5em !important;
                    max-width: 600px;
                    margin: 0;
                    float: left;
                    color: #212121;
                }

                div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner p:nth-child(2) {
                    margin: 0 0 10px;
                }

                div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner p a {
                    color: #212121;
                    border-bottom: 1px solid #212121 !important;
                    font-family: 'ProximaNova-Bold', sans-serif;
                    font-size: 16px !important;
                    line-height: 1.5em !important;
                }

                div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner p a {
                    color: #212121 !important;
                }

                div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner div#hs-en-cookie-confirmation-buttons-area {
                    margin-top: 0 !important;
                }

                div#hs-eu-cookie-confirmation {
                    background-color: #FFD811;
                    box-shadow: none !important;
                    border: 0;
                }

                div#hs-eu-cookie-confirmation div#hs-eu-cookie-confirmation-inner {
                    background-color: #FFD811;
                }
                /* End of HubSpot Cookie Banner CSS overrides */

        script(src='https://cdnjs.cloudflare.com/ajax/libs/UAParser.js/0.7.19/ua-parser.min.js' integrity='sha256-WfUykOyzFASY5s5n4T1ENGfSfN0YGcvEJ75f1Zv3S0E=' crossorigin='anonymous')
        script.
            var uaSniffer = new UAParser();
            var browser = uaSniffer.getBrowser();
            if (window.location.pathname !== '/#{process.env.URL_BASENAME || ''}browser-not-supported/' ) {
                if (browser.name === 'IE' && browser.major < 10 ) {
                    window.location.pathname = '/#{process.env.URL_BASENAME || ''}browser-not-supported/';
                }
            }