Skip to content

Commit

Permalink
Merge pull request #48 from jdan/new-design
Browse files Browse the repository at this point in the history
New design
  • Loading branch information
jdan committed Sep 27, 2013
2 parents 86cb6c2 + d0a987c commit de92885
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 84 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Cleaver turns this:

Into this:

![output](https://i.cloudup.com/hHBVUtbREK.gif)
![output](https://i.cloudup.com/cIssKFjcB6.gif)

## Quick Start

Expand Down Expand Up @@ -105,7 +105,7 @@ the following fields.
If author is included, the following slide will be automatically inserted
at the end of your presentation:

![author slide](https://i.cloudup.com/YxgwvqVZNg-1200x1200.png)
![author slide](https://i.cloudup.com/f0zVsUwqF0-3000x3000.png)

### Title slide

Expand Down Expand Up @@ -145,15 +145,21 @@ Or click the buttons
By default, cleaver slides are rendered in the following template:

```html
{{#progress}}
<div class="progress">
<div class="progress-bar"></div>
</div>
{{/progress}}

<div id="wrapper">
{{#slides}}
<section class="slide">{{{.}}}</section>
{{/slides}}
</div>
{{#controls}}
<div id="controls">
<div id="prev">&larr;</div>
<div id="next">&rarr;</div>
<div class="controls">
<div class="arrow prev"></div>
<div class="arrow next"></div>
</div>
{{/controls}}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cleaver",
"preferGlobal": true,
"version": "0.2.5",
"version": "0.3.0",
"author": "Jordan Scales <scalesjordan@gmail.com>",
"description": "30-second slideshows for hackers",
"keywords":[
Expand Down
24 changes: 0 additions & 24 deletions resources/dark.css

This file was deleted.

96 changes: 48 additions & 48 deletions resources/default.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #444;
background-color: #aaa;
color: #222;
background-color: #f7f7f7;
}

#wrapper {
width: 850px;
height: 600px;
overflow: hidden;
margin: 80px auto 0 auto;
box-shadow: 3px 3px 3px #666;
}

/* styles for print layout */
Expand All @@ -31,34 +30,20 @@ body {
font-weight: 200;
font-size: 32px;
line-height: 44px;
background-color: #eee;
}

#controls {
width: 850px;
margin: -60px auto 0 auto;
}

#controls div {
width: 50px;
height: 50px;
padding: 5px 50px;
font-size: 36px;
background-color: #ccc;
}

#controls div:hover {
background-color: #bbb;
cursor: pointer;
.controls {
position: absolute;
bottom: 20px;
left: 20px;
}

#controls #prev {
.controls .arrow {
width: 0; height: 0;
border: 30px solid #333;
float: left;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-topright: 20px;
border-top-right-radius: 20px;
margin-right: 30px;

/* Fix selection bug */
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
Expand All @@ -67,37 +52,52 @@ body {
user-select: none;
}

#controls #next {
float: right;
text-align: right;
-webkit-border-top-left-radius: 20px;
-moz-border-radius-topleft: 20px;
border-top-left-radius: 20px;
.controls .prev {
border-top-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;

/* Fix selection bug */
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border-left-width: 0;
border-right-width: 50px;
}

.controls .next {
border-top-color: transparent;
border-bottom-color: transparent;
border-right-color: transparent;

border-left-width: 50px;
border-right-width: 0;
}

.controls .prev:hover {
border-right-color: #888;
cursor: pointer;
}

.controls .next:hover {
border-left-color: #888;
cursor: pointer;
}

.slide h1 {
font-size: 100px;
line-height: 1.2;
text-align: center;
margin-top: 200px;
margin-bottom: 30px;
margin: 140px 0 0;
}

.slide h2 {
font-size: 30px;
line-height: 1.2;
margin: 5px 0;
text-align: center;
font-weight: 200;
}

.slide h3 {
font-size: 45px;
line-height: 1.2;
border-bottom: 1px solid #aaa;
margin: 0;
padding-bottom: 15px;
Expand Down Expand Up @@ -144,19 +144,19 @@ pre > code {
line-height: 1.3;
}

.hidden {
display: none;
}

.progress {
position: fixed;
top: 0; left: 0; right: 0;
height: 5px;
background-color: #bbb;
height: 3px;
}

.progress-bar {
width: 0%;
height: 5px;
background-color: #eee;
height: 3px;
background-color: #b4b4b4;

-webkit-transition: width 0.1s ease-out;
-moz-transition: width 0.1s ease-out;
-o-transition: width 0.1s ease-out;
transition: width 0.1s ease-out;
}
6 changes: 3 additions & 3 deletions resources/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ window.onload = function () {
}
}

if (document.querySelector('#next') && document.querySelector('#prev')) {
document.querySelector('#next').onclick = function (e) {
if (document.querySelector('.next') && document.querySelector('.prev')) {
document.querySelector('.next').onclick = function (e) {
e.preventDefault();
goForward();
}

document.querySelector('#prev').onclick = function (e) {
document.querySelector('.prev').onclick = function (e) {
e.preventDefault();
goBack();
}
Expand Down
6 changes: 3 additions & 3 deletions templates/default.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
{{/slides}}
</div>
{{#controls}}
<div id="controls">
<div id="prev">&larr;</div>
<div id="next">&rarr;</div>
<div class="controls">
<div class="arrow prev"></div>
<div class="arrow next"></div>
</div>
{{/controls}}

Expand Down

0 comments on commit de92885

Please sign in to comment.