Skip to content

Commit

Permalink
Slide examples and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscoyier committed Mar 7, 2011
1 parent 0325c89 commit 5e8264d
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 25 deletions.
26 changes: 16 additions & 10 deletions css/slide.css → css/framework.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
html { overflow-y: scroll; }
html, body { overflow-x: hidden; }
html, body { overflow-x: hidden; height: 100%; }
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
Expand All @@ -13,7 +13,7 @@ body {
header, footer, section, figure { display: block; }

header {
background: #686dd6;
background: rgba(50,50,200,0.8);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -42,8 +42,11 @@ header section {
text-indent: -9999px;
}
#content {
padding-top: 170px;
padding-bottom: 80px;
height: 100%;
}
#content section {
padding-top: 170px;
padding-bottom: 80px;
}

h1, h2, h3, h4, h5 {
Expand All @@ -52,7 +55,7 @@ h1, h2, h3, h4, h5 {
}
h1 {
font-size: 66px;
background: #2C2A25;
background: rgba(0,0,0,0.8);
color: white;
text-align: center;
position: fixed;
Expand All @@ -79,12 +82,12 @@ h2 {
}

h3 {
font-size: 26px;
font-size: 40px;
margin: 0 0 15px 0;
}

footer {
background: #2C2A25;
background: rgba(0,0,0,0.8);
padding: 10px;
position: fixed;
width: 100%;
Expand All @@ -105,12 +108,12 @@ footer select {

#next {
position: absolute;
right: 30px;
right: 40px;
top: 0;
}
#previous {
position: absolute;
left: 30px;
left: 20px;
top: 0;
}
#next:after, #previous:after {
Expand All @@ -127,7 +130,7 @@ footer select {
border-left: 15px solid #999;
}
#previous:after {
right: 125%;
right: 120%;
border-right: 15px solid #999;
}
#next:hover, #previous:hover {
Expand All @@ -148,8 +151,11 @@ footer select {
left: -3500px;
position: relative;
-webkit-transition: all 1s ease;
-webkit-transition-property: left, opacity;
-moz-transition: all 1s ease;
-moz-transition-property: left, opacity;
-o-transition: all 1s ease;
-o-transition-property: left, opacity;
}

.loaded #content, .loaded h1 section {
Expand Down
29 changes: 29 additions & 0 deletions css/slides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.slide-1 {
background: url(../images/traintrack.jpg) center center no-repeat;
}
.slide-1 blockquote {
color: white;
font-size: 40px;
margin-top: 60px;
text-shadow: 0 2px 0 black;
font: italic 70px Baskerville;
text-align: center;

}
.slide-1 blockquote cite {
display: block;
font-size: 30px;
margin-top: 130px;
}

.slide-2 pre {
background: #333;
color: white;
padding: 30px;
font: 40px Monaco, MonoSpace;
margin: 0;
}

.slide-3 {
background: url(../images/sunflowers.jpg) center center no-repeat;
}
Binary file added images/sunflowers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/traintrack.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions includes/doctype.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<link rel="stylesheet" href="../css/slide.css">
<link rel="stylesheet" href="../css/framework.css">
<link rel="stylesheet" href="../css/slides.css">
</head>

<body>

<div id="page-wrap">
<body>
2 changes: 0 additions & 2 deletions includes/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ function array_key_relative ($array, $current_key, $offset = 1) {
</section>
</footer>

</div><!--page-wrap-->

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="../scripts/slide.js"></script>

Expand Down
4 changes: 2 additions & 2 deletions scripts/slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ function gotoThere(link) {

$("#previous, #next").click(function(e) {
$("html").addClass("leaving");
setTimeout(gotoThere, 300, this.href);
setTimeout(gotoThere, 400, this.href);
return false;
});

$("#jumper").change(function() {
$("html").addClass("leaving");
setTimeout(gotoThere, 300, $(this).val());
setTimeout(gotoThere, 400, $(this).val());
});
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$pageNames = array(
'1-intro.php' => 'This is my <strong>amazing</strong> first slide',
'2-whatever.php' => 'You like <strong>code</strong> don\'t you?',
'3-graphic.php' => '...others do not.'
'3-graphic.php' => 'Thank you <strong>very</strong> much.'
);


Expand Down
13 changes: 11 additions & 2 deletions slides/1-intro.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
include_once("../includes/header.php");
?>

<div id="content">
<div id="content" class="slide-1">

<section>

<!-- Slide content goes here -->
<blockquote>
Children and dogs are as necessary to the welfare of the country as Wall Street and the railroads.
<cite>- Harry S Truman</cite>
</blockquote>

<p><a href="http://www.flickr.com/photos/dotdoubledot/2208867228/">Photo by Sandy Redding</a></p>

</section>

</div><!--content-->

Expand Down
20 changes: 18 additions & 2 deletions slides/2-whatever.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,25 @@
include_once("../includes/header.php");
?>

<div id="content">
<div id="content" class="slide-2">

<section>

<!-- Slide content goes here -->
<h3>CSS Gradient Text</h3>

<pre><code>h1 {
font-size: 60px;
background: -webkit-gradient(linear,
left top,
left bottom,
from (#eee),
to (#333)
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}</code></pre>

</section>

</div><!--content-->

Expand Down
8 changes: 6 additions & 2 deletions slides/3-graphic.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
include_once("../includes/header.php");
?>

<div id="content">
<div id="content" class="slide-3">

<section>

<!-- Slide content goes here -->
<!-- Slide content goes here -->

</section>

</div><!--content-->

Expand Down

0 comments on commit 5e8264d

Please sign in to comment.