Menu
A+ A A-

Header animation

The header animation is based on our simple CSS animation engine, which uses a simple JavaScript code

Our simple animation engine is based on the data-* attributes.

For creating animation please creata a container with class gk-animation and put elements inside it. We recommend to style these elements in the css/gk.stuff.css file.

You have to specify for every element at least two attributes: data-start and data-end. The first attribute contains starting properties for the element and these properties should be written with units. The second attribute specify which properties will be animated and what will be their final value (without units).

There are also two additional attributes: data-time and data-delay. The data-time attribute specify the time of the animation in miliseconds. The second attribute specify the time of delay for animation of the specific element (of course in the miliseconds).

The very important is fact that the content of the data-start attribute specify the start position of the animated element and all elements should be hidden at start using in example {'opacity': 0} at the data-start attribute.

Let's analyze a simple example:

<div class="gk-animation" data-height="530">
 <div class="gk-animation-wrap">
   <h2 class="gk-scale-up" data-start="{opacity:0}" data-end="{opacity:1}" data-delay="200" data-time="500">Festival 21 Feb. - 27 Feb. 2012</h2>
   <h1 class="gk-scale-up" data-start="{opacity:0}" data-end="{opacity:1}" data-delay="600" data-time="500">Festival Musico</h1>
   <div class="gk-stars" data-start="{opacity:0}" data-end="{opacity:1}" data-delay="1000" data-time="500">* * * * * *</div>
 </div>
</div>

As you can see the animation engine needs two basic wrappers - gk-animation and gk-animation-wrap. The animation will start with using opacity for animation after 200ms and with duration 500ms for the h2 element. Then (after 400ms - it is a difference between date-delay for both elements) animation will start for the h1 element also with duration 500ms. At the end the .gk-stars element will be animated.

We have also included additional class gk-scale-up which can be used for elements which will be scaled from 0 to 100% of their original size using the CSS3 transform property. We have to move this animation to the CSS code due problems with prefixed properties in the MooTools code.

It is worth to mention that some elements can be also animated in two other states of the animation - the gk-animation container changes his CSS classes - after loading the page the "loaded" class is added and after displaying the whole container the "displayed" class is added. We have used this mechanism for animating the .gka-background element in our header animation.

Responsive layout

Please remember that you have to scale down all your header elements for the tablet and mobile devices - please use for it the css/tablet.css and css/mobile.css files.

Countdown

We have implemented our own implementation of the countdown. It is very simple to implement:

<div 
    class="gk-jscounter gk-scale-up" 
    data-dateend="2-6-2013" 
    data-timeend="19:42" 
    data-timezone="+2" 
    data-start="{opacity:0}" 
    data-end="{opacity:1}" 
    data-delay="900" 
    data-time="500"
>
Counting finished!
</div>

Te idea of the counter is simple - the content of the gk-jscounter element will be displayed when the counting will be finished. To specify the time for countdown you have to specify it in the two attributes - data-dateend and data-timeend. The first attribute is used to specify the end date (in format D-M-Y) and the second attribute is used to specify the end time (in format h:m).

Very important fact - if you're using not the UTC time, please specify the data-timezone attribute - it will guarantee that the time will be calculated correctly for all users.

The rest of the data-* attributes was described in the previous paragraphs as a part of the animation engine.

K2 Custom pages

The K2 component contains additional views: speakers and event. These layouts can be used for displaying speakers (the speakers layout) and other things like schedule, sponsors (the event layout).

You can specify the layout during creation of the category:

For the normal K2 pages please use the default layout as above, for the other pages you can select the speakers or event layout:

Please remember that the event layout contains the override only for the item.php file, so please don't use it for categories which will contain the regular category pages.

Sponsors - logotypes

The Fest template contains a special structure for the sponsors logotypes.

First special place is located in the sponsors module position. There you can place a following structure:

<div class="gk-sponsors">
<h2>Sponsors</h2>
<div>
<a href="#" class="active"><img src="/images/demo/sponsor1.png" alt="Sponsor #1"></a>
<a href="#" class="active"><img src="/images/demo/sponsor2.png" alt="Sponsor #2"></a>
...
<a href="#" class="active"><img src="/images/demo/sponsor1.png" alt="Sponsor #N"></a>
</div>
</div>

The logotypes will be animated on scroll:

The second place for the sponsors is the K2 article - you have to create a category using the "events" layout and then publish an article in it. The structure for the animated sponsors is easier:

<div class="gk-sponsors-wrap">
<a href="#" class="active"><img src="/images/demo/sponsor1.png" alt="Sponsor #1"></a>
<a href="#" class="active"><img src="/images/demo/sponsor2.png" alt="Sponsor #2"></a>
...
<a href="#" class="active"><img src="/images/demo/sponsor1.png" alt="Sponsor #N"></a>
</div>

The logotypes will be animated on the page load:

The CSS code responsible for the animation is placed in the css/gk.stuff.css file.

Page Break

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin posuere nisi quis odio egestas non tempus est sollicitudin. Nulla facilisi. Pellentesque tempus suscipit nulla sed tempor. Phasellus et lorem id libero fermentum molestie sit amet sit amet mi. Quisque ultrices, neque et laoreet dictum, arcu sapien pulvinar odio, in aliquam mi dui eu leo. Nullam posuere, arcu et egestas fermentum, enim purus fermentum diam, quis porta mauris lectus ut odio. In tincidunt dapibus malesuada. Integer a lorem ligula. In tincidunt augue eget velit convallis nec pharetra eros tincidunt. Maecenas et tortor libero, vel malesuada est.

Quisque magna tellus, condimentum a porttitor eu, fermentum nec enim. Aenean et erat nec lectus adipiscing auctor. Sed tellus sapien, condimentum eget tristique ac, faucibus sed nisi. Curabitur pretium porta pulvinar. Integer cursus venenatis dictum. Morbi massa est, ultricies ut ultrices vitae, hendrerit vitae tellus. Duis a nulla quis tellus lacinia tristique.


Donec libero urna, cursus vitae sollicitudin sit amet, elementum et massa. Donec feugiat, turpis a dictum vulputate, dui diam faucibus nunc, ac sodales augue magna id augue. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sit amet nisi felis. Morbi faucibus nunc id elit aliquam ac condimentum leo laoreet. Sed nec risus sed nulla mattis volutpat in eget diam. In leo nisl, eleifend vel lobortis vel, tincidunt a ligula. Nulla placerat gravida laoreet. In lobortis, ligula in sagittis pellentesque, orci magna venenatis neque, eu sagittis lacus ante et tellus. Morbi vel semper augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam erat volutpat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin posuere nisi quis odio egestas non tempus est sollicitudin. Nulla facilisi. Pellentesque tempus suscipit nulla sed tempor. Phasellus et lorem id libero fermentum molestie sit amet sit amet mi. Quisque ultrices, neque et laoreet dictum, arcu sapien pulvinar odio, in aliquam mi dui eu leo. Nullam posuere, arcu et egestas fermentum, enim purus fermentum diam, quis porta mauris lectus ut odio. In tincidunt dapibus malesuada. Integer a lorem ligula. In tincidunt augue eget velit convallis nec pharetra eros tincidunt. Maecenas et tortor libero, vel malesuada est.


Quisque magna tellus, condimentum a porttitor eu, fermentum nec enim. Aenean et erat nec lectus adipiscing auctor. Sed tellus sapien, condimentum eget tristique ac, faucibus sed nisi. Curabitur pretium porta pulvinar. Integer cursus venenatis dictum. Morbi massa est, ultricies ut ultrices vitae, hendrerit vitae tellus. Duis a nulla quis tellus lacinia tristique.

Donec libero urna, cursus vitae sollicitudin sit amet, elementum et massa. Donec feugiat, turpis a dictum vulputate, dui diam faucibus nunc, ac sodales augue magna id augue. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sit amet nisi felis. Morbi faucibus nunc id elit aliquam ac condimentum leo laoreet. Sed nec risus sed nulla mattis volutpat in eget diam. In leo nisl, eleifend vel lobortis vel, tincidunt a ligula. Nulla placerat gravida laoreet. In lobortis, ligula in sagittis pellentesque, orci magna venenatis neque, eu sagittis lacus ante et tellus. Morbi vel semper augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam erat volutpat.

Page break example

Ut dignissim aliquet nibh tristique hendrerit. Donec ullamcorper nulla quis metus vulputate id placerat augue eleifend. Aenean venenatis consectetur orci, sit amet ultricies magna sagittis vel. Nulla non diam nisi, ut ultrices massa. Pellentesque sed nisl metus. Praesent a mi vel ante molestie venenatis.

Continuar... Page break example