Move vanta-js to separate partial to avoid duplication
This commit is contained in:
parent
a39c83793e
commit
f08c70ca67
21
home.hbs
21
home.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"}}
|
||||
|
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