Created
March 27, 2014 16:05
-
-
Save pranavr/9811059 to your computer and use it in GitHub Desktop.
Lightbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id='map-descp'> | |
This map visualizes the 956 bicycle accidents that were reported | |
<br> | |
in Cambridge between 2010 and 2013...<b id='essayBox-source'>more</b> | |
</p> | |
<div id='essayBox'> | |
<div id='essayBox-close' class="glyphicon glyphicon-remove"></div> | |
<h1> Essay Title </h1> | |
<div id='essayContent'> | |
<h2> Motivation </h2> | |
<p> | |
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. | |
</p> | |
<h2> Data Collection </h2> | |
<p> | |
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. | |
</p> | |
<h2> Analysis and Insights</h2> | |
<p> | |
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. | |
</p> | |
<h2> References </h2> | |
<p> | |
If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. | |
</p> | |
</div> | |
</div> | |
##################### CSS ########################## | |
#essayBox-source{ | |
cursor: pointer; | |
color:rgba(255,255,255,0.9); | |
} | |
#essayBox{ | |
position: absolute; | |
top: 110px; | |
left:180px; | |
border:1px; | |
border-color: rgba(43, 40, 40, 0.5); | |
border-style: outset; | |
width: 1100px; | |
height: 600px; | |
border-radius: 5px; | |
opacity: 0.0; | |
color :rgba(250,250,250,0.98); | |
padding: 40px; | |
font-size: 15px; | |
letter-spacing: 1.5px; | |
z-index: 1; | |
background-color:rgba(0, 0, 0, 0.8); | |
font-family: 'EB Garamond', serif; | |
overflow-y:scroll; | |
} | |
#essayBox-close { | |
background-color: rgba(0, 0, 0, 0.1); | |
-moz-border-radius: 50px; | |
-webkit-border-radius: 50px; | |
border: 2px solid rgba(0, 0, 0, 0.1); | |
cursor: pointer; | |
opacity: 0.25; | |
height: 15%; | |
width: 5%; | |
padding: 5px; | |
position: absolute; | |
top: 2%; | |
left: 95%; | |
} | |
#essayBox h1{ | |
border-bottom: 1px solid; | |
} | |
#essayContent{ | |
-webkit-column-count:3; /* Chrome, Safari, Opera */ | |
-moz-column-count:3; /* Firefox */ | |
column-count:3; | |
-webkit-column-gap:40px; /* Chrome, Safari, Opera */ | |
-moz-column-gap:40px; /* Firefox */ | |
column-gap:40px; | |
} | |
########################################################### | |
###################### JS ################################# | |
var essayBoxShown = false; | |
$('#essayBox-source').click(function(){ | |
essayBoxShown = true; | |
$('#text-descp').css('opacity',0.2); | |
$('#essayBox').css('z-index',10); | |
$('#essayBox').animate({ | |
'opacity':0.9}, 1500 | |
); | |
}) | |
$('#essayBox-close').click(function(){ | |
closeEssayBox(); | |
}); | |
function closeEssayBox(){ | |
if (essayBoxShown){ | |
$('#svgContainer').animate({'opacity':1.0},'slow'); | |
$('#text-descp').css('opacity',1.0); | |
$('#essayBox').css('opacity',0.0); | |
$('#essayBox').css('z-index',1); | |
$('#svgContainer').css('z-index',3); | |
$('#text-descp').css('z-index',3); | |
essayBoxShown = false; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment