Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing a style issue

  • Loading branch information...
commit d29ed97789dd892c33e349984c8c87b6602f597b 2 parents 0262fff + 0a83e97
@shiftkey shiftkey authored
View
3  .gitignore
@@ -1 +1,2 @@
-less/*.css
+less/*.css
+_site
View
0  _config.yml
No changes.
View
213 sample-blog.html → demos/blog/index.html
@@ -1,108 +1,107 @@
-<!-- a template for people to start styling up a blog-style application using metro principles.
- note the use of semantic markup instead of classes everywhere
-
- things to ponder:
- - perhaps a stylesheet that derives from metro.css for elements such as these
- - how would you specify image alignments using CSS?
- - asides represent pull-out text - how should they be styled?
- -->
-
-<!DOCTYPE html>
-<html>
- <head>
- <link rel="stylesheet/less" type="text/css" href="less/metroblog.less" />
- <style>
- body { width: 800px; margin: 0 auto; }
- </style>
- <script src="scripts/less-1.2.1.min.js" type="text/javascript"></script>
- </head>
- <body>
- <section>
- <header>
- <h1>My sample blog</h1>
- </header>
- <section>
-
- <nav>
- <ul>
- <li><a href="#" class="active">Blog</a></li>
- <li><a href="#">Contact</a></li>
- <li><a href="#">About</a></li>
- </ul>
- </nav>
-
- <article>
- <header>
- <h2>Some header post</h2>
- </header>
-
- <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p>
-
- <img src="http://placekitten.com/g/200/300" />
-
- <p>Look, just because I don't be givin' no man a foot massage don't make it right for Marsellus to throw Antwone into a glass motherfuckin' house, fuckin' up the way the nigger talks. Motherfucker do that @#$% to me, he better paralyze my ass, 'cause I'll kill the motherfucker, know what I'm sayin'?</p>
-
- <p><h3>Sub Heading #1</h3></p>
-
- <p>Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.</p>
-
- <img src="http://placekitten.com/g/300/300" />
-
- <p>Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that @#$%? It actually says that in the little book that comes with it: the most popular gun in American crime.</p>
-
- <ul>
- <li>We should also style lists.</li>
- <li>This one, for example, is unordered.</li>
- <li>And that is it!</li>
- </ul>
-
- <aside> Like they're actually proud of that &amp;@#$%. </aside>
-
- <p><h3>Sub Heading #2</h3></p>
-
- <p>Normally, both your asses would be dead as @#$%ing fried chicken, but you happen to pull this &amp;@#$% while I'm in a transitional period so I don't wanna kill you, I wanna help you. But I can't give you this case, it don't belong to me. Besides, I've already been through too much &amp;@#$% this morning over this case to hand it over to your dumb ass.</p>
-
- <img src="http://placekitten.com/g/400/300" />
-
- <p>Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.</p>
-
- <img src="http://placekitten.com/g/400/600" />
-
- </article>
-
- <article>
- <header>
- <h2>A follow up post</h2>
- </header>
-
- <p>Look, just because I don't be givin' no man a foot massage don't make it right for Marsellus to throw Antwone into a glass mother@#$%in' house, @#$%in' up the way the nigger talks. Mother@#$%er do that &amp;@#$% to me, he better paralyze my ass, 'cause I'll kill the mother@#$%er, know what I'm sayin'? </p>
-
- <img src="http://placekitten.com/g/400/300" />
-
- <p>Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass. </p>
-
- <aside> Like they're actually proud of that &amp;@#$%. </aside>
-
- <ol>
- <li>This, on the other hand, is an ordered list.</li>
- <li>It has a first, ...</li>
- <li>... a second, and ...</li>
- <li>... a last list item.</li>
- </ol>
-
- <p>Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass. </p>
-
- <p>Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that &amp;@#$%? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that &amp;@#$%. </p>
- </article>
-
- <!-- please do not remove this line -->
-
- <section>
- Built using an awesome <a href="http://slipsum.com">lorem ipsum</a> generator and some <a href="http://placekitten.com/">kitteh pictures</a>
- </section>
-
- <footer>
- Copyright &copy; 2011&ndash;2012
- </footer>
- </body>
+<!-- a template for people to start styling up a blog-style application using metro principles.
+ note the use of semantic markup instead of classes everywhere
+
+ things to ponder:
+ - perhaps a stylesheet that derives from metro.css for elements such as these
+ - how would you specify image alignments using CSS?
+ - asides represent pull-out text - how should they be styled?
+ -->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet/less" type="text/css" href="/less/metroblog.less" />
+ <style>
+ body { width: 800px; margin: 0 auto; }
+ </style>
+ <script src="/scripts/less-1.2.1.min.js" type="text/javascript"></script>
+ <title>This is a sample blog</title>
+ </head>
+ <body>
+ <section class="title">
+ <header>
+ My sample blog
+ </header>
+ </section>
+
+ <nav>
+ <ul>
+ <li><a href="#" class="active">Blog</a></li>
+ <li><a href="#">Contact</a></li>
+ <li><a href="#">About</a></li>
+ </ul>
+ </nav>
+
+ <article>
+ <header>
+ <h2>Some header post</h2>
+ </header>
+
+ <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p>
+
+ <img class="right" src="http://placekitten.com/g/200/300" />
+
+ <p>Look, just because I don't be givin' no man a foot massage don't make it right for Marsellus to throw Antwone into a glass motherfuckin' house, fuckin' up the way the nigger talks. Motherfucker do that @#$% to me, he better paralyze my ass, 'cause I'll kill the motherfucker, know what I'm sayin'?</p>
+
+ <p><h3>Sub Heading #1</h3></p>
+
+ <p>Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.</p>
+
+ <img class="left" src="http://placekitten.com/g/300/300" />
+
+ <p>Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that @#$%? It actually says that in the little book that comes with it: the most popular gun in American crime.</p>
+
+ <ul class="metro-list">
+ <li>We should also style lists.</li>
+ <li>This one, for example, is unordered.</li>
+ <li>And that is it!</li>
+ </ul>
+
+ <aside> Like they're actually proud of that &amp;@#$%. </aside>
+
+ <p><h3>Sub Heading #2</h3></p>
+
+ <p>Normally, both your asses would be dead as @#$%ing fried chicken, but you happen to pull this &amp;@#$% while I'm in a transitional period so I don't wanna kill you, I wanna help you. But I can't give you this case, it don't belong to me. Besides, I've already been through too much &amp;@#$% this morning over this case to hand it over to your dumb ass.</p>
+
+ <img class="right" src="http://placekitten.com/g/400/300" />
+
+ <p>Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.</p>
+
+ </article>
+
+ <article>
+ <header>
+ <h2>A follow up post</h2>
+ </header>
+
+ <p>Look, just because I don't be givin' no man a foot massage don't make it right for Marsellus to throw Antwone into a glass mother@#$%in' house, @#$%in' up the way the nigger talks. Mother@#$%er do that &amp;@#$% to me, he better paralyze my ass, 'cause I'll kill the mother@#$%er, know what I'm sayin'? </p>
+
+ <img class="right" src="http://placekitten.com/g/300/300" />
+
+ <p>Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass. </p>
+
+ <aside> Like they're actually proud of that &amp;@#$%. </aside>
+
+ <ol class="metro-list">
+ <li>This, on the other hand, is an ordered list.</li>
+ <li>It has a first, ...</li>
+ <li>... a second, and ...</li>
+ <li>... a last list item.</li>
+ </ol>
+
+ <p>Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass. </p>
+
+ <p>Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that &amp;@#$%? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that &amp;@#$%. </p>
+ </article>
+
+ <!-- please do not remove this line -->
+
+ <section>
+ Built using an awesome <a href="http://slipsum.com">lorem ipsum</a> generator and some <a href="http://placekitten.com/">kitteh pictures</a>
+ </section>
+
+ <footer>
+ Copyright &copy; 2011&ndash;2012
+ </footer>
+ </body>
</html>
View
6 demo.html → demos/fonts/index.html
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<head>
- <link rel="stylesheet/less" type="text/css" href="less/metro.less" />
+ <link rel="stylesheet/less" type="text/css" href="/less/metro.less" />
<style>
body { width: 800px; margin: 0 auto; }
</style>
- <script src="scripts/less-1.2.1.min.js" type="text/javascript"></script>
+ <script src="/scripts/less-1.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
- <script type="text/javascript" src="scripts/jquery.metro.js"></script>
+ <script type="text/javascript" src="/scripts/jquery.metro.js"></script>
</head>
<body>
<h1 class="accent">LARGE heading text</h1>
View
112 demos/pivot/index.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet/less" type="text/css" href="/less/metro.less" />
+ <style>
+ body { width: 800px; margin: 0 auto; }
+ </style>
+ <script src="/scripts/less-1.2.1.min.js" type="text/javascript"></script>
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
+ <script type="text/javascript" src="/scripts/jquery.metro.js"></script>
+ </head>
+ <body>
+ <h1 class="accent">jqMetro</h1>
+
+ <div class="metro-pivot">
+ <div class="pivot-item">
+ <h3>about</h3>
+ <p>You've probably seen or used a tab control in the past - the pivot control is a sexy descendant of the tab control.</p>
+
+ <p>This widget, adapted from the <a href="http://naghsheh.info/Pivot/Pivot.htm">jqMetro</a> project, allows developers to make their web content more interactive with a bit of markup and some Javascript</p>
+
+ </div>
+ <div class="pivot-item">
+ <h3>usage</h3>
+
+ <br />
+
+ To get started, reference the two JS files
+
+<pre>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"&gt;&lt;/script&gt;
+&lt;script type="text/javascript" src="/scripts/jquery.metro.js"&gt;&lt;/script&gt;</pre>
+
+ Then define the the DOM for the tabs. The <code>metro-pivot</code> represents the container for the control, and the <code>pivot-item</code> represents each item in the collection.
+
+<pre>&lt;div class="metro-pivot"&gt;
+ &lt;div class="pivot-item"&gt;
+ &lt;h3&gt;tab 1&lt;/h3&gt;
+ &lt;p&gt;content&lt;/p&gt;
+ &lt;/div&gt;
+ &lt;div class="pivot-item"&gt;
+ &lt;h3&gt;tab 2&lt;/h3&gt;
+ &lt;p&gt;content&lt;/p&gt;
+ &lt;/div&gt;
+&lt;/div&gt;</pre>
+
+Then add this script to the bottom of the page:
+
+$(function () {
+ $("div.metro-pivot").metroPivot();
+});
+
+And that's it.
+</div>
+
+ <div class="pivot-item">
+ <h3>configuration</h3>
+
+
+ <br />
+
+ There's many configuration options available - so you don't have to follow the markup style on the previous tab.
+
+<pre>var defaults = {
+ animationDuration: 350,
+ headerOpacity: 0.25,
+ fixedHeaders: false,
+ headerSelector: function (item) { return item.children("h3").first(); },
+ itemSelector: function (item) { return item.children(".pivot-item"); },
+ headerItemTemplate: function () { return $("&lt;span class='header' />"); },
+ pivotItemTemplate: function () { return $("&lt;div class='pivotItem' />"); },
+ itemsTemplate: function () { return $("&lt;div class='items' />"); },
+ headersTemplate: function () { return $("&lt;div class='headers' />"); },
+ controlInitialized: undefined,
+ selectedItemChanged: undefined
+};
+
+$(function () {
+ $("div.metro-pivot").metroPivot(defaults);
+});
+ </pre>
+
+ </div>
+ <div class="pivot-item">
+ <h3>tab3</h3>
+ <p>
+ Topping bear claw lemon drops. Cake powder gingerbread. Powder halvah powder danish. Cookie gingerbread muffin wypas cake marzipan dessert. Pastry jelly beans tootsie roll dessert wypas gingerbread pastry candy toffee. Sweet roll cupcake halvah. Gingerbread cotton candy tiramisu muffin carrot cake chocolate sweet roll donut. Applicake toffee halvah toffee dragée toffee candy canes sesame snaps cheesecake. Sweet powder lollipop apple pie candy halvah chupa chups croissant. Jelly beans bear claw soufflé apple pie. Gummies ice cream marzipan tootsie roll wypas carrot cake. Bonbon lemon drops candy gummi bears lemon drops lollipop. Powder caramels jelly.
+ </p>
+ </div>
+ </div>
+
+
+ <script>
+ var defaults = {
+ animationDuration: 350,
+ headerOpacity: 0.25,
+ fixedHeaders: false,
+ headerSelector: function (item) { return item.children("h3").first(); },
+ itemSelector: function (item) { return item.children(".pivot-item"); },
+ headerItemTemplate: function () { return $("<span class='header' />"); },
+ pivotItemTemplate: function () { return $("<div class='pivotItem' />"); },
+ itemsTemplate: function () { return $("<div class='items' />"); },
+ headersTemplate: function () { return $("<div class='headers' />"); },
+ controlInitialized: undefined,
+ selectedItemChanged: undefined
+ };
+
+ $(function () {
+ $("div.metro-pivot").metroPivot(defaults);
+ });
+ </script>
+ </body>
+</html>
View
508 demos/slides/impress.css
@@ -0,0 +1,508 @@
+/**
+ * This is a stylesheet for a demo presentation for impress.js
+ *
+ * It is not meant to be a part of impress.js and is not required by impress.js.
+ * I expect that anyone creating a presentation for impress.js would create their own
+ * set of styles.
+ */
+
+
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+
+body {
+ font-family: 'PT Sans', sans-serif;
+
+ min-height: 740px;
+
+ background: rgb(215, 215, 215);
+ background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 500, from(rgb(240, 240, 240)), to(rgb(190, 190, 190)));
+ background: -webkit-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
+ background: -moz-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
+ background: -o-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
+ background: radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
+
+ -webkit-font-smoothing: antialiased;
+}
+
+b, strong { font-weight: bold }
+i, em { font-style: italic}
+
+a {
+ color: inherit;
+ text-decoration: none;
+ padding: 0 0.1em;
+ background: rgba(255,255,255,0.5);
+ text-shadow: -1px -1px 2px rgba(100,100,100,0.9);
+ border-radius: 0.2em;
+
+ -webkit-transition: 0.5s;
+ -moz-transition: 0.5s;
+ -ms-transition: 0.5s;
+ -o-transition: 0.5s;
+ transition: 0.5s;
+}
+
+a:hover {
+ background: rgba(255,255,255,1);
+ text-shadow: -1px -1px 2px rgba(100,100,100,0.5);
+}
+
+/* enable clicking on elements 'hiding' behind body in 3D */
+body { pointer-events: none; }
+#impress { pointer-events: auto; }
+
+/* COMMON STEP STYLES */
+
+.step {
+ width: 900px;
+ padding: 40px;
+
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ -o-box-sizing: border-box;
+ box-sizing: border-box;
+
+ /*font-family: 'PT Serif', georgia, serif;*/
+
+ font-size: 48px;
+ line-height: 1.5;
+}
+
+/* fade out inactive slides */
+
+.step {
+ -webkit-transition: opacity 1s;
+ -moz-transition: opacity 1s;
+ -ms-transition: opacity 1s;
+ -o-transition: opacity 1s;
+ transition: opacity 1s;
+}
+
+.step:not(.active) {
+ opacity: 0.3;
+}
+
+/* STEP SPECIFIC STYLES */
+
+/* hint on the first slide */
+
+.hint {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 200px;
+
+ background: rgba(0,0,0,0.5);
+ color: #EEE;
+ text-align: center;
+
+ font-size: 50px;
+ padding: 20px;
+
+ z-index: 100;
+
+ opacity: 0;
+
+ -webkit-transform: translateY(400px);
+ -moz-transform: translateY(400px);
+ -ms-transform: translateY(400px);
+ -o-transform: translateY(400px);
+ transform: translateY(400px);
+
+ -webkit-transition: opacity 1s, -webkit-transform 0.5s 1s;
+ -moz-transition: opacity 1s, -moz-transform 0.5s 1s;
+ -ms-transition: opacity 1s, -ms-transform 0.5s 1s;
+ -o-transition: opacity 1s, -o-transform 0.5s 1s;
+ transition: opacity 1s, transform 0.5s 1s;
+}
+
+.step-bored + .hint {
+ opacity: 1;
+
+ -webkit-transition: opacity 1s 5s, -webkit-transform 0.5s;
+ -moz-transition: opacity 1s 5s, -moz-transform 0.5s;
+ -ms-transition: opacity 1s 5s, -ms-transform 0.5s;
+ -o-transition: opacity 1s 5s, -o-transform 0.5s;
+ transition: opacity 1s 5s, transform 0.5s;
+
+ -webkit-transform: translateY(0px);
+ -moz-transform: translateY(0px);
+ -ms-transform: translateY(0px);
+ -o-transform: translateY(0px);
+ transform: translateY(0px);
+}
+
+/* impress.js title */
+
+#title {
+ padding: 0;
+}
+
+#title .try {
+ font-size: 64px;
+ position: absolute;
+ top: -0.5em;
+ left: 1.5em;
+
+ -webkit-transform: translateZ(20px);
+ -moz-transform: translateZ(20px);
+ -ms-transform: translateZ(20px);
+ -o-transform: translateZ(20px);
+ transform: translateZ(20px);
+}
+
+#title h1 {
+ font-size: 190px;
+
+ -webkit-transform: translateZ(50px);
+ -moz-transform: translateZ(50px);
+ -ms-transform: translateZ(50px);
+ -o-transform: translateZ(50px);
+ transform: translateZ(50px);
+}
+
+#title .footnote {
+ font-size: 32px;
+}
+
+/* big thoughts */
+
+#big {
+ width: 600px;
+ text-align: center;
+ font-size: 60px;
+ line-height: 1;
+}
+
+#big b {
+ display: block;
+ font-size: 250px;
+ line-height: 250px;
+}
+
+#big .thoughts {
+ font-size: 90px;
+ line-height: 150px;
+}
+
+/* tiny ideas */
+
+#tiny {
+ width: 500px;
+ text-align: center;
+}
+
+#ing {
+ width: 500px;
+}
+
+#ing b {
+ display: inline-block;
+ -webkit-transition: 0.5s;
+ -moz-transition: 0.5s;
+ -ms-transition: 0.5s;
+ -o-transition: 0.5s;
+ transition: 0.5s;
+}
+
+#ing.active .positioning {
+ -webkit-transform: translateY(-10px);
+ -moz-transform: translateY(-10px);
+ -ms-transform: translateY(-10px);
+ -o-transform: translateY(-10px);
+ transform: translateY(-10px);
+
+ -webkit-transition-delay: 1.5s;
+ -moz-transition-delay: 1.5s;
+ -ms-transition-delay: 1.5s;
+ -o-transition-delay: 1.5s;
+ transition-delay: 1.5s;
+}
+
+#ing.active .rotating {
+ -webkit-transform: rotate(-10deg);
+ -moz-transform: rotate(-10deg);
+ -ms-transform: rotate(-10deg);
+ -o-transform: rotate(-10deg);
+ transform: rotate(-10deg);
+
+ -webkit-transition-delay: 1.75s;
+ -moz-transition-delay: 1.75s;
+ -ms-transition-delay: 1.75s;
+ -o-transition-delay: 1.75s;
+ transition-delay: 1.75s;
+}
+
+#ing.active .scaling {
+ -webkit-transform: scale(0.7);
+ -moz-transform: scale(0.7);
+ -ms-transform: scale(0.7);
+ -o-transform: scale(0.7);
+ transform: scale(0.7);
+
+ -webkit-transition-delay: 2s;
+ -moz-transition-delay: 2s;
+ -ms-transition-delay: 2s;
+ -o-transition-delay: 2s;
+ transition-delay: 2s;
+
+}
+
+/* imagination */
+
+#imagination {
+ width: 600px;
+}
+
+#imagination .imagination {
+ font-size: 78px;
+}
+
+/* use the source, Luke */
+
+#source {
+ width: 700px;
+ padding-bottom: 300px;
+
+ /* Yoda Icon :: Pixel Art from Star Wars http://www.pixeljoint.com/pixelart/1423.htm */
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAMAAACwUBm+AAAAAXNSR0IArs4c6QAAAKtQTFRFsAAAvbWSLUUrLEQqY1s8UYJMqJ1vNTEgOiIdIzYhjIFVLhsXZ6lgSEIsP2U8JhcCVzMsSXZEgXdOO145XJdWOl03LzAYMk4vSXNExr+hwcuxRTs1Qmk+RW9Am49eFRANQz4pUoNMQWc+OSMDTz0wLBsCNVMxa2NBOyUDUoNNSnlEWo9VRGxAVzYFl6tXCggHbLNmMUIcHhwTXkk5f3VNRT8wUT8xAAAACQocRBWFFwAAAAF0Uk5TAEDm2GYAAAPCSURBVHja7d3JctNAFIZRMwRCCGEmzPM8z/D+T8bu/ptbXXJFdij5fMt2Wuo+2UgqxVmtttq5WVotLzBgwIABAwYMGDCn0qVqbo69psPqVpWx+1XG5iaavF8wYMCAAQMGDBgwi4DJ6Y6qkxB1HNlcN3a92gbR5P2CAQMGDBgwYMCAWSxMlrU+UY5yu2l9okfV4bAxUVbf7TJnAwMGDBgwYMCAAbMLMHeqbGR82Zy+VR1Ht81nVca6R+UdTLaU24Ruzd3qM/e4yjnAgAEDBgwYMGDA7AJMd1l/3NRdVGcj3eX/2WEhCmDGxnM7yqygu8XIPjJj8iN/MGDAgAEDBgwYMAuDGb8q0RGlLCHLv1t9qDKWn3vdNHVuEI6HPaxO9Jo3GDBgwIABAwYMmIXBdC9ShGgMk+XnkXUeuGcsP/e1+lhNnZsL/G5Vs3OAAQMGDBgwYMCAWSxMR3SzOmraG5atdy9wZKzb+vg16qyqe2FltbnAgAEDBgwYMGDALAxmTJSuN3WA76rnVca6GTnemGN1WoEBAwYMGDBgwIBZGMxUomy4+xO899V4LAg5Xnc2MGDAgAEDBgwYMGA218Wq+2K1LDqvY9xZu8zN8fICdM6btYABAwYMGDBgwIABMzfH0+pGU5afze2tXebmeAfVz+p8BQYMGDBgwIABAwbMPBzZ+oWmfJrln1273FhkbHzee9WWbw7AgAEDBgwYMGDALAKm43hcdctKgblcPamOhuXnXlY5Xs6bsW4FGyQCAwYMGDBgwIABswiYMceZKgvMo+h8mrHLTdn676rj+FEFoTtHd8MwOxEYMGDAgAEDBgyYRcBM5UhXqiymW3R3c9ARhWO/OmjqfjVZy+xEYMCAAQMGDBgwYBYG073OnCV0RFNhMhaOa9WfKmOB6XjHMN1tQmaAAQMGDBgwYMCA2VWY7vXjz1U4croAzgPztwIDBgwYMGDAgAEDZhswh035NBw59Dww3RgYMGDAgAEDBgwYMJuD6f4tXT7NUqfCdBvZLkxXdgQGDBgwYMCAAQNmt2DGj8WzwAfV/w7T/aq7mxwwYMCAAQMGDBgwuwqTOo7uTwTngflSzQ3TdaJvAwEDBgwYMGDAgAED5gSvgbyo5oHZ4Pc+gwEDBgwYMGDAgAEzhOm+5G0qTGaAAQMGDBgwYMCAAXNaMOcnls3tNwWm+zRzp54NDBgwYMCAAQMGDJh5YNL36k1TLuGvVq+qnKMbS5n7tulT9asCAwYMGDBgwIABA2ZumKuztLnjgQEDBgwYMGDAgNl5mH/4/ltKA6vBNAAAAABJRU5ErkJggg==);
+ background-position: bottom right;
+ background-repeat: no-repeat;
+}
+
+#source q {
+ font-size: 60px;
+}
+
+/* it's in 3D */
+
+#its-in-3d p {
+ -webkit-transform-style: preserve-3d;
+ -moz-transform-style: preserve-3d; /* Y U need this Firefox?! */
+ -ms-transform-style: preserve-3d;
+ -o-transform-style: preserve-3d;
+ transform-style: preserve-3d;
+}
+
+#its-in-3d span,
+#its-in-3d b {
+ display: inline-block;
+ -webkit-transform: translateZ(40px);
+ -moz-transform: translateZ(40px);
+ -ms-transform: translateZ(40px);
+ -o-transform: translateZ(40px);
+ transform: translateZ(40px);
+
+ -webkit-transition: 0.5s;
+ -moz-transition: 0.5s;
+ -ms-transition: 0.5s;
+ -o-transition: 0.5s;
+ transition: 0.5s;
+}
+
+#its-in-3d .have {
+ -webkit-transform: translateZ(-40px);
+ -moz-transform: translateZ(-40px);
+ -ms-transform: translateZ(-40px);
+ -o-transform: translateZ(-40px);
+ transform: translateZ(-40px);
+}
+
+#its-in-3d .you {
+ -webkit-transform: translateZ(20px);
+ -moz-transform: translateZ(20px);
+ -ms-transform: translateZ(20px);
+ -o-transform: translateZ(20px);
+ transform: translateZ(20px);
+}
+
+#its-in-3d .noticed {
+ -webkit-transform: translateZ(-40px);
+ -moz-transform: translateZ(-40px);
+ -ms-transform: translateZ(-40px);
+ -o-transform: translateZ(-40px);
+ transform: translateZ(-40px);
+}
+
+#its-in-3d .its {
+ -webkit-transform: translateZ(60px);
+ -moz-transform: translateZ(60px);
+ -ms-transform: translateZ(60px);
+ -o-transform: translateZ(60px);
+ transform: translateZ(60px);
+}
+
+#its-in-3d .in {
+ -webkit-transform: translateZ(-10px);
+ -moz-transform: translateZ(-10px);
+ -ms-transform: translateZ(-10px);
+ -o-transform: translateZ(-10px);
+ transform: translateZ(-10px);
+}
+
+#its-in-3d .footnote {
+ font-size: 32px;
+
+ -webkit-transform: translateZ(-10px);
+ -moz-transform: translateZ(-10px);
+ -ms-transform: translateZ(-10px);
+ -o-transform: translateZ(-10px);
+ transform: translateZ(-10px);
+}
+
+#its-in-3d.active span,
+#its-in-3d.active b {
+ -webkit-transform: translateZ(0px);
+ -moz-transform: translateZ(0px);
+ -ms-transform: translateZ(0px);
+ -o-transform: translateZ(0px);
+ transform: translateZ(0px);
+
+ -webkit-transition-delay: 1s;
+ -moz-transition-delay: 1s;
+ -ms-transition-delay: 1s;
+ -o-transition-delay: 1s;
+ transition-delay: 1s;
+}
+
+/* overview step */
+
+#overview {
+ z-index: -1;
+ padding: 0;
+}
+
+/* on overview step everything is visible */
+
+#impress.step-overview .step {
+ opacity: 1;
+ cursor: pointer;
+}
+
+/*
+ * SLIDE STEP STYLES
+ *
+ * inspired by: http://html5slides.googlecode.com/svn/trunk/styles.css
+ *
+ * ;)
+ */
+
+.slide {
+ display: block;
+
+ width: 900px;
+ height: 700px;
+
+ padding: 40px 60px;
+
+ border-radius: 10px;
+
+ background-color: white;
+
+ box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
+ border: 1px solid rgba(0, 0, 0, .3);
+
+ font-family: 'Open Sans', Arial, sans-serif;
+
+ color: rgb(102, 102, 102);
+ text-shadow: 0 2px 2px rgba(0, 0, 0, .1);
+
+ font-size: 30px;
+ line-height: 36px;
+
+ letter-spacing: -1px;
+}
+
+.slide q {
+ display: block;
+ font-size: 50px;
+ line-height: 72px;
+
+ margin-top: 100px;
+}
+
+.slide q strong {
+ white-space: nowrap;
+}
+
+
+/* IMPRESS NOT SUPPORTED STYLES */
+
+.fallback-message {
+ font-family: sans-serif;
+ line-height: 1.3;
+
+ display: none;
+ width: 780px;
+ padding: 10px 10px 0;
+ margin: 20px auto;
+
+ border-radius: 10px;
+ border: 1px solid #E4C652;
+ background: #EEDC94;
+}
+
+.fallback-message p {
+ margin-bottom: 10px;
+}
+
+.impress-not-supported .step {
+ position: relative;
+ opacity: 1;
+ margin: 20px auto;
+}
+
+.impress-not-supported .fallback-message {
+ display: block;
+}
View
339 demos/slides/impress.js
@@ -0,0 +1,339 @@
+/**
+ * impress.js
+ *
+ * impress.js is a presentation tool based on the power of CSS3 transforms and transitions
+ * in modern browsers and inspired by the idea behind prezi.com.
+ *
+ * MIT Licensed.
+ *
+ * Copyright 2011 Bartek Szopka (@bartaz)
+ */
+
+(function ( document, window ) {
+ 'use strict';
+
+ // HELPER FUNCTIONS
+
+ var pfx = (function () {
+
+ var style = document.createElement('dummy').style,
+ prefixes = 'Webkit Moz O ms Khtml'.split(' '),
+ memory = {};
+
+ return function ( prop ) {
+ if ( typeof memory[ prop ] === "undefined" ) {
+
+ var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1),
+ props = (prop + ' ' + prefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+ memory[ prop ] = null;
+ for ( var i in props ) {
+ if ( style[ props[i] ] !== undefined ) {
+ memory[ prop ] = props[i];
+ break;
+ }
+ }
+
+ }
+
+ return memory[ prop ];
+ }
+
+ })();
+
+ var arrayify = function ( a ) {
+ return [].slice.call( a );
+ };
+
+ var css = function ( el, props ) {
+ var key, pkey;
+ for ( key in props ) {
+ if ( props.hasOwnProperty(key) ) {
+ pkey = pfx(key);
+ if ( pkey != null ) {
+ el.style[pkey] = props[key];
+ }
+ }
+ }
+ return el;
+ }
+
+ var byId = function ( id ) {
+ return document.getElementById(id);
+ }
+
+ var $ = function ( selector, context ) {
+ context = context || document;
+ return context.querySelector(selector);
+ };
+
+ var $$ = function ( selector, context ) {
+ context = context || document;
+ return arrayify( context.querySelectorAll(selector) );
+ };
+
+ var translate = function ( t ) {
+ return " translate3d(" + t.x + "px," + t.y + "px," + t.z + "px) ";
+ };
+
+ var rotate = function ( r, revert ) {
+ var rX = " rotateX(" + r.x + "deg) ",
+ rY = " rotateY(" + r.y + "deg) ",
+ rZ = " rotateZ(" + r.z + "deg) ";
+
+ return revert ? rZ+rY+rX : rX+rY+rZ;
+ };
+
+ var scale = function ( s ) {
+ return " scale(" + s + ") ";
+ }
+
+ // CHECK SUPPORT
+
+ var ua = navigator.userAgent.toLowerCase();
+ var impressSupported = ( pfx("perspective") != null ) &&
+ ( ua.search(/(iphone)|(ipod)|(ipad)|(android)/) == -1 );
+
+ // DOM ELEMENTS
+
+ var impress = byId("impress");
+
+ if (!impressSupported) {
+ impress.className = "impress-not-supported";
+ return;
+ } else {
+ impress.className = "";
+ }
+
+ var canvas = document.createElement("div");
+ canvas.className = "canvas";
+
+ arrayify( impress.childNodes ).forEach(function ( el ) {
+ canvas.appendChild( el );
+ });
+ impress.appendChild(canvas);
+
+ var steps = $$(".step", impress);
+
+ // SETUP
+ // set initial values and defaults
+
+ document.documentElement.style.height = "100%";
+
+ css(document.body, {
+ height: "100%",
+ overflow: "hidden"
+ });
+
+ var props = {
+ position: "absolute",
+ transformOrigin: "top left",
+ transition: "all 0s ease-in-out",
+ transformStyle: "preserve-3d"
+ }
+
+ css(impress, props);
+ css(impress, {
+ top: "50%",
+ left: "50%",
+ perspective: "1000px"
+ });
+ css(canvas, props);
+
+ var current = {
+ translate: { x: 0, y: 0, z: 0 },
+ rotate: { x: 0, y: 0, z: 0 },
+ scale: 1
+ };
+
+ steps.forEach(function ( el, idx ) {
+ var data = el.dataset,
+ step = {
+ translate: {
+ x: data.x || 0,
+ y: data.y || 0,
+ z: data.z || 0
+ },
+ rotate: {
+ x: data.rotateX || 0,
+ y: data.rotateY || 0,
+ z: data.rotateZ || data.rotate || 0
+ },
+ scale: data.scale || 1
+ };
+
+ el.stepData = step;
+
+ if ( !el.id ) {
+ el.id = "step-" + (idx + 1);
+ }
+
+ css(el, {
+ position: "absolute",
+ transform: "translate(-50%,-50%)" +
+ translate(step.translate) +
+ rotate(step.rotate) +
+ scale(step.scale),
+ transformStyle: "preserve-3d"
+ });
+
+ });
+
+ // making given step active
+
+ var active = null;
+ var hashTimeout = null;
+
+ var select = function ( el ) {
+ if ( !el || !el.stepData || el == active) {
+ // selected element is not defined as step or is already active
+ return false;
+ }
+
+ // Sometimes it's possible to trigger focus on first link with some keyboard action.
+ // Browser in such a case tries to scroll the page to make this element visible
+ // (even that body overflow is set to hidden) and it breaks our careful positioning.
+ //
+ // So, as a lousy (and lazy) workaround we will make the page scroll back to the top
+ // whenever slide is selected
+ //
+ // If you are reading this and know any better way to handle it, I'll be glad to hear about it!
+ window.scrollTo(0, 0);
+
+ var step = el.stepData;
+
+ if ( active ) {
+ active.classList.remove("active");
+ }
+ el.classList.add("active");
+
+ impress.className = "step-" + el.id;
+
+ // `#/step-id` is used instead of `#step-id` to prevent default browser
+ // scrolling to element in hash
+ //
+ // and it has to be set after animation finishes, because in chrome it
+ // causes transtion being laggy
+ window.clearTimeout( hashTimeout );
+ hashTimeout = window.setTimeout(function () {
+ window.location.hash = "#/" + el.id;
+ }, 1000);
+
+ var target = {
+ rotate: {
+ x: -parseInt(step.rotate.x, 10),
+ y: -parseInt(step.rotate.y, 10),
+ z: -parseInt(step.rotate.z, 10)
+ },
+ translate: {
+ x: -step.translate.x,
+ y: -step.translate.y,
+ z: -step.translate.z
+ },
+ scale: 1 / parseFloat(step.scale)
+ };
+
+ // check if the transition is zooming in or not
+ var zoomin = target.scale >= current.scale;
+
+ // if presentation starts (nothing is active yet)
+ // don't animate (set duration to 0)
+ var duration = (active) ? "1s" : "0";
+
+ css(impress, {
+ // to keep the perspective look similar for different scales
+ // we need to 'scale' the perspective, too
+ perspective: step.scale * 1000 + "px",
+ transform: scale(target.scale),
+ transitionDuration: duration,
+ transitionDelay: (zoomin ? "500ms" : "0ms")
+ });
+
+ css(canvas, {
+ transform: rotate(target.rotate, true) + translate(target.translate),
+ transitionDuration: duration,
+ transitionDelay: (zoomin ? "0ms" : "500ms")
+ });
+
+ current = target;
+ active = el;
+
+ return el;
+ };
+
+ var selectPrev = function () {
+ var prev = steps.indexOf( active ) - 1;
+ prev = prev >= 0 ? steps[ prev ] : steps[ steps.length-1 ];
+
+ return select(prev);
+ };
+
+ var selectNext = function () {
+ var next = steps.indexOf( active ) + 1;
+ next = next < steps.length ? steps[ next ] : steps[ 0 ];
+
+ return select(next);
+ };
+
+ // EVENTS
+
+ document.addEventListener("keydown", function ( event ) {
+ if ( event.keyCode == 9 || ( event.keyCode >= 32 && event.keyCode <= 34 ) || (event.keyCode >= 37 && event.keyCode <= 40) ) {
+ switch( event.keyCode ) {
+ case 33: ; // pg up
+ case 37: ; // left
+ case 38: // up
+ selectPrev();
+ break;
+ case 9: ; // tab
+ case 32: ; // space
+ case 34: ; // pg down
+ case 39: ; // right
+ case 40: // down
+ selectNext();
+ break;
+ }
+
+ event.preventDefault();
+ }
+ }, false);
+
+ document.addEventListener("click", function ( event ) {
+ // event delegation with "bubbling"
+ // check if event target (or any of its parents is a link or a step)
+ var target = event.target;
+ while ( (target.tagName != "A") &&
+ (!target.stepData) &&
+ (target != document.body) ) {
+ target = target.parentNode;
+ }
+
+ if ( target.tagName == "A" ) {
+ var href = target.getAttribute("href");
+
+ // if it's a link to presentation step, target this step
+ if ( href && href[0] == '#' ) {
+ target = byId( href.slice(1) );
+ }
+ }
+
+ if ( select(target) ) {
+ event.preventDefault();
+ }
+ }, false);
+
+ var getElementFromUrl = function () {
+ // get id from url # by removing `#` or `#/` from the beginning,
+ // so both "fallback" `#slide-id` and "enhanced" `#/slide-id` will work
+ return byId( window.location.hash.replace(/^#\/?/,"") );
+ }
+
+ window.addEventListener("hashchange", function () {
+ select( getElementFromUrl() );
+ }, false);
+
+ // START
+ // by selecting step defined in url or first step of the presentation
+ select(getElementFromUrl() || steps[0]);
+
+})(document, window);
View
336 demos/slides/index.html
@@ -0,0 +1,336 @@
+<!doctype html>
+
+<!--
+
+ Welcome to the light side of the source, young padawan.
+
+ One step closer to learn something interesting you are...
+
+ ____
+ _.' : `._
+ .-.'`. ; .'`.-.
+ __ / : ___\ ; /___ ; \ __
+ ,'_ ""--.:__;".-.";: :".-.":__;.--"" _`,
+ :' `.t""--.. '<@.`;_ ',@>` ..--""j.' `;
+ `:-.._J '-.-'L__ `-- ' L_..-;'
+ "-.__ ; .-" "-. : __.-"
+ L ' /.------.\ ' J
+ "-. "--" .-"
+ __.l"-:_JL_;-";.__
+ .-j/'.; ;"""" / .'\"-.
+ .' /:`. "-.: .-" .'; `.
+ .-" / ; "-. "-..-" .-" : "-.
+ .+"-. : : "-.__.-" ;-._ \
+ ; \ `.; ; : : "+. ;
+ : ; ; ; : ; : \:
+ ; : ; : ;: ; :
+ : \ ; : ; : ; / ::
+ ; ; : ; : ; : ;:
+ : : ; : ; : : ; : ;
+ ;\ : ; : ; ; ; ;
+ : `."-; : ; : ; / ;
+ ; -: ; : ; : .-" :
+ :\ \ : ; : \.-" :
+ ;`. \ ; : ;.'_..-- / ;
+ : "-. "-: ; :/." .' :
+ \ \ : ;/ __ :
+ \ .-`.\ /t-"" ":-+. :
+ `. .-" `l __/ /`. : ; ; \ ;
+ \ .-" .-"-.-" .' .'j \ / ;/
+ \ / .-" /. .'.' ;_:' ;
+ :-""-.`./-.' / `.___.'
+ \ `t ._ /
+ "-.t-._:'
+
+-->
+
+<!--
+
+ So you'd like to know how to use impress.js?
+
+ You've made the first, very important step -- you're reading the source code.
+ And that's how impress.js presentations are built -- with HTML and CSS code.
+
+ Believe me, you need quite decent HTML and CSS skills to be able to use impress.js effectively.
+ And what is even more important, you need to be a designer, too, because there are no default
+ styles for impress.js presentations, there is no default or automatic layout for them.
+
+ You need to design and build it by hand.
+
+ So...
+
+ Would you still like to know how to use impress.js?
+
+-->
+
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <title>impress.js | presentation tool based on the power of CSS3 transforms and transitions in modern browsers | by Bartek Szopka @bartaz</title>
+
+ <meta name="description" content="impress.js is a presentation tool based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.">
+ <meta name="author" content="Bartek Szopka" />
+
+ <link href="http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic" rel="stylesheet" />
+
+ <!--
+
+ Impress.js doesn't depend on any external stylesheet. Script adds all styles it needs for
+ presentation to work.
+
+ This style below contains styles only for demo presentation. Browse it to see how impress.js
+ classes are used to style presentation steps, or how to apply fallback styles, but I don't want
+ you to use them directly in your presentation.
+
+ Be creative, build your own. We don't really want all impress.js presentations to look the same,
+ don't we?
+
+ When creating your own presentation get rid of this file. Start from scratch, it's fun!
+
+ -->
+ <link rel="stylesheet/less" type="text/css" href="impress.css" />
+ <link rel="stylesheet/less" type="text/css" href="/less/metro.less" />
+
+ <script src="/scripts/less-1.2.1.min.js" type="text/javascript"></script>
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
+ <script type="text/javascript" src="/scripts/jquery.metro.js"></script>
+</head>
+<body>
+
+<!--
+
+ That's the wrapper for your presentation steps. In this element all the impress.js magic happens.
+ It doesn't have to be a `<div>`. Only `id` is important here as that's how the script find it.
+
+ It's worth to notice the `impress-not-supported` class. This class means, that browser doesn't
+ support features required by impress.js, so you can apply some fallback styles in your CSS.
+ It's not necessary to add it manually on this element. If the script detects that browser is not
+ good enough it will add this class, but keeping it in HTML means that users without JavaScript
+ will also get fallback styles.
+
+ The class name on this element also depends on currently active presentation step. More details about
+ it can be found below, when `hint` element is being described.
+
+-->
+<div id="impress" class="impress-not-supported">
+
+ <div class="fallback-message">
+ <p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
+ <p>For the best experience please use the latest <b>Chrome</b> or <b>Safari</b> browser. Firefox 10 (to be released soon) will also handle it.</p>
+ </div>
+
+ <!--
+
+ Here is where interesting thing start to happen.
+
+ Each step of the presentation should be an element inside the `#impress` with a class name
+ of `step`. These step elements are positioned, rotated and scaled by impress.js, and
+ the 'camera' shows them on each step of the presentation.
+
+ Positioning information is passed through data attributes.
+
+ In the example below we only specify x and y position of the step element with `data-x="-1000"`
+ and `data-y="-1500` attributes. This means that **the center** of the element (yes, the center)
+ will be positioned in point x = -1000px and y = -1500px of the presentation 'canvas'.
+
+ It will not be rotated or scaled.
+
+ -->
+ <div id="bored" class="step slide" data-x="-1000" data-y="-1500">
+ <q>Aren't you just <b>bored</b> with all those slides-based presentations?</q>
+ </div>
+
+ <!--
+
+ The `id` attribute of the step element is used to identify it in the URL, but it's optional.
+ If it is not defined, it will get a default value of `step-N` where N is a number of slide.
+
+ So in the example below it'll be `step-2`.
+
+ The hash part of the url when this step is active will be `#/step-2`.
+
+ You can also use `#step-2` in a link, to point directly to this particular step.
+
+ Please note, that while `#/step-2` (with slash) would also work in a link it's not recommended.
+ Using classic `id`-based links like `#step-2` makes these links usable also in fallback mode.
+
+ -->
+ <div class="step slide" data-x="0" data-y="-1500">
+ <q>Don't you think that presentations given <strong>in modern browsers</strong> shouldn't <strong>copy the limits</strong> of 'classic' slide decks?</q>
+ </div>
+
+ <div class="step slide" data-x="1000" data-y="-1500">
+ <q>Would you like to <strong>impress your audience</strong> with <strong>stunning visualization</strong> of your talk?</q>
+ </div>
+
+ <!--
+
+ This is an example of step element being scaled.
+
+ Again, we use a `data-` attribute, this time it's `data-scale="4"`, so it means that this
+ element will be 4 times larger than the others.
+ From presentation and transitions point of view it means, that it will have to be scaled
+ down (4 times) to make it back to it's correct size.
+
+ -->
+ <div id="title" class="step" data-x="0" data-y="0" data-scale="4">
+ <span class="try">then you should try</span>
+ <h1>impress.js<sup>*</sup></h1>
+ <span class="footnote"><sup>*</sup> no rhyme intended</span>
+ </div>
+
+ <!--
+
+ This element introduces rotation.
+
+ Notation shouldn't be a surprise. We use `data-rotate="90"` attribute, meaning that this
+ element should be rotated by 90 degrees clockwise.
+
+ -->
+ <div id="its" class="step" data-x="850" data-y="3000" data-rotate="90" data-scale="5">
+ <p>It's a <strong>presentation tool</strong> <br/>
+ inspired by the idea behind <a href="http://prezi.com">prezi.com</a> <br/>
+ and based on the <strong>power of CSS3 transforms and transitions</strong> in modern browsers.</p>
+ </div>
+
+ <div id="big" class="step" data-x="3500" data-y="2100" data-rotate="180" data-scale="6">
+ <p>visualize your <b>big</b> <span class="thoughts">thoughts</span></p>
+ </div>
+
+ <!--
+
+ And now it gets really exiting! We move into third dimension!
+
+ Along with `data-x` and `data-y`, you can define the position on third (Z) axis, with
+ `data-z`. In the example below we use `data-z="-3000"` meaning that element should be
+ positioned far away from us (by 3000px).
+
+ -->
+ <div id="tiny" class="step" data-x="2825" data-y="2100" data-z="-3000" data-rotate="300" data-scale="1">
+ <p>and <b>tiny</b> ideas</p>
+ </div>
+
+ <div id="ing" class="step" data-x="3500" data-y="-850" data-rotate="270" data-scale="6">
+ <p>by <b class="positioning">positioning</b>, <b class="rotating">rotating</b> and <b class="scaling">scaling</b> them on an infinite canvas</p>
+ </div>
+
+ <div id="imagination" class="step" data-x="6700" data-y="-300" data-scale="6">
+ <p>the only <b>limit</b> is your <b class="imagination">imagination</b></p>
+ </div>
+
+ <div id="source" class="step" data-x="6300" data-y="2000" data-rotate="20" data-scale="4">
+ <p>want to know more?</p>
+ <q><a href="http://github.com/bartaz/impress.js">use the source</a>, Luke!</q>
+ </div>
+
+ <div id="one-more-thing" class="step" data-x="6000" data-y="4000" data-scale="2">
+ <p>one more thing...</p>
+ </div>
+
+ <!--
+
+ And the last one shows full power and flexibility of impress.js.
+
+ You can not only position element in 3D, but also rotate it around any axis.
+ So this one here will get rotated by -40 degrees (40 degrees anticlockwise) around X axis and
+ 10 degrees (clockwise) around Y axis.
+
+ You can of course rotate it around Z axis with `data-rotate-z` - it has exactly the same effect
+ as `data-rotate` (these two are basically aliases).
+
+ -->
+ <div id="its-in-3d" class="step" data-x="6200" data-y="4300" data-z="-100" data-rotate-x="-40" data-rotate-y="10" data-scale="2">
+ <p><span class="have">have</span> <span class="you">you</span> <span class="noticed">noticed</span> <span class="its">it's</span> <span class="in">in</span> <b>3D<sup>*</sup></b>?</p>
+ <span class="footnote">* beat that, prezi ;)</span>
+ </div>
+
+ <!--
+
+ So to make a summary of all the possible attributes used to position presentation steps, we have:
+
+ * `data-x`, `data-y`, `data-z` -- they define the position of **the center** of step element on
+ the canvas in pixels; their default value is 0;
+ * `data-rotate-x`, `data-rotate-y`, 'data-rotate-z`, `data-rotate` -- they define the rotation of
+ the element around given axis in degrees; their default value is 0; `data-rotate` and `data-rotate-z`
+ are exactly the same;
+ * `data-scale` -- defines the scale of step element; default value is 1
+
+ -->
+ <div id="overview" class="step" data-x="3000" data-y="1500" data-scale="10">
+ </div>
+
+</div>
+
+<!--
+
+ Hint is not related to impress.js in any way.
+
+ But it can show you how to use impress.js features in creative way.
+
+ When the presentation step is shown (selected) it's element get's the class of "active" and `#impress` root
+ element get's the class based on active step id `step-ID` (where ID is the step id)... It probably is not
+ so clear because of all these IDs in here, so for example when the first step (the one with id of `bored`)
+ is active, `#impress` element get a class of `step-bored`.
+
+ This class is used by this hint below. Check CSS file to see how it's shown with delayed CSS animation.
+
+-->
+<div class="hint">
+ <p>Use a spacebar or arrow keys to navigate</p>
+</div>
+
+
+<!--
+
+ Last, but not least.
+
+ To make all described above really work, you need to include impress.js in the page.
+ And you should do it in the end of your document. Not only because it's a good practice, but also
+ because I was lazy, haven't wrapped the code in any kind of "DOM ready" event, so it will not work
+ if included too early in the source ;)
+
+-->
+<script src="impress.js"></script>
+
+</body>
+</html>
+
+<!--
+
+ Now you know more or less everything you need to build your first impress.js presentation, but before
+ you start...
+
+ Oh, you've already cloned the code from GitHub?
+
+ You have it open in text editor?
+
+ Stop right there!
+
+ That's not how you create awesome presentations. This is only a code. Implementation of the idea that
+ first needs to grow in your mind.
+
+ So if you want to build great presentation take a pencil and piece of paper. And turn off the computer.
+
+ Sketch, draw and write. Brainstorm your ideas on a paper. Try to build a mind-map of what you'd like
+ to present. It will get you closer and closer to the layout you'll build later with impress.js.
+
+ Get back to the code only when you have your presentation ready on a paper. It doesn't make sense to do
+ it earlier, because you'll only waste your time fighting with positioning of useless points.
+
+ If you think I'm crazy, please put your hands on a book called "Presentation Zen". It's all about
+ creating awesome and engaging presentations.
+
+ Think about it. 'Cause impress.js may not help you, if you have nothing interesting to say.
+
+-->
+
+<!--
+
+ Are you still reading this?
+
+ For real?
+
+ I'm impressed! Feel free to let me know that you got that far (I'm @bartaz on Twitter), 'cause I'd like
+ to congratulate you personally :)
+
+-->
View
60 index.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet/less" type="text/css" href="/less/metro.less" />
+ <style>
+ body { width: 800px; margin: 0 auto; }
+ </style>
+ <script src="/scripts/less-1.2.1.min.js" type="text/javascript"></script>
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
+ <script type="text/javascript" src="/scripts/jquery.metro.js"></script>
+ </head>
+ <body>
+ <a href="http://github.com/Code52/metro.css/">
+ <img alt="Fork me on GitHub" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" style="position: absolute; top: 0; right: 0; border: 0;">
+ </a>
+
+ <h1 class="accent">metro.css</h1>
+ <h2 class="lime">stylesheets and then some</h2>
+ <div class="metro-pivot">
+ <div class="pivot-item">
+ <h3>about</h3>
+ <p>The <a href="http://code52.org">Code52</a> gang are putting together some stylesheets and resources for people looking to get more familiar with Metro.</p>
+
+ <p>Much like the Twitter Bootstrap project (which was one of the inspirations for this project), the site uses LESS to build the stylesheets on-the-fly. So if you wanted to test this locally, you'd need something like <a href="http://github.com/mojombo/jekyll/">Jekyll</a> or our own <a href="http://github.com/Code52/Pretzel/">Pretzel</a> to serve up the content (as the generation is done using Javascript and you will likely encounter file:// permission issues).
+
+ <p>While you can just go and grab the code from <a href="http://github.com/Code52/metro.css/">GitHub</a>, feel free to click around the site and see more for yourself.
+ </div>
+
+ <div class="pivot-item">
+ <h3>demos</h3>
+ <ul class="metro-list">
+ <li class="accent"><a href="/demos/fonts/">A font for all occasions</a></li>
+ <li class="accent"><a href="/demos/fonts/">jqMetro - a pivot control</a></li>
+ <li class="accent"><a href="/demos/blog/">Applying Metro to a blog</a></li>
+ <li class="accent"><a href="/demos/slides/">Adding metro to impress.js (WIP)</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <script>
+ var defaults = {
+ animationDuration: 350,
+ headerOpacity: 0.25,
+ fixedHeaders: false,
+ headerSelector: function (item) { return item.children("h3").first(); },
+ itemSelector: function (item) { return item.children(".pivot-item"); },
+ headerItemTemplate: function () { return $("<span class='header' />"); },
+ pivotItemTemplate: function () { return $("<div class='pivotItem' />"); },
+ itemsTemplate: function () { return $("<div class='items' />"); },
+ headersTemplate: function () { return $("<div class='headers' />"); },
+ controlInitialized: undefined,
+ selectedItemChanged: undefined
+ };
+
+ $(function () {
+ $("div.metro-pivot").metroPivot(defaults);
+ });
+ </script>
+ </body>
+</html>
View
19 less/colours.less
@@ -1,12 +1,11 @@
.accent { color: @accent; }
-
-.blue { color: @blue; }
-.brown { color: @brown; }
-.green { color: @green; }
-.lime { color: @lime; }
.magenta { color: @magenta; }
-.orange { color: @orange; }
-.pink { color: @pink; }
-.purple { color: @purple; }
-.red { color: @red; }
-.teal { color: @teal; }
+.purple{ color: @purple;}
+.teal { color: @teal;}
+.lime { color: @lime;}
+.brown { color: @brown;}
+.pink { color: @pink;}
+.orange { color: @orange;}
+.blue { color: @blue;}
+.red { color: @red;}
+.green { color: @green;}
View
27 less/fonts.less
@@ -21,27 +21,28 @@
}
#headingstyles {
- font-family: @headingfonts;
- font-weight: 100;
- margin-top: 5px;
- margin-bottom: 0px;
- text-transform: lowercase;
+ font-family: @headingfonts;
+ font-weight: 100;
+ text-transform: lowercase;
+ margin-top:5px;
+ margin-bottom:0px;
}
+
body {
- font-family: @fonts;
- font-size: @baseFontSize;
+ font-family: @fonts;
+ font-size: @baseFontSize;
}
h1, h2, h3, h4, h5, h6
{
- #headingstyles;
+ #headingstyles;
}
-h1 { font-size: @h1fontSize; }
-h2 { font-size: @h2fontSize; }
-h3 { font-size: @h3fontSize; }
+h1 { font-size: @baseFontSize * 4; }
+h2 { font-size: @baseFontSize * 3; }
+h3 { font-size: @baseFontSize * 2; }
h4, h5, h6 {
- font-weight: normal;
- text-transform: uppercase;
+ font-weight: normal;
+ text-transform: uppercase;
}
View
57 less/metro.less
@@ -2,45 +2,27 @@
@import "colours.less";
@import "fonts.less";
-.metro-pivot .headers {
- clear: both;
- display: block;
- white-space: nowrap;
-}
-
-.metro-pivot .pivot-item h3,
-.metro-pivot .headers .header {
- #headingstyles;
-
- cursor: pointer;
- display: inline-block;
- font-size: @h2fontSize;
- margin-right: 24px;
- padding: 0;
- vertical-align: top;
+#bundle {
+ .pivot-header {
+ color: @inactive;
+ font-size: 20px;
+ text-decoration: none;
+ text-transform: lowercase;
+
+ &.active {
+ color: @foreground;
+ }
+ }
}
+.metro-pivot .headers { white-space: nowrap; display: block; clear: both; }
+.metro-pivot .pivot-item h3, .metro-pivot .headers .header { #headingstyles; font-size: @h2fontsize; display: inline-block; vertical-align: top; padding: 0; cursor: pointer; margin-right:24px; }
.metro-pivot .headers .header.current { }
.metro-pivot .items { position: relative; }
+.metro-pivot .items .pivotItem { display: block; white-space: normal; text-align: justify; width: 100%; }
-.metro-pivot .items .pivotItem {
- display: block;
- text-align: justify;
- white-space: normal;
- width: 100%;
- }
-
-ul.metro-list { padding: 0; }
-
-ul.metro-list li {
- border-left: solid 30px;
- display: block;
- height: 20px;
- list-style: none;
- margin: 10px 0;
- overflow: hidden;
- padding: 5px;
-}
+ul.metro-list, ol.metro-list { padding: 0; }
+ul.metro-list li, ol.metro-list li { display: block; margin: 10px 0; height: 20px; padding: 5px; overflow: hidden; border-left: solid 30px; list-style: none; }
pre {
padding: 15px;
@@ -48,9 +30,4 @@ pre {
background: @faded;
}
-code {
- background: @faded;
- border: 1px solid @inactive;
- padding-left: 5px;
- padding-right: 5px;
-}
+code { padding-left:5px; padding-right: 5px; border: 1px solid @inactive; background: @faded; }
View
54 less/metroblog.less
@@ -1,5 +1,57 @@
@import "metro.less";
+nav {
+ ul {
+ list-style-type: none;
+ padding-left: 0;
+
+ li {
+ display: inline;
+ margin-right: 20px;
+
+ a {
+ #bundle > .pivot-header;
+ }
+ }
+ }
+}
+
footer {
font-size: 90%;
-}
+}
+
+footer {
+ font-size: 90%;
+}
+
+img {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ box-shadow: 3px 3px 7px #777;
+}
+img.left {
+ float: left;
+ margin-right: 20px;
+
+}
+
+img.right {
+ float: right;
+ margin-left: 20px;
+}
+
+
+ol.metro-list { margin-left: 10px; }
+
+
+h1, h2, h3, h4, h5, h6 {
+ color: @blue;
+}
+
+ul.metro-list li, ol.metro-list li { border-left: solid 30px @blue; }
+
+section.title { float: left; font-size: @baseFontSize * 4; }
+
+nav { float: right; margin-left: 140px; margin-top: 20px; margin-bottom: 20px; }
+
+nav a:hover { color: black; }
View
22 less/variables.less
@@ -1,25 +1,25 @@
/* Type */
@fonts: "Segoe UI", "Segoe WP", "Helvetica Neue", 'RobotoRegular', sans-serif;
@headingfonts: "Segoe UI Light", "Helvetica Neue", 'RobotoLight', "Segoe UI", "Segoe WP", sans-serif;
+@h1fontsize: 3.8em;
+@h2fontsize: 2em;
@baseFontSize: 14px;
-@h1fontSize: @baseFontSize * 4;
-@h2fontSize: @baseFontSize * 3;
-@h3fontSize: @baseFontSize * 2;
/* Colors */
-@blue: #1BA1E2;
-@brown: #A05000;
-@green: #339933;
-@lime: #8CBF26;
@magenta: #FF0097;
-@orange: #F09609;
-@pink: #E671B8;
@purple: #A200FF;
-@red: #E51400;
@teal: #00ABA9;
+@lime: #8CBF26;
+@brown: #A05000;
+@pink: #E671B8;
+@orange: #F09609;
+@blue: #1BA1E2;
+@red: #E51400;
+@green: #339933;
+
@accent: @blue;
@background: white;
@foreground: black;
@inactive: #aaaaaa;
-@faded: #fafafa;
+@faded: #fafafa;
Please sign in to comment.
Something went wrong with that request. Please try again.