Hi all, I’ve been working with a Jekyll theme by HTML5up but I’m having issues with the JS and CSS. Some of it loads but some doesn’t by the looks of it. The “main” styles are there but not the styles for smaller screen sizes. The JS also doesn’t seem to load at all, which I think is where the problem lies because the JS is where the CS styles are loaded I think.
There’s a skel.min.js file that seems to load the CSS which I’ve never seen before. It has this function at the start:
(function($) {
skel.init({
reset: 'full',
breakpoints: {
global: { range: '*', href: '{{ site.baseurl }}/css/style.css', containers: 1400, grid: { gutters: 50 } },
wide: { range: '-1680', href: '{{ site.baseurl }}/css/style-wide.css', containers: 1200, grid: { gutters: 40 } },
normal: { range: '-1280', href: '{{ site.baseurl }}/css/style-normal.css', containers: 960, viewport: { scalable: false } },
narrow: { range: '-980', href: '{{ site.baseurl }}/css/style-narrow.css', containers: '95%', grid: { gutters: 30 } },
narrower: { range: '-840', href: '{{ site.baseurl }}/css/style-narrower.css', grid: { collapse: 1 } },
mobile: { range: '-736', href: '{{ site.baseurl }}/css/style-mobile.css', containers: '100%', grid: { gutters: 15, collapse: 2 } }
}
The style and script tags are in a head include which seems fairly standard and looks like this:
<head>
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="{{ site.description }}">
<meta name="keywords" content="" />
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="{{ site.baseurl }}/js/jquery.min.js"></script>
<script src="{{ site.baseurl }}/js/jquery.dropotron.min.js"></script>
<script src="{{ site.baseurl }}/js/jquery.scrolly.min.js"></script>
<script src="{{ site.baseurl }}/js/jquery.scrollgress.min.js"></script>
<script src="{{ site.baseurl }}/js/skel.min.js"></script>
<script src="{{ site.baseurl }}/js/skel-layers.min.js"></script>
<link rel="stylesheet" href="{{ site.baseurl }}/css/skel.css" />
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" />
<link rel="stylesheet" href="{{ site.baseurl }}/css/style-wide.css" />
<link rel="stylesheet" href="{{ site.baseurl }}/css/style-noscript.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="/peoples-project/css/ie/v8.css" /><![endif]-->
<!--[if lte IE 9]><link rel="stylesheet" href="/peoples-project/css/ie/v9.css" /><![endif]-->
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
</head>
I’m really not sure what the problem is and I’ve ran out of ideas in terms of how to fix it or even how to troubleshoot it. I’d be really grateful if anyone had any ideas. The source code is here and the live site is here.