We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47733
    • 8 Posts
    Hello fellow modx users smiley

    Does anyone happen to know how to make Miniport by HTML5UPhttps://stackoverflow.com/questions/23593625/why-noscript-and-skel-are-not-working-in-wordpress" target="_blank" rel="nofollow">http://html5up.net/miniport/url] work in MODX?

    The template head looks like this (and it works fine in Firefox from Notepad):
    <head>
    <title>Miniport by HTML5 UP</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
    <script src="js/jquery.min.js"></script>
    <script src="js/jquery.scrolly.min.js"></script>
    <script src="js/skel.min.js"></script>
    <script src="js/init.js"></script>
    <noscript>
    <link rel="stylesheet" href="css/skel.css" />
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="css/style-desktop.css" />
    </noscript>
    <!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
    <!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
    </head>

    But when I put it into a MODX template and ajust the links as below, the css doesn't work. If I take away the noscript tag, the css apparently connects, but the page is no longer responsive.
    <head>
    <title>Miniport by HTML5 UP</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
    <script src="assets/components/miniport/js/jquery.min.js"></script>
    <script src="assets/components/miniport/js/jquery.scrolly.min.js"></script>
    <script src="assets/components/miniport/js/skel.min.js"></script>
    <script src="assets/components/miniport/js/init.js"></script>
    <noscript>
    <link rel="stylesheet" href="assets/components/miniport/css/skel.css" />
    <link rel="stylesheet" href="assets/components/miniport/css/style.css" />
    <link rel="stylesheet" href="assets/components/miniport/css/style-desktop.css" />
    </noscript>
    <!--[if lte IE 8]><link rel="stylesheet" href="assets/components/miniport/css/ie/v8.css" /><![endif]-->
    <!--[if lte IE 9]><link rel="stylesheet" href="assets/components/miniport/css/ie/v9.css" /><![endif]-->
    </head>

    I have found one answer that works for Wordpress: [url]https://stackoverflow.com/questions/23593625/why-noscript-and-skel-are-not-working-in-wordpress - maybe someone can see from this, what needs to be done in MODX?

    I'm using MODX Revolution 2.2.7-pl

    thank you in advance!
    evalykke
    • Hm. I don't like their templates, too much stuff going on in the background.

      Obviously one of those javascript files is handling the CSS, and it's got a path hard-coded wrong for MODX. If you put the folders (css, js, images, fonts) in the site's root next to the index.php file it works fine.

      The paths are hard-coded in the init.js file. Just modify those paths to point to assets/theme/miniport/, or wherever you put them.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 47733
        • 8 Posts
        Thanks a lot! It all works now smiley