Skip to content

Commit de92885

Browse files
committed
Merge pull request #48 from jdan/new-design
New design
2 parents 86cb6c2 + d0a987c commit de92885

6 files changed

Lines changed: 66 additions & 84 deletions

File tree

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Cleaver turns this:
3939

4040
Into this:
4141

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

4444
## Quick Start
4545

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

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

110110
### Title slide
111111

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

147147
```html
148+
{{#progress}}
149+
<div class="progress">
150+
<div class="progress-bar"></div>
151+
</div>
152+
{{/progress}}
153+
148154
<div id="wrapper">
149155
{{#slides}}
150156
<section class="slide">{{{.}}}</section>
151157
{{/slides}}
152158
</div>
153159
{{#controls}}
154-
<div id="controls">
155-
<div id="prev">&larr;</div>
156-
<div id="next">&rarr;</div>
160+
<div class="controls">
161+
<div class="arrow prev"></div>
162+
<div class="arrow next"></div>
157163
</div>
158164
{{/controls}}
159165

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cleaver",
33
"preferGlobal": true,
4-
"version": "0.2.5",
4+
"version": "0.3.0",
55
"author": "Jordan Scales <scalesjordan@gmail.com>",
66
"description": "30-second slideshows for hackers",
77
"keywords":[

resources/dark.css

Lines changed: 0 additions & 24 deletions
This file was deleted.

resources/default.css

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
body {
22
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
3-
color: #444;
4-
background-color: #aaa;
3+
color: #222;
4+
background-color: #f7f7f7;
55
}
66

77
#wrapper {
88
width: 850px;
99
height: 600px;
1010
overflow: hidden;
1111
margin: 80px auto 0 auto;
12-
box-shadow: 3px 3px 3px #666;
1312
}
1413

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

37-
#controls {
38-
width: 850px;
39-
margin: -60px auto 0 auto;
40-
}
41-
42-
#controls div {
43-
width: 50px;
44-
height: 50px;
45-
padding: 5px 50px;
46-
font-size: 36px;
47-
background-color: #ccc;
48-
}
49-
50-
#controls div:hover {
51-
background-color: #bbb;
52-
cursor: pointer;
35+
.controls {
36+
position: absolute;
37+
bottom: 20px;
38+
left: 20px;
5339
}
5440

55-
#controls #prev {
41+
.controls .arrow {
42+
width: 0; height: 0;
43+
border: 30px solid #333;
5644
float: left;
57-
-webkit-border-top-right-radius: 20px;
58-
-moz-border-radius-topright: 20px;
59-
border-top-right-radius: 20px;
45+
margin-right: 30px;
6046

61-
/* Fix selection bug */
6247
-webkit-touch-callout: none;
6348
-webkit-user-select: none;
6449
-khtml-user-select: none;
@@ -67,37 +52,52 @@ body {
6752
user-select: none;
6853
}
6954

70-
#controls #next {
71-
float: right;
72-
text-align: right;
73-
-webkit-border-top-left-radius: 20px;
74-
-moz-border-radius-topleft: 20px;
75-
border-top-left-radius: 20px;
55+
.controls .prev {
56+
border-top-color: transparent;
57+
border-bottom-color: transparent;
58+
border-left-color: transparent;
7659

77-
/* Fix selection bug */
78-
-webkit-touch-callout: none;
79-
-webkit-user-select: none;
80-
-khtml-user-select: none;
81-
-moz-user-select: none;
82-
-ms-user-select: none;
83-
user-select: none;
60+
border-left-width: 0;
61+
border-right-width: 50px;
62+
}
63+
64+
.controls .next {
65+
border-top-color: transparent;
66+
border-bottom-color: transparent;
67+
border-right-color: transparent;
68+
69+
border-left-width: 50px;
70+
border-right-width: 0;
71+
}
72+
73+
.controls .prev:hover {
74+
border-right-color: #888;
75+
cursor: pointer;
76+
}
77+
78+
.controls .next:hover {
79+
border-left-color: #888;
80+
cursor: pointer;
8481
}
8582

8683
.slide h1 {
8784
font-size: 100px;
85+
line-height: 1.2;
8886
text-align: center;
89-
margin-top: 200px;
90-
margin-bottom: 30px;
87+
margin: 140px 0 0;
9188
}
9289

9390
.slide h2 {
9491
font-size: 30px;
92+
line-height: 1.2;
93+
margin: 5px 0;
9594
text-align: center;
9695
font-weight: 200;
9796
}
9897

9998
.slide h3 {
10099
font-size: 45px;
100+
line-height: 1.2;
101101
border-bottom: 1px solid #aaa;
102102
margin: 0;
103103
padding-bottom: 15px;
@@ -144,19 +144,19 @@ pre > code {
144144
line-height: 1.3;
145145
}
146146

147-
.hidden {
148-
display: none;
149-
}
150-
151147
.progress {
152148
position: fixed;
153149
top: 0; left: 0; right: 0;
154-
height: 5px;
155-
background-color: #bbb;
150+
height: 3px;
156151
}
157152

158153
.progress-bar {
159154
width: 0%;
160-
height: 5px;
161-
background-color: #eee;
155+
height: 3px;
156+
background-color: #b4b4b4;
157+
158+
-webkit-transition: width 0.1s ease-out;
159+
-moz-transition: width 0.1s ease-out;
160+
-o-transition: width 0.1s ease-out;
161+
transition: width 0.1s ease-out;
162162
}

resources/navigation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ window.onload = function () {
120120
}
121121
}
122122

123-
if (document.querySelector('#next') && document.querySelector('#prev')) {
124-
document.querySelector('#next').onclick = function (e) {
123+
if (document.querySelector('.next') && document.querySelector('.prev')) {
124+
document.querySelector('.next').onclick = function (e) {
125125
e.preventDefault();
126126
goForward();
127127
}
128128

129-
document.querySelector('#prev').onclick = function (e) {
129+
document.querySelector('.prev').onclick = function (e) {
130130
e.preventDefault();
131131
goBack();
132132
}

templates/default.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
{{/slides}}
1111
</div>
1212
{{#controls}}
13-
<div id="controls">
14-
<div id="prev">&larr;</div>
15-
<div id="next">&rarr;</div>
13+
<div class="controls">
14+
<div class="arrow prev"></div>
15+
<div class="arrow next"></div>
1616
</div>
1717
{{/controls}}
1818

0 commit comments

Comments
 (0)