Move vanta-js to separate partial to avoid duplication
This commit is contained in:
parent
a39c83793e
commit
f08c70ca67
25
home.hbs
25
home.hbs
@ -1,8 +1,8 @@
|
||||
{{!< default}}
|
||||
|
||||
<div class="mind-index-header_main unselectable" id="vantajs">
|
||||
<h1>{{@site.title}}</h1>
|
||||
<i class="mind-global-header_arrow-down mind-global-header_arrow-down-big"></i>
|
||||
<h1>{{@site.title}}</h1>
|
||||
<i class="mind-global-header_arrow-down mind-global-header_arrow-down-big"></i>
|
||||
</div>
|
||||
|
||||
|
||||
@ -20,23 +20,4 @@
|
||||
</main>
|
||||
|
||||
{{!-- Vanta.JS Scripts to make the background cool, but disabled on mobile --}}
|
||||
<script>
|
||||
if(window.screen.width > 800)
|
||||
{
|
||||
document.write('<script src="{{asset "js/three.r95.min.js"}}"><\/script>' +
|
||||
'<script src="{{asset "js/vanta.net.min.js"}}"><\/script>' +
|
||||
'<script>' +
|
||||
'VANTA.NET({'+
|
||||
'el: "#vantajs",'+
|
||||
'color: 0x3fd5ff,'+
|
||||
'backgroundColor: 0x190f2b,'+
|
||||
'mouseControls: true,'+
|
||||
'touchControls: true,'+
|
||||
'minHeight: 200.00,'+
|
||||
'minWidth: 200.00,'+
|
||||
'scale: 1.00,'+
|
||||
'scaleMobile: 1.00'+
|
||||
'})'+
|
||||
'<\/script>');
|
||||
}
|
||||
</script>
|
||||
{{> "vanta-js"}}
|
||||
|
21
index.hbs
21
index.hbs
@ -20,23 +20,4 @@
|
||||
</main>
|
||||
|
||||
{{!-- Vanta.JS Scripts to make the background cool, but disabled on mobile --}}
|
||||
<script>
|
||||
if(window.screen.width > 800)
|
||||
{
|
||||
document.write('<script src="{{asset "js/three.r95.min.js"}}"><\/script>' +
|
||||
'<script src="{{asset "js/vanta.net.min.js"}}"><\/script>' +
|
||||
'<script>' +
|
||||
'VANTA.NET({'+
|
||||
'el: "#vantajs",'+
|
||||
'color: 0x3fd5ff,'+
|
||||
'backgroundColor: 0x190f2b,'+
|
||||
'mouseControls: true,'+
|
||||
'touchControls: true,'+
|
||||
'minHeight: 200.00,'+
|
||||
'minWidth: 200.00,'+
|
||||
'scale: 1.00,'+
|
||||
'scaleMobile: 1.00'+
|
||||
'})'+
|
||||
'<\/script>');
|
||||
}
|
||||
</script>
|
||||
{{> "vanta-js"}}
|
||||
|
20
partials/vanta-js.hbs
Normal file
20
partials/vanta-js.hbs
Normal file
@ -0,0 +1,20 @@
|
||||
<script>
|
||||
if(window.screen.width > 800)
|
||||
{
|
||||
document.write('<script src="{{asset "js/three.r95.min.js"}}"><\/script>' +
|
||||
'<script src="{{asset "js/vanta.net.min.js"}}"><\/script>' +
|
||||
'<script>' +
|
||||
'VANTA.NET({'+
|
||||
'el: "#vantajs",'+
|
||||
'color: 0x3fd5ff,'+
|
||||
'backgroundColor: 0x190f2b,'+
|
||||
'mouseControls: true,'+
|
||||
'touchControls: true,'+
|
||||
'minHeight: 200.00,'+
|
||||
'minWidth: 200.00,'+
|
||||
'scale: 1.00,'+
|
||||
'scaleMobile: 1.00'+
|
||||
'})'+
|
||||
'<\/script>');
|
||||
}
|
||||
</script>
|
21
tag.hbs
21
tag.hbs
@ -31,23 +31,4 @@
|
||||
</main>
|
||||
|
||||
{{!-- Vanta.JS Scripts to make the background cool, but disabled on mobile --}}
|
||||
<script>
|
||||
if(window.screen.width > 800)
|
||||
{
|
||||
document.write('<script src="{{asset "js/three.r95.min.js"}}"><\/script>' +
|
||||
'<script src="{{asset "js/vanta.net.min.js"}}"><\/script>' +
|
||||
'<script>' +
|
||||
'VANTA.NET({'+
|
||||
'el: "#vantajs",'+
|
||||
'color: 0x3fd5ff,'+
|
||||
'backgroundColor: 0x190f2b,'+
|
||||
'mouseControls: true,'+
|
||||
'touchControls: true,'+
|
||||
'minHeight: 200.00,'+
|
||||
'minWidth: 200.00,'+
|
||||
'scale: 1.00,'+
|
||||
'scaleMobile: 1.00'+
|
||||
'})'+
|
||||
'<\/script>');
|
||||
}
|
||||
</script>
|
||||
{{> "vanta-js"}}
|
||||
|
Loading…
Reference in New Issue
Block a user