Changed parts of animation system

This commit is contained in:
Tim Stallard 2016-01-08 08:10:21 +00:00
parent 9a54f7bc25
commit 8e47626282
5 changed files with 19 additions and 13 deletions

View File

@ -4,6 +4,6 @@ title: "Home"
icon: "home"
order: 0
---
<div>
<div class="animated">
Hello World!
</div>

View File

@ -5,9 +5,9 @@ $(document).ready(function(){
prefetch: true,
debug: true,
onStart: {
duration: 250,
duration: 400,
render: function (container, url) {
container.addClass('is-exiting');
container.addClass("is-exiting");
smoothState.restartCSSAnimations();
}
},

View File

@ -81,16 +81,22 @@ body{
}
.m-scene .scene_element {
animation-duration: 0.25s;
.animations .animated{
animation-duration: 0.4s;
transition-timing-function: ease-in;
animation-fill-mode: both;
}
.m-scene .scene_element--fadein {
animation-name: slideInUp;
}
.m-scene.is-exiting .scene_element {
.animations.is-exiting .animated{
animation-direction: alternate-reverse;
}
.animations[data-slug="index"]{
>div{
animation-name: slideInRight;
}
}
.animations #lightcontent{
animation-name: slideInUp;
}

View File

@ -2,7 +2,7 @@
layout: core.html
---
<div id="lightcontent" class="scene_element scene_element--fadein">
<div id="lightcontent" class="animated">
<div>
<%- content %>
</div>

View File

@ -20,7 +20,7 @@
<% }) %>
</div>
</div>
<div id="content" class="m-scene" data-slug="<%- document.slug %>">
<div id="content" class="animations" data-slug="<%- document.slug %>">
<meta data-menu="<%= document.url.split("/")[1] %>" data-slug="<%- document.slug %>" />
<%- content %>
</div>