This commit is contained in:
Tim Stallard 2016-04-11 08:21:38 +01:00
parent 4ae787c0b3
commit ee6accb687
4 changed files with 40 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
node_modules node_modules
out out
src/files/contactsubmit.php

View File

@ -19,10 +19,10 @@ order: 1
<a class="icon fa fa-twitter" style="display: inline-block;" href="https://twitter.com/Tim_Stallard"></a> <a class="icon fa fa-twitter" style="display: inline-block;" href="https://twitter.com/Tim_Stallard"></a>
</div> </div>
</div> </div>
<div class="animated"> <div class="animated" id="formcontainer">
<div> <div id="inputscontainer" class="animated">
Or, if you're feeling lazy, you can just fill out this form: Or, if you're feeling lazy, you can just fill out this form:
<form> <form id="contactform">
<input name="name" placeholder="Name"></input> <input name="name" placeholder="Name"></input>
<input name="subject" placeholder="Subject"></input> <input name="subject" placeholder="Subject"></input>
<input name="contact" placeholder="Email/Phone/Twitter"></input> <input name="contact" placeholder="Email/Phone/Twitter"></input>
@ -30,5 +30,19 @@ order: 1
<input type="submit" value="Send!"></input> <input type="submit" value="Send!"></input>
</form> </form>
</div> </div>
<div id="completed" class="animated">
Your message has been sent. Expect to hear back soon!
</div>
</div> </div>
</div> </div>
<script>
$("#contactform").submit(function(e){
$("#formcontainer").addClass("completed");
setTimeout(function(){
$("#formcontainer").addClass("completedmsg");
}, 400)
e.preventDefault();
//alert("done");
return false;
});
</script>

View File

@ -314,6 +314,26 @@ body{
} }
} }
&#formcontainer{
#completed{
display: none;
}
&.completed{
#inputscontainer{
animation-name: zoomOut;
}
}
&.completedmsg{
#inputscontainer{
display: none;
}
#completed{
animation-name: zoomIn;
display: block;
}
}
}
>div{ //centered sections >div{ //centered sections
margin: auto; margin: auto;
>.icon{ >.icon{
@ -344,7 +364,7 @@ body{
} }
} }
} }
@media(min-width: 800px) and (max-height: 120vw){ @media (min-width: 800px) and (max-height: 120vw){
>div{ //page container >div{ //page container
flex-direction: row; flex-direction: row;
>div{ //contact panels >div{ //contact panels

View File

@ -33,7 +33,7 @@
</div> </div>
<div id="footer"> <div id="footer">
<h3>&copy; Tim Stallard 2015</h3> <h3>&copy; Tim Stallard 2015</h3>
Hand crafted in the UK with DocPad, SmoothState.js, and lots of other magic - see the code on GitHub Hand crafted in the UK with DocPad, SmoothState.js, and lots of other magic - see the code <a href="https://github.com/TimStallard/timstallard.me.uk">on GitHub</a>
</div> </div>
</body> </body>
</html> </html>