<html lang="en">
<head>
<meta charset="UTF-8" />
<title>An Animated Timeline</title>
<meta name="viewport" content="width=device-width">
</head>
<body>
<header>
<div class="poster">
<h1 class="poster__heading">The North Pole 2015
<span class="poster__subheading">The Ultimate Artic Adventure</span>
<a href="#" class="btn--primary">Book Request</a>
</div>
</div>
</header>
<main class="timeline-wrapper">
<div class="svg-timeline">
<svg width="8px" height="1490.7px" viewBox="0 0 8 1490.7">
<line id="timeline" fill="none" stroke="#FFFFFF" stroke-width="8" stroke-miterlimit="10" x1="4" y1="0" x2="4" y2="1490.7"/>
</svg>
</div>
<ol class="timeline clearfix">
<li class="timeline__item">
<h3 class="timeline__day">Day 1: <span>Helsinki, Finland</span></h3>
<p class="timeline__day-sum">Your adventure begins with a one-night stay in Helsinki, Finland's capital.</p>
<a href="#" class="btn--comments">19 Comments</a>
</li>
<li class="timeline__item right">
<h3 class="timeline__day dayTwo">Day 2: <span>Embarkation Day in Murmansk</span></h3>
<p class="timeline__day-sum">From Helsinki, your charter flight will take you to Murmansk, Russia, where you'll embark on your voyage to the North Pole and get acquainted with 50 Years of Victory, the world's largest and most powerful icebreaker.</p>
<a href="#" class="btn--comments">35 Comments</a>
</li>
<li class="timeline__item">
<h3 class="timeline__day dayThree">Day 3-6: <span>Northbound in the Arctic Ocean</span></h3>
<p class="timeline__day-sum">Watching the ship crush through the Arctic ice pack is a sight you'll never forget, made even more memorable by taking a helicopter flight for a thrilling aerial view of the ship and expansive Arctic Ocean.</p>
<p class="timeline__day-sum">You can expect days, and hours,to present variable sailing conditions this far north. The crossing from Murmansk to the North Pole can take us anywhere from 5-8 days. This means you'll have plenty of time to get to know your shipmates, stare out at the horizon, grab some drinks at the bar or do some laps in our indoor pool.</p>
<a href="#" class="btn--comments">72 Comments</a>
</li>
<li class="timeline__item right">
<h3 class="timeline__day dayFour">Day 7: <span>90° North</span></h3>
<p class="timeline__day-sum">All of the anticipation of the past few days reaches a climax as you reach the North Pole! Many travelers find themselves overcome with emotion, while others are in a festive mood. Take photos, wave a flag, enjoy your moment! Later, everyone enjoys a champagne toast and a BBQ on the ice. Add an exclamation to your success by rising high in one of our hot air balloons to commemerate this great moment.</p>
<a href="#" class="btn--comments">132 Comments</a>
</li>
<li class="timeline__item">
<h3 class="timeline__day dayFive">Day 8: <span>Southbound in the Arctic Ocean</span></h3>
<p class="timeline__day-sum">Now you can sit back and relax, everything from here on out is a bonus! Expect more great memories as you head south, you may get lucky and spot a Polar Bear hunting a Seal.</p>
<a href="#" class="btn--comments">2 Comments</a>
</li>
<li class="timeline__item right">
<h3 class="timeline__day daySix">Day 9-10: <span>Franz Josef Land</span></h3>
<p class="timeline__day-sum">Now you can sit back and relax, everything from here on out is a bonus! Expect more great memories as you head south, you may get lucky and spot a Polar Bear hunting a Seal.</p>
<a href="#" class="btn--comments">12 Comments</a>
</li>
</ol>
</main>
</body>
</html>
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
.right {
float: right;
}
/* ====== MIXINS ===== */
.poster__heading, .poster__subheading {
text-align: center;
}
.poster__heading {
margin: 0 auto;
}
html {
font-family: 'Open Sans';
font-size: 100%;
}
@media screen and (min-width: 31.25em) {
html {
font-size: 105%;
}
}
@media screen and (min-width: 50em) {
html {
font-size: 115%;
}
}
@media screen and (min-width: 75em) {
html {
font-size: 125%;
}
}
.btn--primary, .btn--comments {
display: inline;
text-decoration: none;
padding: 0.45em 1.25em;
text-transform: uppercase;
font-weight: 400;
letter-spacing: 1px;
font-size: 0.75rem;
border-radius: 25px;
color: white;
font-family: 'Open Sans';
transition: all 250ms ease;
}
.btn--primary {
border: 1px solid white;
}
.btn--primary:hover {
background-color: white;
color: black;
}
.poster {
height: 100vh;
width: 100%;
background-size: cover;
background-position: center center;
background-image: url("http://codepen.vincebrown.me/assets/images/snow-mountains.jpg");
}
.poster__heading {
width: 95%;
color: white;
padding-top: 5.5rem;
font-weight: 600;
font-size: 2em;
transition: all 400ms ease;
}
@media screen and (min-width: 31.25em) {
.poster__heading {
font-size: 2.25em;
}
}
@media screen and (min-width: 50em) {
.poster__heading {
font-size: 2.75em;
}
}
.poster__subheading {
display: block;
font-size: 0.3em;
letter-spacing: 5px;
font-weight: 400;
text-transform: uppercase;
color: #ff9639;
padding-top: 0.8em;
margin-bottom: 0.6em;
}
.btn--comments {
background-color: rgba(255, 255, 255, .4);
border: none;
font-size: 0.6em;
}
.btn--comments:hover {
background-color: rgba(255, 255, 255, .6);
}
.timeline-wrapper {
position: relative;
padding-bottom: 25em;
background: linear-gradient(#000 10%, #283048 60%, #55679a 70%, rgba(255, 255, 255, 0));
}
.timeline-wrapper:after {
content: '';
display: block;
background-image: url('http://codepen.vincebrown.me/assets/images/white-mountains.jpg');
height: 500px;
width: 100%;
background-size: cover;
position: absolute;
background-position: 25% center;
z-index: -10;
bottom: 0;
}
.svg-timeline {
position: absolute;
margin-left: 50%;
transform: translateX(-50%);
display: none;
}
@media screen and (min-width: 50em) {
.svg-timeline {
display: block;
}
}
.timeline {
transition: all 250ms ease;
width: 90%;
margin: 0 auto;
}
@media screen and (min-width: 31.25em) {
.timeline {
width: 80%;
}
}
@media screen and (min-width: 50em) {
.timeline {
width: 95%;
}
}
.timeline__item {
margin-bottom: 4em;
clear: both;
}
@media screen and (min-width: 50em) {
.timeline__item {
width: 40%;
}
}
.timeline__day {
font-weight: 600;
font-size: 0.9em;
color: white;
text-transform: uppercase;
padding-bottom: 0.75em;
}
.timeline__day span {
font-weight: 300;
color: orange;
text-transform: none;
}
.timeline__day-sum {
color: white;
font-weight: 300;
font-size: 0.8em;
display: block;
margin-bottom: 1.5em;
line-height: 1.5;
}
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix {
display: inline-block;
}
/* start commented backslash hack \*/
* html .clearfix {
height: 1%;
}
.clearfix {
display: block;
}
/* close commented backslash hack */
var controller = new ScrollMagic.Controller();
TweenMax.set('#timeline',{visibility:0});
var tweenOne =
new TweenMax.fromTo('#timeline',1,{drawSVG:"0%"}, {drawSVG:"10%"});
var scene1 = new ScrollMagic.Scene({
triggerElement: '#timeline',
}).setTween(tweenOne).addTo(controller);
var tweenTwo =
new TweenMax.fromTo('#timeline',1,{drawSVG:"10%"}, {drawSVG:"20%"});
var scene2 = new ScrollMagic.Scene({
triggerElement: '.dayTwo',
}).setTween(tweenTwo).addTo(controller);
var tweenThree =
new TweenMax.fromTo('#timeline',1,{drawSVG:"20%"}, {drawSVG:"40%"});
var scene3 = new ScrollMagic.Scene({
triggerElement: '.dayThree',
}).setTween(tweenThree).addTo(controller);
var tweenFour =
new TweenMax.fromTo('#timeline',1,{drawSVG:"40%"}, {drawSVG:"65%"});
var scene3 = new ScrollMagic.Scene({
triggerElement: '.dayFour',
}).setTween(tweenFour).addTo(controller);
var tweenFive =
new TweenMax.fromTo('#timeline',1,{drawSVG:"65%"}, {drawSVG:"85%"});
var scene3 = new ScrollMagic.Scene({
triggerElement: '.dayFive',
}).setTween(tweenFive).addTo(controller);
var tweenSix =
new TweenMax.fromTo('#timeline',1,{drawSVG:"85%"}, {drawSVG:"102%"});
var scene3 = new ScrollMagic.Scene({
triggerElement: '.daySix',
}).setTween(tweenSix).addTo(controller);