<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<html>
<head>
<title>Book 84ya</title>
</head>
<body>
<section>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class='book'>
<div id='page-1' class='page no-anim'>
<div class='side-1' id='p1'>
<div class='content'>
<h1>Flip Book Experiment</h1>
<h3>By Usman Nasir</h3>
</div><!-- .content -->
</div><!-- .side-1 -->
<div class='side-2' id='p2'>
<div class='content'>
<div id="earth"></div>
</div><!-- .content -->
</div><!-- .side-2 -->
</div><!-- .page -->
<div id='page-2' class='page no-anim'>
<div class='side-1' id='p3'>
<div class='content'>
</div><!-- .content -->
</div><!-- .side-1 -->
<div class='side-2' id='p4'>
<div class='content'>
<h2>The Palace: Shrine of Generosity</h2>
<p>
Long after Lord Nerevar and the Tribunal triumphed over Dagoth Ur, the people wished to build a monument to the heroes of that war. Vivec thanked them, but said that it would be better to dedicate a monument not only to the glorious heroes, but to all people, great and small, who suffered and died in the war. It became the custom to make offerings here, either in thanks of our good fortune, or for those less fortunate.
</p>
<p>
The Shrine of Generosity is on the top steps of Vivec's Palace, the southernmost Canton of Vivec City. The customary donation for those in good fortune is 100 gold.
</p>
</div><!-- .content -->
</div><!-- .side-2 -->
</div><!-- #page-2 -->
<div id='page-3' class='page no-anim'>
<div class='side-1' id='p5'>
<div class='content'>
<h2>The Puzzle Canal: The Shrine of Courtesy</h2>
<p>
In a battle with Mehrunes Dagon, Vivec gave his own silver longsword to the Daedra Lord rather than dishonor himself by fighting an unarmed foe. This so impressed the Dremora, the most honorable and chivalrous of Mehrunes Dagon's Daedric servants, that they now share a bond of respect and courtesy with the followers of the Tribunal, though we must never forget that they are our enemies.
</p>
<p>
The Shrine of Courtesy is found in the heart of the Puzzle Canal, a labyrinth beneath Lord Vivec's Palace in the city of Vivec. The journey though the Puzzle Canal can be confusing and it is suggested that common pilgrims carry a scroll of ALMSIVI Intervention in case they get lost. The Dremora Krazzt is found in the center of the Puzzle Canal, and will accept a plain silver longsword if spoken to with courtesy. After Krazzt accepts the sword, pilgrims must read the inscription on the triolith.
</p>
</div><!-- .content -->
</div><!-- .side-1 -->
<div class='side-2' id='p6'>
<div class='content'>
<h2>The Mask of Vivec: Shrine of Justice</h2>
<p>
Near the altar is Vivec's Ash Mask. In the Days of Fire when Dagoth Ur first crept back into Red Mountain and awakened it, Vivec led refugees here as they fled the ash and blight. Weary, they rested here a while. When Vivec awoke, he found himself and all his followers encased in casts of grey ash. Frozen like a sleeping statue and unable to free himself or help his people, Vivec was filled with despair. Vivec's tears weakened his ash cast. He tore the ash from his perished followers, breathed life into their lungs, and cured them of the blight. This is Vivec's heroism -- his tender heart provides strength when his might fails.
</p>
<p>
The Shrine of Justice is guarded within the Gnisis Temple, in the village of Gnisis, northwest by road from the town of Ald'ruhn. When you address the shrine, it is customary to leave a potion of Cure Common Disease as a token of your respect for justice. Suitable potions may be purchased from Temple. Homemade potions are not acceptable.
</p>
</div><!-- .content -->
</div><!-- .side-2 -->
</div><!-- #page-3 -->
<div id='page-4' class='page no-anim'>
<div class='side-1' id='p7'>
<div class='content'>
<h2>Koal Cave: The Shrine of Valor</h2>
<p>
Within the Koal Cave, Vivec fought a battle with Ruddy Man, the father of the Dreugh. When he defeated Ruddy Man, Vivec spared his life, on the condition that Ruddy Man and his children would give up their tough hides to serve as armor for the Dunmer.
</p>
<p>
The Shrine of Valor is inside the Koal Cave, a cavern on the seacoast west of the ancient stronghold Berandas and south of Gnisis. The cave mouth faces south, towards the sea, and is marked by a large natural arch of stone. The region is wilderness, and finding the cave mouth can be difficult. Dreugh within the cave itself are fearsome enemies; only experienced and capable adventurers should attempt to re-enact the epic battle with the dreugh in the cave. Dreugh wax may be bought at the Temple in Gnisis. When you address the shrine, it is customary to leave a portion of dreugh wax as a token of Vivec's victorious struggle with Ruddy Man.
</p>
</div><!-- .content -->
</div><!-- .side-1 -->
<div class='side-2' id='p8'>
<div class='content'>
<h2>The Ghostfence: The Shrine of Pride</h2>
<p>
The Ghostfence is a lasting symbol of the indomitable will and power of ALMSIVI, and a monument to Dunmer pride in overcoming its enemies.
</p>
<p>
The Shrine of Pride is found within the Ghostfence, just northeast of the Ghostgate itself. The safest route to Ghostgate is along the Foyada Mamaea, a volcanic ravine running from the top of Red Mountain southwest to its end just below Balmora. An old Dwemer bridge crosses the foyada near Fort Moonmoth. A pilgrim may follow the Foyada Mamaea all the way to Ghostgate. Any journey inside the Ghostfence is dangerous, but even the most timid pilgrim should be safe, so long as he does not stray too far from the Ghostgate and flees from any minions of Dagoth Ur. When you address the shrine, it is customary to leave a soul gem in remembrance of our ancestors who were bound to the Tribunal's service.
</p>
</div><!-- .content -->
</div><!-- .side-2 -->
</div><!-- #page-4 -->
</div>
</div>
</div>
</div>
</section>
</body>
</html>
*, *:before, *:after {
margin: 0;
padding: 0;
box-sizing: border-box;
position: relative;
}
html, body {
height: 100%;
}
::-webkit-scrollbar {width:12px}
::-webkit-scrollbar-thumb {background: #222;}
::-webkit-scrollbar-track {background: transparent}
::selection {
background: #222;
color: white;
}
::-moz-selection {
background: #222;
color: white;
}
body * {
transform-style: preserve-3d; /* am i doing this wrong? */
}
body {
background:#d2e4f4;
color: #222;
font-family: 'Gabriela', serif;
perspective: 70em;/*in your face*/
}
section{
position:relative;
}
h1, p {
margin: 5% 0;
}
.book {
height: 80%;
max-height: 500px;
min-height: 300px;
width: 600px;
background:#255164;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
margin: auto;
border: 10px solid hsla(30,10%,30%,1);
border-radius: 5px;
box-shadow: 0 0 150px hsla(170,0%,0%,.4);
}
.page {
height: 100%;
width: 50%;
border-right: 10px solid transparent;
position: absolute;
top: 0; right: 0;
transform-origin: 0 50%;
transition: .6s;
/*animation: unflip .3s linear;*/
}
[class*='side'] {
height: 100%;
width: 100%;
position: absolute;
background-color: violet;
background-image: url('http://inspirationhut3.inspirationhut.netdna-cdn.com/wp-content/uploads/2012/11/Old-Paper-Texture-3.jpg');
background-size: 100% 100%;
backface-visibility: hidden;
overflow: auto;
padding: 5% 8%;
}
.side-1 {
z-index: 2;
box-shadow: inset 50px 0 50px rgba(0,0,0,.5);
transition: .5s;
}
.side-2 {
background-color: lightgreen;
transform:
rotateY(180deg);
box-shadow: inset -50px 0 50px rgba(0,0,0,.5);
}
.flipped > .side-1 {
box-shadow: inset 300px 0 50px rgba(0,0,0,.8);
transition: .6s;
}
.flipped > [class*='side'] {
pointer-events: auto;
}
.page:after {
width: 100px;
height: 50px;
background-color: #555;
position: absolute;
top: 0; bottom: 0; right: -100px;
margin: auto;
color: white;
text-shadow: 0 -1px 0 #222;
line-height: 50px;
text-align: center;
font-family: monospace;
content: 'next-page';
animation: hide .8s linear;
}
.page.flipped:after {
content: 'prev-page';
transform:
rotateY(180deg);
pointer-events: auto;
}
/* to hide on flip animation */
@keyframes hide {
0% {opacity: 0;}
85% {opacity: 0;}
100% {opacity: 1;}
}
.flipped {
transform:
rotateY(-180deg);
pointer-events: none;
/*animation: flip .3s linear;
animation-fill-mode: forwards;*/
}
.no-anim,
.no-anim:after {
animation: none;/* disable animation when page loads */
}
@keyframes flip {
to {
transform:
rotateY(-180deg);
}
}
@keyframes unflip {
from {
transform:
rotateY(-180deg);
}
to {
transform:
rotateY(0deg);
}
}
#earth {
width: 300px;
height: 300px;
margin: 20px 0 0 0px;
z-index:9999;
background: url(http://i58.tinypic.com/qq9503.jpg);
border-radius: 50%;
background-size: 610px;
box-shadow: inset 8px 36px 80px 36px rgb(0, 0, 0), inset -6px 0 12px 4px rgba(255, 255, 255, 0.3);
animation-name: rotate;
animation-duration: 12s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes rotate {
from {
background-position: 0px 0px;
}
to {
background-position: 610px 0px;
}
}
// http://stackoverflow.com/a/23371115/604040
$('.page').click(function() {
$(this).removeClass('no-anim').toggleClass('flipped');
$('.page > div').click(function(e) {
e.stopPropagation();
});
reorder()
});
function reorder(){
$(".book").each(function(){
var pages=$(this).find(".page")
var pages_flipped=$(this).find(".flipped")
pages.each(function(i){
$(this).css("z-index",pages.length-i)
})
pages_flipped.each(function(i){
$(this).css("z-index",i+1)
})
});
}
reorder()