diff --git a/docpad.js b/docpad.js index 6a72f87..e41d3e0 100644 --- a/docpad.js +++ b/docpad.js @@ -32,7 +32,31 @@ var docpadConfig = { } ] } - } + }, + templateData: { + site: { + scripts: [ + + ] + } + }, + events: { + populateCollections: function(){ + this.docpad.blocks["scripts"].add([ + "/libs/jquery.min.js", + "/libs/jquery.smoothState.min.js", + "/script.js" + ], { + defer: false + }); + this.docpad.blocks["styles"].add([ + "/libs/Animate.css", + "/libs/fa.css", + "/styles.css", + "https://fonts.googleapis.com/css?family=Open+Sans" + ]); + } + } } module.exports = docpadConfig; diff --git a/src/documents/contact.html b/src/documents/contact.html index f191deb..1c0d84e 100644 --- a/src/documents/contact.html +++ b/src/documents/contact.html @@ -49,7 +49,7 @@ order: 1 $("#formcontainer").addClass("completed"); setTimeout(function(){ $("#formcontainer").addClass("completedmsg"); - }, 400); + }, 800); } ) e.preventDefault(); diff --git a/src/documents/script.js b/src/documents/script.js index 9370eca..3485c27 100644 --- a/src/documents/script.js +++ b/src/documents/script.js @@ -18,7 +18,7 @@ $(document).ready(function(){ duration: 0, render: function (container, newContent){ container.removeClass("is-exiting"); - container.attr("data-slug", $(newContent).filter("meta").data("slug")) + container.attr("data-slug", $(newContent).filter("meta").data("slug")); container.html(newContent); var newmenu = $(newContent).filter("meta").data("menu"); diff --git a/src/documents/styles.css.scss b/src/documents/styles.css.scss index 8eaff07..de6e6c0 100644 --- a/src/documents/styles.css.scss +++ b/src/documents/styles.css.scss @@ -71,6 +71,9 @@ body{ flex-direction: column; #lightcontent{ + @at-root .animations#{&}{ + animation-name: slideInUp; + } background-color: white; color: black; flex-grow: 1; @@ -96,6 +99,9 @@ body{ } #imgcontent{ + @at-root .animations#{&}{ + animation-name: fadeInUp; + } >#headerimg{ width: 100%; height: calc(100vh - 165px + 50px); @@ -330,7 +336,7 @@ body{ } &.completed{ #inputscontainer{ - animation-name: zoomOut; + animation-name: zoomOutUp; } } &.completedmsg{ @@ -437,15 +443,6 @@ body{ } } -.animations{ - #imgcontent{ - animation-name: fadeInUp; - } - #lightcontent{ - animation-name: slideInUp; - } -} - .blogpost{ width: 100%; max-width: 800px; diff --git a/src/layouts/core.html.ejs b/src/layouts/core.html.ejs index 0b10e51..36306a3 100644 --- a/src/layouts/core.html.ejs +++ b/src/layouts/core.html.ejs @@ -2,13 +2,7 @@ <%= document.title %> // Tim Stallard - - - - - - - + <%- getBlock("styles").toHTML() %> <%- getBlock("scripts").toHTML() %>