renamed to reveal.js, many new features, and upgraded to v1.0
This commit is contained in:
1 parent
40f85e43a7
commit
a6453a0fb0
6 files changed
+749
-99
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 55 KiB |
+332
-55
@@ -1,4 +1,6 @@
|
||||
/**
|
||||
* Main styles of reveal.js
|
||||
*
|
||||
* @author Hakim El Hattab
|
||||
*/
|
||||
|
||||
@@ -20,33 +22,32 @@
|
||||
*********************************************/
|
||||
|
||||
html, body {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
font-family: 'Crimson Text', Times, 'Times New Roman', serif;
|
||||
font-family: 'Lato', Times, 'Times New Roman', serif;
|
||||
font-size: 36px;
|
||||
font-weight: 200;
|
||||
letter-spacing: -0.02em;
|
||||
|
||||
background: #fff;
|
||||
color: #222;
|
||||
background: #111;
|
||||
color: #eee;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
background-image: -webkit-gradient(
|
||||
radial,
|
||||
50% 50%, 0,
|
||||
50% 50%, 1000,
|
||||
from(rgba(245,245,245,1.0)),
|
||||
to(rgba(100,100,100,1.0))
|
||||
);
|
||||
|
||||
background-image: -moz-radial-gradient(
|
||||
50% 50% 90deg,
|
||||
rgba(245,245,245,1.0) 0%,
|
||||
rgba(100,100,100,1.0) 100%
|
||||
);
|
||||
|
||||
min-height: 600px;
|
||||
|
||||
background: #555a5f;
|
||||
background: -moz-radial-gradient(center, ellipse cover, #555a5f 0%, #1c1e20 100%);
|
||||
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#555a5f), color-stop(100%,#1c1e20));
|
||||
background: -webkit-radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%);
|
||||
background: -o-radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%);
|
||||
background: -ms-radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%);
|
||||
background: radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,16 +57,14 @@ html, body {
|
||||
h1, h2, h3, h4 {
|
||||
margin: 0 0 20px 0;
|
||||
|
||||
color: #222;
|
||||
color: #eee;
|
||||
|
||||
font-family: 'League Gothic', Arial, Helvetica, sans-serif;
|
||||
font-family: 'League Gothic', sans-serif;
|
||||
line-height: 0.9em;
|
||||
letter-spacing: 0.02em;
|
||||
|
||||
text-transform: uppercase;
|
||||
|
||||
text-shadow: 0px 1px 0px #eee,
|
||||
0px 0px 4px #bbb;
|
||||
text-shadow: 0px 0px 6px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
h1 { font-size: 136px; }
|
||||
@@ -78,8 +77,21 @@ h2.inverted,
|
||||
h3.inverted,
|
||||
h4.inverted {
|
||||
color: #fff;
|
||||
text-shadow: 0px 0px 1px #fff,
|
||||
0px 0px 1px #888;
|
||||
text-shadow: 0px 0px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-shadow: 0 1px 0 #ccc,
|
||||
0 2px 0 #c9c9c9,
|
||||
0 3px 0 #bbb,
|
||||
0 4px 0 #b9b9b9,
|
||||
0 5px 0 #aaa,
|
||||
0 6px 1px rgba(0,0,0,.1),
|
||||
0 0 5px rgba(0,0,0,.1),
|
||||
0 1px 3px rgba(0,0,0,.3),
|
||||
0 3px 5px rgba(0,0,0,.2),
|
||||
0 5px 10px rgba(0,0,0,.25),
|
||||
0 20px 20px rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,18 +100,24 @@ h4.inverted {
|
||||
*********************************************/
|
||||
#main {
|
||||
position: absolute;
|
||||
width: 800px;
|
||||
width: 900px;
|
||||
height: 600px;
|
||||
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -400px;
|
||||
margin-left: -450px;
|
||||
margin-top: -320px;
|
||||
padding: 20px 0px;
|
||||
|
||||
text-align: center;
|
||||
|
||||
-webkit-perspective: 600px;
|
||||
-moz-perspective: 600px;
|
||||
perspective: 600px;
|
||||
|
||||
-webkit-perspective-origin: 50% 25%;
|
||||
-moz-perspective-origin: 50% 25%;
|
||||
perspective-origin: 50% 25%;
|
||||
}
|
||||
|
||||
#main>section,
|
||||
@@ -111,6 +129,8 @@ h4.inverted {
|
||||
min-height: 600px;
|
||||
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
|
||||
-webkit-transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
-moz-transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
@@ -122,52 +142,136 @@ h4.inverted {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
|
||||
-webkit-transform: translate3d(-100%, 0, 0)
|
||||
rotateY(-90deg)
|
||||
translate3d(-100%, 0, 0);
|
||||
-webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);
|
||||
-moz-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* DEFAULT THEME
|
||||
*********************************************/
|
||||
|
||||
#main section.present {
|
||||
display: block;
|
||||
position: relative;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
|
||||
-webkit-transform-style: flat;
|
||||
-moz-transform-style: flat;
|
||||
transform-style: flat;
|
||||
}
|
||||
|
||||
#main section.future {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
|
||||
-webkit-transform: translate3d(100%, 0, 0)
|
||||
rotateY(90deg)
|
||||
translate3d(100%, 0, 0);
|
||||
-webkit-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);
|
||||
-moz-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);
|
||||
}
|
||||
|
||||
#main section>section.past {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
|
||||
-webkit-transform: translate3d(0, -50%, 0)
|
||||
rotateX(70deg)
|
||||
translate3d(0, -50%, 0);
|
||||
-webkit-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0);
|
||||
-moz-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0);
|
||||
transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0);
|
||||
}
|
||||
#main section>section.future {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
|
||||
-webkit-transform: translate3d(0, 50%, 0)
|
||||
rotateX(-70deg)
|
||||
translate3d(0, 50%, 0);
|
||||
-webkit-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0);
|
||||
-moz-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0);
|
||||
transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* CONCAVE THEME
|
||||
*********************************************/
|
||||
|
||||
.concave #main>section.past {
|
||||
-webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);
|
||||
-moz-transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);
|
||||
}
|
||||
|
||||
.concave #main>section.future {
|
||||
-webkit-transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);
|
||||
-moz-transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* LINEAR THEME
|
||||
*********************************************/
|
||||
|
||||
.linear #main>section.past {
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
-moz-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
|
||||
.linear #main>section.future {
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
-moz-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
|
||||
.linear #main section>section.past {
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
-moz-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
.linear #main section>section.future {
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-moz-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* VIEW FRAGMENTS
|
||||
*********************************************/
|
||||
|
||||
#main section .fragment {
|
||||
opacity: 0;
|
||||
|
||||
-webkit-transition: all .2s ease;
|
||||
-moz-transition: all .2s ease;
|
||||
-o-transition: all .2s ease;
|
||||
transition: all .2s ease;
|
||||
}
|
||||
#main section .fragment.visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* DEFAULT ELEMENT STYLES
|
||||
*********************************************/
|
||||
|
||||
#main>section {
|
||||
line-height: 1.2em;
|
||||
text-shadow: 0px 0px 2px #fff, 0px 0px 4px #bbb;
|
||||
font-weight: 600;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
strong, b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em, i {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
display: inline-block;
|
||||
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
ol {
|
||||
@@ -175,20 +279,79 @@ ol {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
li, p {
|
||||
ul {
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 70%;
|
||||
margin: 5px auto;
|
||||
padding: 5px;
|
||||
|
||||
font-style: italic;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
blockquote:before {
|
||||
content: '“';
|
||||
}
|
||||
blockquote:after {
|
||||
content: '”';
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 90%;
|
||||
margin: 10px auto;
|
||||
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-family: monospace;
|
||||
line-height: 1.1em;
|
||||
|
||||
word-wrap: break-word;
|
||||
|
||||
box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 60%;
|
||||
}
|
||||
|
||||
q {
|
||||
font-style: italic;
|
||||
}
|
||||
q:before {
|
||||
content: '“';
|
||||
}
|
||||
q:after {
|
||||
content: '”';
|
||||
}
|
||||
|
||||
a:not(.image) {
|
||||
color: #1b6263;
|
||||
color: hsl(185, 85%, 50%);
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dashed rgba(0,0,0,0.3);
|
||||
padding: 1px 3px;
|
||||
|
||||
-webkit-transition: all .2s ease;
|
||||
-moz-transition: all .2s ease;
|
||||
-o-transition: all .2s ease;
|
||||
transition: all .2s ease;
|
||||
}
|
||||
|
||||
a:not(.image):hover {
|
||||
color: #fff;
|
||||
background: #2fa794;
|
||||
color: hsl(185, 85%, 70%);
|
||||
background: hsla(185, 25%, 20%, 0.4);
|
||||
text-shadow: none;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
@@ -201,27 +364,141 @@ img {
|
||||
|
||||
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||
-o-box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||
|
||||
-webkit-transition: all .11s linear;
|
||||
-moz-transition: all .11s linear;
|
||||
-o-transition: all .11s linear;
|
||||
transition: all .11s linear;
|
||||
-webkit-transition: all .2s linear;
|
||||
-moz-transition: all .2s linear;
|
||||
-o-transition: all .2s linear;
|
||||
transition: all .2s linear;
|
||||
}
|
||||
|
||||
a.image:hover img {
|
||||
background: rgba(255,255,255,0.2);
|
||||
border-color: #13DAEC;
|
||||
|
||||
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
|
||||
-moz-box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
|
||||
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||
-moz-box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||
-o-box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* CONTROLS
|
||||
*********************************************/
|
||||
|
||||
.controls {
|
||||
display: none;
|
||||
position: fixed;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.controls a {
|
||||
font-size: 30px;
|
||||
position: absolute;
|
||||
opacity: 0.1;
|
||||
color: #fff;
|
||||
}
|
||||
.controls a.enabled {
|
||||
opacity: 0.6;
|
||||
color: hsl(185, 85%, 70%);
|
||||
|
||||
text-shadow: 0px 0px 2px hsla(185, 45%, 70%, 0.3);
|
||||
}
|
||||
.controls a.enabled:active {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.controls .left {
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.controls .right {
|
||||
left: 60px;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.controls .up {
|
||||
left: 30px;
|
||||
}
|
||||
|
||||
.controls .down {
|
||||
left: 30px;
|
||||
top: 60px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* ROLLING LINKS
|
||||
*********************************************/
|
||||
|
||||
.roll {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
|
||||
vertical-align: top;
|
||||
|
||||
-webkit-perspective: 400px;
|
||||
-moz-perspective: 400px;
|
||||
perspective: 400px;
|
||||
|
||||
-webkit-perspective-origin: 50% 50%;
|
||||
-moz-perspective-origin: 50% 50%;
|
||||
perspective-origin: 50% 50%;
|
||||
}
|
||||
.roll:hover {
|
||||
background: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
.roll span {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 0 2px;
|
||||
|
||||
-webkit-transition: all 400ms ease;
|
||||
-moz-transition: all 400ms ease;
|
||||
transition: all 400ms ease;
|
||||
|
||||
-webkit-transform-origin: 50% 0%;
|
||||
-moz-transform-origin: 50% 0%;
|
||||
transform-origin: 50% 0%;
|
||||
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
.roll:hover span {
|
||||
background: rgba(0,0,0,0.5);
|
||||
|
||||
-webkit-transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg );
|
||||
-moz-transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg );
|
||||
transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg );
|
||||
}
|
||||
.roll span:after {
|
||||
content: attr(data-title);
|
||||
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding: 0 2px;
|
||||
|
||||
color: #fff;
|
||||
background: hsl(185, 60%, 35%);
|
||||
|
||||
-webkit-transform-origin: 50% 0%;
|
||||
-moz-transform-origin: 50% 0%;
|
||||
transform-origin: 50% 0%;
|
||||
|
||||
-webkit-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
|
||||
-moz-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
|
||||
transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
|
||||
}
|
||||
|
||||
|
||||
+105
-10
@@ -4,12 +4,14 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>CSS 3D Slideshow</title>
|
||||
<title>reveal.js</title>
|
||||
|
||||
<link href='http://fonts.googleapis.com/css?family=Crimson+Text:regular,600,bold' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
||||
<link rel="stylesheet" href="lib/zenburn.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -18,19 +20,20 @@
|
||||
<div id="main">
|
||||
|
||||
<section>
|
||||
<h1>Slideshow</h1>
|
||||
<h1>Reveal.js</h1>
|
||||
<h3 class="inverted">With 3D effects. And stuff.</h3>
|
||||
<script>
|
||||
// Delicously hacky. Look away.
|
||||
var message = navigator.userAgent.match( /(iPhone|iPad|iPod|Android)/i ) ? 'Tap to navigate' : 'Navigate via keyboard';
|
||||
document.write( '<p style="color: rgba(0,0,0,0.1); text-shadow: none;">('+message+')</p>' );
|
||||
if( navigator.userAgent.match( /(iPhone|iPad|iPod|Android)/i ) )
|
||||
document.write( '<p style="color: rgba(0,0,0,0.3); text-shadow: none;">('+'Tap to navigate'+')</p>' );
|
||||
</script>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Heads Up</h2>
|
||||
<p>
|
||||
This requires a browser with support for CSS3 3D transforms, such as Mobile Safari.
|
||||
reveal.js is an easy to use, HTML based, presentation tool. You'll need a modern browser with
|
||||
support for CSS 3D transforms to see it in its full glory.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -82,6 +85,44 @@
|
||||
<li>Three!</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Clever Quotes</h2>
|
||||
<p>
|
||||
These guys come in two forms, inline: <q cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-Technology-Quotations">
|
||||
The nice thing about standards is that there are so many to choose from</q> and block:
|
||||
</p>
|
||||
<blockquote cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-Technology-Quotations">
|
||||
For years there has been a theory that millions of monkeys typing at random on millions of typewriters would
|
||||
reproduce the entire works of Shakespeare. The Internet has proven this theory to be untrue.
|
||||
</blockquote>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Pretty Code</h2>
|
||||
<pre><code>var supports3DTransforms = document.body.style['webkitPerspective'] !== undefined ||
|
||||
document.body.style['MozPerspective'] !== undefined ||
|
||||
document.body.style['perspective'] !== undefined;
|
||||
|
||||
function linkify( selector ) {
|
||||
if( supports3DTransforms ) {
|
||||
|
||||
var nodes = document.querySelectorAll( selector );
|
||||
|
||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||
var node = nodes[i];
|
||||
|
||||
if( !node.className || !node.className.match( /roll/g ) ) {
|
||||
node.className += ' roll';
|
||||
node.innerHTML = '<span data-title="'+ node.text +'">' + node.innerHTML + '</span>';
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
linkify( 'a' );</code></pre>
|
||||
<p>Courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Intergalactic Interconnections</h2>
|
||||
@@ -90,19 +131,30 @@
|
||||
<a href="#/2/3">like this</a>.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Fragmented Views</h2>
|
||||
<p>Hit the next arrow...</p>
|
||||
<p class="fragment">... to step through ...</p>
|
||||
<ol>
|
||||
<li class="fragment"><code>any type</code></li>
|
||||
<li class="fragment"><em>of view</em></li>
|
||||
<li class="fragment"><strong>fragments</strong></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Spectacular image!</h2>
|
||||
<a class="image" href="http://hakim.se/experiments/html5/breakdom/" target="_blank">
|
||||
<img src="assets/images/breakdom.jpg">
|
||||
<img src="data:image/png;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABWAAD/7gAOQWRvYmUAZMAAAAAB/9sAhAACAQEBAQECAQECAgIBAgIDAgICAgMDAwMDAwMDBAMEBAQEAwQEBQUFBQUEBwcHBwcHCgkJCQoLCwsLCwsLCwsLAQICAgMDAwYEBAYJBwYHCQsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwv/wAARCAGcAUADAREAAhEBAxEB/8QAuwABAQADAQEBAQEAAAAAAAAAAAcFBggEAgMJAQEBAQADAQEBAAAAAAAAAAAAAAUDBAYCAQcQAAAGAgIBAgQEBQIDBAcJAAECAwQFBgAHEQgSIRMxIhQJQSMVFlEyQhcYYSRxgTOk1CVWkaHRUmLVNnKSQ3M0VJSV1hEAAQMCBAQEAwUHBAICAQUBAQARAgMEITESBUFRcQZhgSITkaEU8LHBMlLR4UJygiMVYpIzFvGi0nNDssJTk6PT/9oADAMBAAIRAxEAPwDudvO1vrLPTGuqHatIWCoEdrlZsLVaWkLKQqxjiJm64JCuCxEh5ACCQh/wEwj652VDct5NGEfbqSEQACAcRw4F8Mjy5rk7rtqznVlOEhAyJJGBxObYhnK9PSu36O7BXbcGn4x0W5WhBq0jb3b6ykz/AGcio8QE6MNGuiPFll1kCHOZQfEQKPPkcB8S5B3W+u7ivqruJRwALhm6+PzVzbtut7Sj7dIYHEnmfH7l+DyzzXW5/wD44SNk0U7sBwIhAO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EZG4bndXJiKp/I7DkePi+A+Cq7ftVvaRkKYfVmTx5ff81GXlnmutz/8AxwkbJop3YDgRCAdW6yIw00kgp6J/URIG8nR+BDxFMyQG/hnR0t43i4p+8KdSYGcgDpLcSwIfniPJc/U7WsYVNMZiA/Th8BjlywKr0P0+Bn16lNYEnE079NybayPbCm0SUQ/VGrtB6iYGomKUyBBbkJ4eQGEn9Xl82c6d4uvrPq9X9zn4MzdGw6LoBtNsLT6XT/b5ebv1fHqpqWXsn90z0Im1esgbxMgSGUigjB/XxTIoZQjYW/7j+p4A5zGAnjxyIjxlX63ePb+p9uej9WmWluuXzUj/AK5YP7euT8nH3MqZKdUrIhpGt0iBszMmxazYF7WlNSMYRWPdPnh3p3KazJNdIxW5gfHKUCKgcoAXkxvXym097vIXUrgS9cwx8Rhh5MG6BVKuzWtS1jbmPojiOYOOPXE/FTCrObBsi3y9A19tnrW72PID4TTWrxYOpvyQRBv5qIo2JRQyiKZQAvuFECgHHwynO+3i2iK86coxP8RjIA+ZwKljt3b5nTrJbg4/YqLuTqs3DWNQc0+XYMrlraKSax0tYk0xZOGjdsRJcj4CGSAiaoJAYxiGL4iHp6cgMuw3e7oXMq1MkzqPq/1OX+L49VVvtotbm3jRmGjBtLfwsGw8sOimtPWJ3WlUqGhO6bJSowyatkb68saNnkngJKABkx8PbKzRUEODAJTm/ADAPrlncN03ahSMasKlMTDPIEYHMBwMx8lIsO3LONUTMxUMS4GDOMnxOS3/ALJVtnr3ZMfs+G2Hrqlv30CjXTxux0kTtHSMcssukq0N+oxyoKJ/VGKcPIxeBD0AfjN2u93GNGVK2jKUXcgAljlw5sPgqW5bRaXUxOLine truncated
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Stellar Links</h2>
|
||||
<ul>
|
||||
<li><a href="hakim-slideshow-0.3.zip">Download this slideshow</a></li>
|
||||
<li><a href="http://hakim.se/experiments/css3-3d-slideshow">Read more on my site</a></li>
|
||||
<li><a href="https://github.com/hakimel/reveal.js">Source code on github</a></li>
|
||||
<li><a href="http://hakim.se/experiments/reveal.js">Read more on my site</a></li>
|
||||
<li><a href="http://twitter.com/hakimel">Follow me on Twitter</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -113,8 +165,51 @@
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<aside class="controls">
|
||||
<a class="left" href="#">◄</a>
|
||||
<a class="right" href="#">►</a>
|
||||
<a class="up" href="#">▲</a>
|
||||
<a class="down" href="#">▼</a>
|
||||
</aside>
|
||||
|
||||
<script src="js/slideshow.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
<script src="lib/highlight.js"></script>
|
||||
<script>
|
||||
Reveal.initialize({
|
||||
// Display controls in the bottom right corner
|
||||
controls: true,
|
||||
|
||||
// Apply a 3D roll to links on hover
|
||||
rollingLinks: false,
|
||||
|
||||
// Styling themes, only affects transitions for now
|
||||
theme: 'default' // default/concave/linear
|
||||
});
|
||||
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- Everything below this point is unrelated to the slideshow -->
|
||||
|
||||
<div style="position: absolute; bottom: 10px; left: 50%; margin-left: -95px">
|
||||
<a href="http://twitter.com/share" class="twitter-share-button" data-text="reveal.js - a 3D slideshow tool from @hakimel." data-url="http://lab.hakim.se/reveal-js" data-count="small" data-related="hakimel"></a>
|
||||
<iframe id="facebook-button" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fapp.hakim.se%2Freveal-js%2F&layout=button_count&show_faces=false&width=90&action=like&font=arial&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:85px; height:24px; position: relative; top: 4px;" allowTransparency="true"></iframe>
|
||||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var _gaq = [['_setAccount', 'UA-15240703-1'], ['_trackPageview']];
|
||||
(function(d, t) {
|
||||
var g = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
g.async = true;
|
||||
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g, s);
|
||||
})(document, 'script');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+192
-34
@@ -21,21 +21,21 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Handles the very minimal navigation logic involved in the
|
||||
* slideshow. Including keyboard navigation, touch interaction
|
||||
* and URL history behavior.
|
||||
* Reveal.js is an easy to use HTML based slideshow enhanced by
|
||||
* sexy CSS 3D transforms.
|
||||
*
|
||||
* Slides are given unique hash based URL's so that they can be
|
||||
* opened directly. I didn't use the HTML5 History API for this
|
||||
* as it would have required the addition of server side rewrite
|
||||
* rules and hence require more effort for anyone to set up.
|
||||
*
|
||||
* This component can be called from other scripts via a tiny API:
|
||||
* - Slideshow.navigateTo( indexh, indexv );
|
||||
* - Slideshow.navigateLeft();
|
||||
* - Slideshow.navigateRight();
|
||||
* - Slideshow.navigateUp();
|
||||
* - Slideshow.navigateDown();
|
||||
* Public facing methods:
|
||||
* - Reveal.initialize( { ... options ... } );
|
||||
* - Reveal.navigateTo( indexh, indexv );
|
||||
* - Reveal.navigateLeft();
|
||||
* - Reveal.navigateRight();
|
||||
* - Reveal.navigateUp();
|
||||
* - Reveal.navigateDown();
|
||||
*
|
||||
*
|
||||
* version 0.1:
|
||||
@@ -52,26 +52,84 @@
|
||||
* version 0.4:
|
||||
* - Fixed broken links on touch devices.
|
||||
*
|
||||
* version 1.0:
|
||||
* - Added controls
|
||||
* - Added initialization options
|
||||
* - Reveal views in fragments
|
||||
* - Revamped, darker, theme
|
||||
* - Tweaked markup styles (a, em, strong, b, i, blockquote, q, pre, ul, ol)
|
||||
* - Support for themes at initialization (default/linear/concave)
|
||||
* - Code highlighting via highlight.js
|
||||
*
|
||||
* TODO:
|
||||
* - Touch/swipe interactions
|
||||
*
|
||||
* @author Hakim El Hattab
|
||||
* @version 0.4
|
||||
* @version 1.0
|
||||
*/
|
||||
var Slideshow = (function(){
|
||||
var Reveal = (function(){
|
||||
|
||||
var indexh = 0,
|
||||
indexv = 0;
|
||||
var HORIZONTAL_SLIDES_SELECTOR = '#main>section',
|
||||
VERTICAL_SLIDES_SELECTOR = 'section.present>section',
|
||||
|
||||
indexh = 0,
|
||||
indexv = 0,
|
||||
|
||||
config = {},
|
||||
dom = {};
|
||||
|
||||
/**
|
||||
* Activates the main program logic.
|
||||
*/
|
||||
function initialize() {
|
||||
function initialize( options ) {
|
||||
// Gather references to DOM elements
|
||||
dom.controls = document.querySelector( '.controls' );
|
||||
dom.controlsLeft = document.querySelector( '.controls .left' );
|
||||
dom.controlsRight = document.querySelector( '.controls .right' );
|
||||
dom.controlsUp = document.querySelector( '.controls .up' );
|
||||
dom.controlsDown = document.querySelector( '.controls .down' );
|
||||
|
||||
// Add event listeners
|
||||
document.addEventListener('keydown', onDocumentKeyDown, false);
|
||||
document.addEventListener('touchstart', onDocumentTouchStart, false);
|
||||
window.addEventListener('hashchange', onWindowHashChange, false);
|
||||
|
||||
dom.controlsLeft.addEventListener('click', preventAndForward( navigateLeft ), false);
|
||||
dom.controlsRight.addEventListener('click', preventAndForward( navigateRight ), false);
|
||||
dom.controlsUp.addEventListener('click', preventAndForward( navigateUp ), false);
|
||||
dom.controlsDown.addEventListener('click', preventAndForward( navigateDown ), false);
|
||||
|
||||
// Set default configuration
|
||||
config.rollingLinks = options.rollingLinks === undefined ? true : options.rollingLinks;
|
||||
config.controls = options.controls === undefined ? false : options.controls;
|
||||
config.theme = options.theme === undefined ? 'default' : options.theme;
|
||||
|
||||
if( config.controls ) {
|
||||
dom.controls.style.display = 'block';
|
||||
}
|
||||
|
||||
if( config.theme !== 'default' ) {
|
||||
document.body.classList.add( config.theme );
|
||||
}
|
||||
|
||||
if( config.rollingLinks ) {
|
||||
// Add some 3D magic to our anchors
|
||||
linkify();
|
||||
}
|
||||
|
||||
// Read the initial state of the URL (hash)
|
||||
readURL();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents an events defaults behavior calls the
|
||||
* specified delegate.
|
||||
*/
|
||||
function preventAndForward( delegate ) {
|
||||
return function( event ) {
|
||||
event.preventDefault();
|
||||
delegate.call();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for the document level 'keydown' event.
|
||||
@@ -153,6 +211,28 @@ var Slideshow = (function(){
|
||||
function onWindowHashChange( event ) {
|
||||
readURL();
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap all links in 3D goodness.
|
||||
*/
|
||||
function linkify() {
|
||||
var supports3DTransforms = document.body.style['webkitPerspective'] !== undefined ||
|
||||
document.body.style['MozPerspective'] !== undefined ||
|
||||
document.body.style['perspective'] !== undefined;
|
||||
|
||||
if( supports3DTransforms ) {
|
||||
var nodes = document.querySelectorAll( 'section a:not(.image)' );
|
||||
|
||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||
var node = nodes[i];
|
||||
|
||||
if( !node.className || !node.className.match( /roll/g ) ) {
|
||||
node.className += ' roll';
|
||||
node.innerHTML = '<span data-title="'+ node.text +'">' + node.innerHTML + '</span>';
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates one dimension of slides by showing the slide
|
||||
@@ -204,11 +284,45 @@ var Slideshow = (function(){
|
||||
* set indices.
|
||||
*/
|
||||
function slide() {
|
||||
indexh = updateSlides( '#main>section', indexh );
|
||||
indexv = updateSlides( 'section.present>section', indexv );
|
||||
indexh = updateSlides( HORIZONTAL_SLIDES_SELECTOR, indexh );
|
||||
indexv = updateSlides( VERTICAL_SLIDES_SELECTOR, indexv );
|
||||
|
||||
updateControls();
|
||||
|
||||
writeURL();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the state and link pointers of the controls.
|
||||
*/
|
||||
function updateControls() {
|
||||
var routes = availableRoutes();
|
||||
|
||||
// Remove the 'enabled' class from all directions
|
||||
[ dom.controlsLeft, dom.controlsRight, dom.controlsUp, dom.controlsDown ].forEach( function( node ) {
|
||||
node.classList.remove( 'enabled' );
|
||||
} )
|
||||
|
||||
if( routes.left ) dom.controlsLeft.classList.add( 'enabled' );
|
||||
if( routes.right ) dom.controlsRight.classList.add( 'enabled' );
|
||||
if( routes.up ) dom.controlsUp.classList.add( 'enabled' );
|
||||
if( routes.down ) dom.controlsDown.classList.add( 'enabled' );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function availableRoutes() {
|
||||
var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
|
||||
var verticalSlides = document.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
|
||||
|
||||
return {
|
||||
left: indexh > 0,
|
||||
right: indexh < horizontalSlides.length - 1,
|
||||
up: indexv > 0,
|
||||
down: indexv < verticalSlides.length - 1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the current URL (hash) and navigates accordingly.
|
||||
@@ -233,11 +347,47 @@ var Slideshow = (function(){
|
||||
|
||||
// Only include the minimum possible number of components in
|
||||
// the URL
|
||||
if( indexh > 0 || indexv > 0 ) url += indexh
|
||||
if( indexv > 0 ) url += '/' + indexv
|
||||
if( indexh > 0 || indexv > 0 ) url += indexh;
|
||||
if( indexv > 0 ) url += '/' + indexv;
|
||||
|
||||
window.location.hash = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigate to the nexy slide fragment.
|
||||
*
|
||||
* @return {Boolean} true if there was a next fragment,
|
||||
* false otherwise
|
||||
*/
|
||||
function nextFragment() {
|
||||
var fragments = document.querySelectorAll( '.present .fragment:not(.visible)' );
|
||||
|
||||
if( fragments.length ) {
|
||||
fragments[0].classList.add( 'visible' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigate to the previous slide fragment.
|
||||
*
|
||||
* @return {Boolean} true if there was a previous fragment,
|
||||
* false otherwise
|
||||
*/
|
||||
function previousFragment() {
|
||||
var fragments = document.querySelectorAll( '.present .fragment.visible' );
|
||||
|
||||
if( fragments.length ) {
|
||||
fragments[ fragments.length - 1 ].classList.remove( 'visible' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a navigation to the specified indices.
|
||||
@@ -253,31 +403,39 @@ var Slideshow = (function(){
|
||||
}
|
||||
|
||||
function navigateLeft() {
|
||||
indexh --;
|
||||
indexv = 0;
|
||||
slide();
|
||||
// Prioritize hiding fragments
|
||||
if( previousFragment() === false ) {
|
||||
indexh --;
|
||||
indexv = 0;
|
||||
slide();
|
||||
}
|
||||
}
|
||||
function navigateRight() {
|
||||
indexh ++;
|
||||
indexv = 0;
|
||||
slide();
|
||||
// Prioritize revealing fragments
|
||||
if( nextFragment() === false ) {
|
||||
indexh ++;
|
||||
indexv = 0;
|
||||
slide();
|
||||
}
|
||||
}
|
||||
function navigateUp() {
|
||||
indexv --;
|
||||
slide();
|
||||
// Prioritize hiding fragments
|
||||
if( previousFragment() === false ) {
|
||||
indexv --;
|
||||
slide();
|
||||
}
|
||||
}
|
||||
function navigateDown() {
|
||||
indexv ++;
|
||||
slide();
|
||||
// Prioritize revealing fragments
|
||||
if( nextFragment() === false ) {
|
||||
indexv ++;
|
||||
slide();
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the program. Done right before returning to ensure
|
||||
// that any inline variable definitions are available to all
|
||||
// functions
|
||||
initialize();
|
||||
|
||||
// Expose some methods publicly
|
||||
return {
|
||||
initialize: initialize,
|
||||
navigateTo: navigateTo,
|
||||
navigateLeft: navigateLeft,
|
||||
navigateRight: navigateRight,
|
||||
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
Syntax highlighting with language autodetection.
|
||||
http://softwaremaniacs.org/soft/highlight/
|
||||
*/
|
||||
var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/</gm,"<")}function c(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function j(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function g(t,s){var r="";for(var q=0;q<t.childNodes.length;q++){if(t.childNodes[q].nodeType==3){var p=t.childNodes[q].nodeValue;if(s){p=p.replace(/\n/g,"")}r+=p}else{if(t.childNodes[q].nodeName=="BR"){r+="\n"}else{r+=g(t.childNodes[q])}}}if(/MSIE [678]/.test(navigator.userAgent)){r=r.replace(/\r/g,"\n")}return r}function a(s){var q=s.className.split(/\s+/);q=q.concat(s.parentNode.className.split(/\s+/));for(var p=0;p<q.length;p++){var r=q[p].replace(/^language-/,"");if(d[r]||r=="no-highlight"){return r}}}function b(p){var q=[];(function(s,t){for(var r=0;r<s.childNodes.length;r++){if(s.childNodes[r].nodeType==3){t+=s.childNodes[r].nodeValue.length}else{if(s.childNodes[r].nodeName=="BR"){t+=1}else{q.push({event:"start",offset:t,node:s.childNodes[r]});t=arguments.callee(s.childNodes[r],t);q.push({event:"stop",offset:t,node:s.childNodes[r]})}}}return t})(p,0);return q}function l(y,z,x){var r=0;var w="";var t=[];function u(){if(y.length&&z.length){if(y[0].offset!=z[0].offset){return(y[0].offset<z[0].offset)?y:z}else{return z[0].event=="start"?y:z}}else{return y.length?y:z}}function s(C){var D="<"+C.nodeName.toLowerCase();for(var A=0;A<C.attributes.length;A++){var B=C.attributes[A];D+=" "+B.nodeName.toLowerCase();if(B.nodeValue!=undefined&&B.nodeValue!=false&&B.nodeValue!=null){D+='="'+m(B.nodeValue)+'"'}}return D+">"}while(y.length||z.length){var v=u().splice(0,1)[0];w+=m(x.substr(r,v.offset-r));r=v.offset;if(v.event=="start"){w+=s(v.node);t.push(v.node)}else{if(v.event=="stop"){var q=t.length;do{q--;var p=t[q];w+=("</"+p.nodeName.toLowerCase()+">")}while(p!=v.node);t.splice(q,1);while(q<t.length){w+=s(t[q]);q++}}}}w+=x.substr(r);return w}function i(){function p(u,t,v){if(u.compiled){return}if(!v){u.bR=c(t,u.b?u.b:"\\B|\\b");if(!u.e&&!u.eW){u.e="\\B|\\b"}if(u.e){u.eR=c(t,u.e)}}if(u.i){u.iR=c(t,u.i)}if(u.r==undefined){u.r=1}if(u.k){u.lR=c(t,u.l||hljs.IR,true)}for(var s in u.k){if(!u.k.hasOwnProperty(s)){continue}if(u.k[s] instanceof Object){u.kG=u.k}else{u.kG={keyword:u.k}}break}if(!u.c){u.c=[]}u.compiled=true;for(var r=0;r<u.c.length;r++){p(u.c[r],t,false)}if(u.starts){p(u.starts,t,false)}}for(var q in d){if(!d.hasOwnProperty(q)){continue}p(d[q].dM,d[q],true)}}function e(J,D){if(!i.called){i();i.called=true}function z(r,M){for(var L=0;L<M.c.length;L++){if(M.c[L].bR.test(r)){return M.c[L]}}}function w(L,r){if(C[L].e&&C[L].eR.test(r)){return 1}if(C[L].eW){var M=w(L-1,r);return M?M+1:0}return 0}function x(r,L){return L.iR&&L.iR.test(r)}function A(O,N){var M=[];for(var L=0;L<O.c.length;L++){M.push(O.c[L].b)}var r=C.length-1;do{if(C[r].e){M.push(C[r].e)}r--}while(C[r+1].eW);if(O.i){M.push(O.i)}return c(N,"("+M.join("|")+")",true)}function s(M,L){var N=C[C.length-1];if(!N.t){N.t=A(N,H)}N.t.lastIndex=L;var r=N.t.exec(M);if(r){return[M.substr(L,r.index-L),r[0],false]}else{return[M.substr(L),"",true]}}function p(O,r){var L=H.cI?r[0].toLowerCase():r[0];for(var N in O.kG){if(!O.kG.hasOwnProperty(N)){continue}var M=O.kG[N].hasOwnProperty(L);if(M){return[N,M]}}return false}function F(M,O){if(!O.k){return m(M)}var N="";var P=0;O.lR.lastIndex=0;var L=O.lR.exec(M);while(L){N+=m(M.substr(P,L.index-P));var r=p(O,L);if(r){t+=r[1];N+='<span class="'+r[0]+'">'+m(L[0])+"</span>"}else{N+=m(L[0])}P=O.lR.lastIndex;L=O.lR.exec(M)}N+=m(M.substr(P,M.length-P));return N}function K(r,M){if(M.sL&&d[M.sL]){var L=e(M.sL,r);t+=L.keyword_count;return L.value}else{return F(r,M)}}function I(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){q+=L;M.buffer=""}else{if(M.eB){q+=m(r)+L;M.buffer=""}else{q+=L;M.buffer=r}}C.push(M);B+=M.r}function E(O,L,Q){var R=C[C.length-1];if(Q){q+=K(R.buffer+O,R);return false}var M=z(L,R);if(M){q+=K(R.buffer+O,R);I(M,L);return M.rB}var r=w(C.length-1,L);if(r){var N=R.cN?"</span>":"";if(R.rE){q+=K(R.buffer+O,R)+N}else{if(R.eE){q+=K(R.buffer+O,R)+N+m(L)}else{q+=K(R.buffer+O+L,R)+N}}while(r>1){N=C[C.length-2].cN?"</span>":"";q+=N;r--;C.length--}var P=C[C.length-1];C.length--;C[C.length-1].buffer="";if(P.starts){I(P.starts,"")}return R.rE}if(x(L,R)){throw"Illegal"}}var H=d[J];var C=[H.dM];var B=0;var t=0;var q="";try{var v=0;H.dM.buffer="";do{var y=s(D,v);var u=E(y[0],y[1],y[2]);v+=y[0].length;if(!u){v+=y[1].length}}while(!y[2]);if(C.length>1){throw"Illegal"}return{r:B,keyword_count:t,value:q}}catch(G){if(G=="Illegal"){return{r:0,keyword_count:0,value:m(D)}}else{throw G}}}function f(t){var r={keyword_count:0,r:0,value:m(t)};var q=r;for(var p in d){if(!d.hasOwnProperty(p)){continue}var s=e(p,t);s.language=p;if(s.keyword_count+s.r>q.keyword_count+q.r){q=s}if(s.keyword_count+s.r>r.keyword_count+r.r){q=r;r=s}}if(q.language){r.second_best=q}return r}function h(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,functiLine truncated
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
|
||||
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
|
||||
based on dark.css by Ivan Sagalaev
|
||||
|
||||
*/
|
||||
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
background: #3F3F3F;
|
||||
color: #DCDCDC;
|
||||
}
|
||||
|
||||
pre .keyword,
|
||||
pre .tag,
|
||||
pre .django .tag,
|
||||
pre .django .keyword,
|
||||
pre .css .class,
|
||||
pre .css .id,
|
||||
pre .lisp .title {
|
||||
color: #E3CEAB;
|
||||
}
|
||||
|
||||
pre .django .template_tag,
|
||||
pre .django .variable,
|
||||
pre .django .filter .argument {
|
||||
color: #DCDCDC;
|
||||
}
|
||||
|
||||
pre .number,
|
||||
pre .date {
|
||||
color: #8CD0D3;
|
||||
}
|
||||
|
||||
pre .dos .envvar,
|
||||
pre .dos .stream,
|
||||
pre .variable,
|
||||
pre .apache .sqbracket {
|
||||
color: #EFDCBC;
|
||||
}
|
||||
|
||||
pre .dos .flow,
|
||||
pre .diff .change,
|
||||
pre .python .exception,
|
||||
pre .python .built_in,
|
||||
pre .literal,
|
||||
pre .tex .special {
|
||||
color: #EFEFAF;
|
||||
}
|
||||
|
||||
pre .diff .chunk,
|
||||
pre .ruby .subst {
|
||||
color: #8F8F8F;
|
||||
}
|
||||
|
||||
pre .dos .keyword,
|
||||
pre .python .decorator,
|
||||
pre .class .title,
|
||||
pre .haskell .label,
|
||||
pre .function .title,
|
||||
pre .ini .title,
|
||||
pre .diff .header,
|
||||
pre .ruby .class .parent,
|
||||
pre .apache .tag,
|
||||
pre .nginx .built_in,
|
||||
pre .tex .command,
|
||||
pre .input_number {
|
||||
color: #efef8f;
|
||||
}
|
||||
|
||||
pre .dos .winutils,
|
||||
pre .ruby .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .ruby .symbol .keyword,
|
||||
pre .ruby .symbol .keymethods,
|
||||
pre .ruby .string,
|
||||
pre .ruby .instancevar {
|
||||
color: #DCA3A3;
|
||||
}
|
||||
|
||||
pre .diff .deletion,
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .preprocessor,
|
||||
pre .built_in,
|
||||
pre .sql .aggregate,
|
||||
pre .javadoc,
|
||||
pre .smalltalk .class,
|
||||
pre .smalltalk .localvars,
|
||||
pre .smalltalk .array,
|
||||
pre .css .rules .value,
|
||||
pre .attr_selector,
|
||||
pre .pseudo,
|
||||
pre .apache .cbracket,
|
||||
pre .tex .formula {
|
||||
color: #CC9393;
|
||||
}
|
||||
|
||||
pre .shebang,
|
||||
pre .diff .addition,
|
||||
pre .comment,
|
||||
pre .java .annotation,
|
||||
pre .template_comment,
|
||||
pre .pi,
|
||||
pre .doctype {
|
||||
color: #7F9F7F;
|
||||
}
|
||||
|
||||
pre .xml .css,
|
||||
pre .xml .javascript,
|
||||
pre .xml .vbscript,
|
||||
pre .tex .formula {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user