glyph 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.textile +37 -10
- data/README.textile +16 -11
- data/VERSION +1 -1
- data/book/config.yml +3 -5
- data/book/document.glyph +6 -4
- data/book/lib/layouts/bookindex.glyph +120 -123
- data/book/lib/layouts/bookpage.glyph +121 -123
- data/book/lib/layouts/project.glyph +3 -6
- data/book/lib/tasks/tasks.rake +6 -9
- data/book/text/changelog.glyph +9 -0
- data/book/text/compiling/programmatic_usage.glyph +1 -1
- data/book/text/extending/output_format.glyph +9 -12
- data/book/text/introduction.glyph +0 -7
- data/book/text/macros/macros_core.glyph +1 -1
- data/book/text/macros/macros_inline.glyph +1 -1
- data/book/text/text_editing/esc_quot.glyph +6 -6
- data/book/text/text_editing/stylesheets.glyph +1 -1
- data/config.yml +2 -0
- data/glyph.gemspec +25 -19
- data/lib/glyph/document.rb +23 -24
- data/lib/glyph/macro.rb +1 -2
- data/macros/html/structure.rb +3 -3
- data/macros/html5/block.rb +1 -1
- data/spec/files/test.sass +2 -0
- data/spec/files/test.scss +5 -0
- data/spec/lib/macro_spec.rb +3 -3
- data/spec/macros/filters_spec.rb +3 -2
- data/spec/macros/html5_spec.rb +1 -1
- data/spec/macros/macros_spec.rb +9 -7
- data/styles/coderay.css +47 -119
- data/styles/coderay.scss +43 -0
- data/styles/default.css +203 -217
- data/styles/default.scss +258 -0
- data/styles/definitions.scss +20 -0
- data/styles/generate +3 -0
- data/styles/pagination.css +124 -188
- data/styles/pagination.scss +214 -0
- data/tasks/generate.rake +1 -1
- metadata +27 -21
data/styles/coderay.scss
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
@import "definitions.scss";
|
2
|
+
.CodeRay {
|
3
|
+
@include codeblock;
|
4
|
+
pre {
|
5
|
+
line-height: 1.2em;
|
6
|
+
margin: 0px;
|
7
|
+
padding: 0px; }
|
8
|
+
.no {
|
9
|
+
font-weight: bold;
|
10
|
+
color: #595959;
|
11
|
+
}
|
12
|
+
.an {
|
13
|
+
color: #E7BE69; }
|
14
|
+
.c {
|
15
|
+
color: #BC9358;
|
16
|
+
font-style: italic; }
|
17
|
+
.ch {
|
18
|
+
color: #509E4F; }
|
19
|
+
.cl, .co {
|
20
|
+
color: #FFF; }
|
21
|
+
.fl {
|
22
|
+
color: #A4C260; }
|
23
|
+
.fu {
|
24
|
+
color: #FFC56D; }
|
25
|
+
.gv {
|
26
|
+
color: #D0CFFE; }
|
27
|
+
.i {
|
28
|
+
color: #A4C260; }
|
29
|
+
.il {}
|
30
|
+
.iv {
|
31
|
+
color: #D0CFFE; }
|
32
|
+
.pp {
|
33
|
+
color: #E7BE69; }
|
34
|
+
.r {
|
35
|
+
color: #CB7832; }
|
36
|
+
.rx, .s {
|
37
|
+
color: #A4C260; }
|
38
|
+
.sy {
|
39
|
+
color: #6C9CBD; }
|
40
|
+
.ta {
|
41
|
+
color: #E7BE69; }
|
42
|
+
.pc {
|
43
|
+
color: #6C9CBD; } }
|
data/styles/default.css
CHANGED
@@ -1,272 +1,258 @@
|
|
1
1
|
* {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
border: none;
|
3
|
+
font-family: inherit;
|
4
|
+
font-size: 100%;
|
5
|
+
font-style: inherit;
|
6
|
+
margin: 0;
|
7
|
+
padding: 0; }
|
8
|
+
|
9
9
|
html {
|
10
|
-
|
11
|
-
|
10
|
+
background: #fff; }
|
11
|
+
|
12
12
|
ol, ul {
|
13
|
-
|
14
|
-
|
13
|
+
margin: 0.3em 0; }
|
14
|
+
|
15
15
|
p {
|
16
|
-
|
17
|
-
}
|
16
|
+
margin: 1em 0; }
|
18
17
|
|
19
18
|
table {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
border-collapse: collapse;
|
20
|
+
border-spacing: 0;
|
21
|
+
margin: auto;
|
22
|
+
margin-top: 1em; }
|
23
|
+
|
25
24
|
body {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
25
|
+
line-height: 1.2em;
|
26
|
+
margin: 0;
|
27
|
+
padding: 0;
|
28
|
+
padding: 0 1em;
|
29
|
+
text-align: justify; }
|
32
30
|
|
33
31
|
/* Structure */
|
34
|
-
.halftitlepage
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
.titlepage
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
}
|
32
|
+
.halftitlepage {
|
33
|
+
margin: auto;
|
34
|
+
text-align: center; }
|
35
|
+
|
36
|
+
.titlepage {
|
37
|
+
margin: auto;
|
38
|
+
text-align: center; }
|
39
|
+
.titlepage h1 {
|
40
|
+
font-size: 2.5em;
|
41
|
+
font-weight: bold;
|
42
|
+
line-height: 1.5em;
|
43
|
+
margin-bottom: 0.2em; }
|
44
|
+
|
45
|
+
.halftitlepage h1 {
|
46
|
+
font-size: 2.5em;
|
47
|
+
font-weight: bold;
|
48
|
+
line-height: 1.5em;
|
49
|
+
margin-bottom: 0.2em; }
|
50
|
+
.halftitlepage h2 {
|
51
|
+
font-size: 1.1em;
|
52
|
+
font-style: italic;
|
53
|
+
font-weight: bold;
|
54
|
+
line-height: 1.2em;
|
55
|
+
margin-bottom: 0.5em;
|
56
|
+
prince-bookmark-level: none; }
|
57
|
+
|
58
|
+
.titlepage h2 {
|
59
|
+
font-size: 1.1em;
|
60
|
+
font-style: italic;
|
61
|
+
font-weight: bold;
|
62
|
+
line-height: 1.2em;
|
63
|
+
margin-bottom: 0.5em;
|
64
|
+
prince-bookmark-level: none; }
|
65
|
+
|
52
66
|
.author {
|
53
|
-
|
54
|
-
|
67
|
+
font-size: 1em; }
|
68
|
+
|
55
69
|
.pubdate {
|
56
|
-
|
57
|
-
|
70
|
+
font-size: 0.8em; }
|
71
|
+
|
58
72
|
li {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
ol li{
|
64
|
-
|
65
|
-
|
73
|
+
list-style-type: square;
|
74
|
+
margin: 0.4em 0;
|
75
|
+
margin-left: 1.5em; }
|
76
|
+
|
77
|
+
ol li {
|
78
|
+
list-style-type: decimal; }
|
79
|
+
|
66
80
|
.contents li {
|
67
|
-
|
68
|
-
|
81
|
+
list-style-type: none; }
|
82
|
+
|
69
83
|
img {
|
70
|
-
|
71
|
-
|
72
|
-
|
84
|
+
margin: 0 5px;
|
85
|
+
padding: 2px; }
|
86
|
+
|
73
87
|
dt {
|
74
|
-
|
75
|
-
|
76
|
-
|
88
|
+
font-weight: bold;
|
89
|
+
margin-top: 1em; }
|
90
|
+
|
77
91
|
dd {
|
78
|
-
|
79
|
-
}
|
92
|
+
font-style: italic; }
|
80
93
|
|
81
94
|
blockquote {
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
}
|
95
|
+
margin: 1em 1em;
|
96
|
+
font-style: italic;
|
97
|
+
color: #121212; }
|
86
98
|
|
87
99
|
table {
|
88
|
-
|
89
|
-
|
100
|
+
border: 1px solid #e6e6e6; }
|
101
|
+
|
90
102
|
th {
|
91
|
-
|
92
|
-
|
103
|
+
background: #EEE; }
|
104
|
+
|
93
105
|
tr, td, th {
|
94
|
-
|
95
|
-
|
106
|
+
padding: 5px; }
|
107
|
+
|
96
108
|
td, tr {
|
97
|
-
|
98
|
-
|
109
|
+
border: 1px solid #e6e6e6; }
|
110
|
+
|
99
111
|
sup {
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
112
|
+
font-size: 0.7em;
|
113
|
+
font-weight: bold;
|
114
|
+
margin-left: -0.4em; }
|
115
|
+
|
104
116
|
/* BLOCKS */
|
105
117
|
.center {
|
106
|
-
|
107
|
-
|
108
|
-
|
118
|
+
margin: auto;
|
119
|
+
text-align: center; }
|
120
|
+
|
109
121
|
.left {
|
110
|
-
|
111
|
-
|
112
|
-
|
122
|
+
margin: auto;
|
123
|
+
text-align: left; }
|
124
|
+
|
113
125
|
.right {
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
.
|
121
|
-
.
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
}
|
131
|
-
.note>p,
|
132
|
-
.important>p,
|
133
|
-
.tip>p,
|
134
|
-
.caution>p {
|
135
|
-
margin: 0;
|
136
|
-
padding: 0;
|
137
|
-
}
|
126
|
+
margin: auto;
|
127
|
+
text-align: center; }
|
128
|
+
|
129
|
+
.note, .important, .tip, .caution, .box {
|
130
|
+
border: 1px solid #e6e6e6;
|
131
|
+
display: block;
|
132
|
+
margin: 0.5em auto;
|
133
|
+
padding: 0 0.5em;
|
134
|
+
width: 600px;
|
135
|
+
background: #EEE;
|
136
|
+
color: #1F1F1F; }
|
137
|
+
|
138
|
+
.note > p, .important > p, .tip > p, .caution > p {
|
139
|
+
margin: 0;
|
140
|
+
padding: 0; }
|
141
|
+
|
138
142
|
.note-title {
|
139
|
-
|
140
|
-
|
141
|
-
|
143
|
+
font-weight: bold;
|
144
|
+
margin-right: 1em; }
|
145
|
+
|
142
146
|
.box-title {
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
.code {
|
148
|
-
margin: 1em auto;
|
149
|
-
padding: 0.5em;
|
150
|
-
width: 600px;
|
151
|
-
}
|
147
|
+
display: block;
|
148
|
+
text-align: center;
|
149
|
+
font-weight: bold; }
|
150
|
+
|
152
151
|
.comment {
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
}
|
152
|
+
display: block;
|
153
|
+
border: 1px solid #004D00;
|
154
|
+
background: #7AFF7A;
|
155
|
+
padding: 3px;
|
156
|
+
margin: 1px; }
|
157
|
+
.comment .comment-pre {
|
158
|
+
color: #004D00; }
|
159
|
+
|
162
160
|
.todo {
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
}
|
161
|
+
display: block;
|
162
|
+
border: 1px solid #990000;
|
163
|
+
background: #FF9999;
|
164
|
+
padding: 3px;
|
165
|
+
margin: 1px; }
|
166
|
+
.todo .todo-pre {
|
167
|
+
color: #990000; }
|
168
|
+
|
172
169
|
/* TEXT */
|
173
170
|
body {
|
174
|
-
|
175
|
-
|
176
|
-
|
171
|
+
color: #000;
|
172
|
+
font-size: 1em; }
|
173
|
+
|
177
174
|
h2, section section h1, h1.toc-header {
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
175
|
+
display: block;
|
176
|
+
font-size: 2em;
|
177
|
+
font-weight: bold;
|
178
|
+
margin: 3em 0 1em 0; }
|
179
|
+
|
183
180
|
h3, section section section h1 {
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
181
|
+
font-size: 1.6em;
|
182
|
+
font-weight: bold;
|
183
|
+
margin: 3em 0 1em 0; }
|
184
|
+
|
188
185
|
h4, section section section section h1 {
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
186
|
+
font-size: 1.3em;
|
187
|
+
font-weight: bold;
|
188
|
+
margin: 3em 0 1em 0; }
|
189
|
+
|
193
190
|
h5, section section section section section h1 {
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
191
|
+
font-size: 1.2em;
|
192
|
+
font-weight: bold;
|
193
|
+
margin: 3em 0 1em 0; }
|
194
|
+
|
198
195
|
em {
|
199
|
-
|
200
|
-
|
196
|
+
font-style: italic; }
|
197
|
+
|
201
198
|
a {
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
199
|
+
color: #007bc4;
|
200
|
+
text-decoration: none; }
|
201
|
+
a:hover {
|
202
|
+
color: #005b91; }
|
203
|
+
|
204
|
+
pre > code {
|
205
|
+
-webkit-border-radius: 5px;
|
206
|
+
-moz-border-radius: 5px;
|
207
|
+
border-radius: 5px;
|
208
|
+
background-color: #222;
|
209
|
+
font-family: 'Courier New', 'Terminal', monospace;
|
210
|
+
color: #E6E0DB;
|
211
|
+
padding: 20px;
|
212
|
+
overflow: auto;
|
213
|
+
font-size: 0.8em;
|
214
|
+
margin: 20px 0 20px 0; }
|
215
|
+
|
216
|
+
code {
|
217
|
+
font-size: 0.8em; }
|
218
|
+
|
219
|
+
span.line-numbers {
|
220
|
+
margin: 0;
|
221
|
+
padding: 3px; }
|
220
222
|
|
221
223
|
nav, .navigation {
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
}
|
224
|
+
display: block;
|
225
|
+
margin: 1em auto;
|
226
|
+
text-align: center;
|
227
|
+
border: 1px solid #e6e6e6; }
|
227
228
|
|
228
229
|
nav.contents {
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
230
|
+
margin: auto;
|
231
|
+
text-align: left;
|
232
|
+
border: none; }
|
233
|
+
nav a {
|
234
|
+
margin: 1em; }
|
233
235
|
|
234
|
-
|
235
|
-
|
236
|
-
}
|
236
|
+
.navigation a {
|
237
|
+
margin: 1em; }
|
237
238
|
|
238
239
|
nav.contents a {
|
239
|
-
|
240
|
-
}
|
240
|
+
margin: 0; }
|
241
241
|
|
242
242
|
mark {
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
pre>code {
|
249
|
-
font-size: 1em;
|
250
|
-
}
|
243
|
+
font-weight: bolder;
|
244
|
+
font-style: italic;
|
245
|
+
background: none; }
|
246
|
+
|
251
247
|
td p, td ul, td ol {
|
252
|
-
|
253
|
-
}
|
254
|
-
td>div.code, td>code {
|
255
|
-
width: auto;
|
256
|
-
margin: 0.2em;
|
257
|
-
padding: 0.2em;
|
258
|
-
}
|
259
|
-
|
260
|
-
.topic{
|
261
|
-
margin: 2em auto;
|
262
|
-
}
|
248
|
+
margin: 0; }
|
263
249
|
|
264
|
-
|
250
|
+
.topic {
|
251
|
+
margin: 2em auto; }
|
265
252
|
|
253
|
+
/* FONTS */
|
266
254
|
body {
|
267
|
-
|
268
|
-
}
|
255
|
+
font-family: "Gentium Book Basic", "Book Antiqua", "Times New Roman", "Serif"; }
|
269
256
|
|
270
257
|
code, pre {
|
271
|
-
|
272
|
-
}
|
258
|
+
font-family: "Droid Sans Mono", "Consolas", "Monaco", "Courier", "Monospace"; }
|