pagoda-jekyll 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjFkMjlkZmJiNzg2NDc3NTMxMWMzNmU1MDdlMGMzOTlkYTE5YjBmZg==
4
+ MGQyODk2NTdlYWQwNGZjZTllN2Y0ZWJmNTk0ZGVkN2NlMGVjN2ZlZA==
5
5
  data.tar.gz: !binary |-
6
- MTUxMzRlYjc1YzE1NmU2NjJjOTYwNWQ2MjE0Y2UwZjdjNjBiOGEwMg==
6
+ NzEyMWE4NjQ2NDYwOWEyZDFkYzc5Y2ZhZDczNTZiMDMxMDU0OWZjMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjU4MTVmNGE3NzU2NDk4YWFhYWUyMGY4OTkxOTVmNzExNTQzNGYzYTY1YWQ1
10
- NWJiNmU3YjE5NmYxZjlkZTdiNWMzODNhY2ZmNDdiMDAzMWIzZDY0M2U0MDE4
11
- MjNkMDY2ZjRjYjUxZTc0MzExMWIyOGRmMmU4Mjc0N2Y3OGI0OGE=
9
+ NzA1NTBmN2RkZTU2MDlhYjlkYjRlNWNiN2Q0NGNmNDI2NDc4YjRlODJjMGVk
10
+ ZDhjNDI4M2Y4ZDFmOTYzYTRmY2JkNzA0MDkwMjE5OWRjMDBlMjYzYjkzMzE3
11
+ ZWU2MmM4ZWU1YzE4OTVhOTI4NDhlOGRkYjQwNzNiYTljNDlmOGU=
12
12
  data.tar.gz: !binary |-
13
- MmE2MDBkOWQyOGY0MGFlMDliYTAxMDllM2MzYzlhZmIxOGYyNGE5MzM4Y2E3
14
- ZTVjMWQ3M2YzMGJjZTRlMDc0YmRmNWQ1OTExYzU1NzU3NDNjYTQ3YmFjZDQ3
15
- ZjA5MjM3ODAzYzU1Y2EzNjAyNmUyNTc2YjdkMzEzOWZiNjc1ODQ=
13
+ NDA5OGM0MDlkZDYzOTUzODZlOTI4N2NmZWNlN2FjMmIxYjNlZGExNjhjZDY1
14
+ ZjEyYzliYjA3MDZhMmE0M2I1NmM1NDI3MWEwMDA5MDM2MWFhYTM5NjViZmFi
15
+ M2UwYTMyMjk0ZTEwNGMzZGZlMGI3YTY1ZWM3ZWMwODQ5MTIwNmY=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pagoda (0.0.1)
4
+ pagoda-jekyll (0.0.2)
5
5
  grit
6
6
  jekyll
7
7
  json
@@ -112,7 +112,7 @@ DEPENDENCIES
112
112
  compass
113
113
  fssm
114
114
  minitest-reporters
115
- pagoda!
115
+ pagoda-jekyll!
116
116
  rack-test
117
117
  rake (~> 10.0.3)
118
118
  shoulda
data/README.md CHANGED
@@ -1,4 +1,15 @@
1
1
  Pagoda [![Build Status](https://travis-ci.org/alagu/pagoda.png?branch=master)](https://travis-ci.org/alagu/pagoda) [![Code Climate](https://codeclimate.com/github/alagu/pagoda.png)](https://codeclimate.com/github/alagu/pagoda)
2
2
  =========
3
+ Zen like blog editor for your Jekyll blog
4
+
5
+ Install
6
+ =======
7
+
8
+ ```
9
+ gem install pagoda-jekyll
10
+ pagoda .
11
+ ```
12
+
13
+
14
+ <img src="http://openclipart.org/people/Silveira/pagoda.svg" width="200"/>
3
15
 
4
- Beautiful editor for your Jekyll blog
@@ -36,7 +36,8 @@ module Shwedagon
36
36
 
37
37
  # Merge existing yaml with post params
38
38
  def merge_config(yaml, params)
39
- yaml['published'] = !(params[:post].has_key? 'draft')
39
+ yaml['published'] = !(params[:post].has_key? 'draft' and
40
+ params[:post]['draft'] == 'on')
40
41
  yaml['title'] = params[:post][:title]
41
42
 
42
43
  yaml
@@ -138,7 +139,11 @@ module Shwedagon
138
139
 
139
140
  data = repo.commit_index log_message
140
141
 
141
- redirect '/edit/' + filename
142
+ if params[:ajax]
143
+ {:status => 'OK'}.to_json
144
+ else
145
+ redirect '/edit/' + filename
146
+ end
142
147
  end
143
148
 
144
149
  end
@@ -545,3 +545,7 @@ body {
545
545
  display: inline-block;
546
546
  width: 350px;
547
547
  }
548
+
549
+ #publish-bar input[type=submit].post-saving {
550
+ background: #40A4FB;
551
+ }
@@ -0,0 +1,578 @@
1
+
2
+ /* TODO: pull out coloring into variables */
3
+ $linkhover: red;
4
+
5
+ div:before, div:after {content:''; display:table;}
6
+
7
+ aside {position:relative; display:block;}
8
+ ul {list-style-type:none;}
9
+ .hide {visibility:hidden; height:1px; clip:rect(0 0 0 0); position:absolute;}
10
+ input, textarea {outline:none; background:none;}
11
+
12
+ body {
13
+ background: #fff;
14
+ color: #222;
15
+ }
16
+
17
+ body, textarea, pre, input {
18
+ font-family: 'Lato', Helvetica, sans-serif;
19
+ line-height: 1.8em;
20
+ font-size: 16px;
21
+ font-weight: 400;
22
+ }
23
+
24
+ h1,h2,h3,h4,h5,#text-title pre {
25
+ font-weight: 900;
26
+ word-wrap: break-word;
27
+ line-height: 1.3em;
28
+ }
29
+
30
+ h1,
31
+ #text-title pre,
32
+ #text-title textarea {
33
+ font-weight: 900;
34
+ font-size: 35px;
35
+ }
36
+
37
+ p {
38
+ color: #555;
39
+ }
40
+
41
+ a,
42
+ a:visited
43
+ a:active {
44
+ color: #000;
45
+ text-decoration: none;
46
+ border-bottom: 1px solid #ddd;
47
+ }
48
+
49
+ a:hover,
50
+ #admin #published h3 a:hover {
51
+ color: $linkhover;
52
+ }
53
+
54
+ header {
55
+ width: 162px;
56
+ border-right: 1px solid #DDD;
57
+ position: fixed;
58
+ top: 0;
59
+ bottom: 0;
60
+ padding: 20px 40px;
61
+
62
+ span {
63
+ color: #888;
64
+ font-weight: 500;
65
+
66
+ &.powered-by {
67
+ position: absolute;
68
+ bottom: 30px;
69
+ font-size: 11px;
70
+ }
71
+ }
72
+
73
+ ul {
74
+ padding: 0;
75
+ margin: 50px 0;
76
+ }
77
+
78
+ li {
79
+ margin: 0 0 3px 0;
80
+
81
+ a {
82
+ padding: 2px 0;
83
+ color: #888;
84
+ border-bottom: 2px solid #eee;
85
+
86
+ &:hover {
87
+ border-color: #777;
88
+ color: #444;
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ #container {
95
+ margin-left: 243px;
96
+ position: relative;
97
+
98
+ time {
99
+ display: block;
100
+ padding: 20px 0 20px 50px;
101
+ text-transform: uppercase;
102
+ font-weight: 900;
103
+ font-size: 12px;
104
+ border-bottom: 1px solid #ddd;
105
+ }
106
+ }
107
+
108
+ #content {
109
+ section {
110
+ padding: 26px 0 40px 50px;
111
+ border-bottom: 1px solid #ddd;
112
+ position: relative;
113
+ }
114
+
115
+ h1.external {
116
+ margin-top: 25px;
117
+ font-size: 18px;
118
+
119
+ .permalink {
120
+ margin-left: 8px;
121
+ font-size: 19px;
122
+ color: #999;
123
+ border: none;
124
+ }
125
+ }
126
+ }
127
+
128
+ .show #content section {
129
+ border-bottom: none;
130
+ }
131
+
132
+ code {
133
+ font-size: 13px;
134
+ background: #F2F2F2;
135
+ padding: 20px;
136
+ margin: 20px;
137
+ display: block;
138
+ }
139
+
140
+ .contain {
141
+ width: 600px;
142
+ position: relative;
143
+ }
144
+
145
+ .contain img {
146
+ max-width: 100%;
147
+ height: auto;
148
+ }
149
+
150
+ #publish-bar {
151
+ position: fixed;
152
+ bottom: 0;
153
+ left: 0;
154
+ background: #222;
155
+ color: #fff;
156
+ width: 100%;
157
+ text-align: center;
158
+ padding: 15px 0 15px;
159
+
160
+ .contain {
161
+ margin: 0 auto;
162
+ width: 600px;
163
+ }
164
+
165
+ input[type=text] {
166
+ border: none;
167
+ border-bottom: 1px solid #333;
168
+ padding: 2px;
169
+ width: 220px;
170
+ font-size: 12px;
171
+ color: #999;
172
+ }
173
+
174
+ .menu.active {
175
+ background: #fff;
176
+ color: #000;
177
+ }
178
+
179
+ .sub-menu {
180
+ margin: 0;
181
+ background: #222;
182
+ padding: 20px;
183
+ position: absolute;
184
+ bottom: 0;
185
+ left: 60px;
186
+ visibility: hidden;
187
+ border-radius: 5px;
188
+ -moz-border-radius: 5px;
189
+ -webkit-border-radius: 5px;
190
+
191
+ &.visible {
192
+ visibility: visible;
193
+ }
194
+ }
195
+
196
+ .sub-menu li {
197
+ margin: 0 0 15px 0;
198
+ }
199
+ }
200
+
201
+ #publish-bar input[type=submit],
202
+ #publish-bar a,
203
+ .button {
204
+ display: inline-block;
205
+ background: #000;
206
+ padding: 8px 12px;
207
+ font-weight: bold;
208
+ border: none;
209
+ color: #fff;
210
+ border-radius: 5px;
211
+ -moz-border-radius: 5px;
212
+ -webkit-border-radius: 5px;
213
+ }
214
+
215
+ .button.secondary {
216
+ padding: 0 5px;
217
+ background: #aaa;
218
+ font-size: 12px;
219
+ }
220
+
221
+ #publish-bar input[type=submit]:hover,
222
+ #publish-bar a:hover,
223
+ .col h1 a:hover,
224
+ .col h2 a:hover,
225
+ .button:hover,
226
+ .button.secondary:hover {
227
+ background: $linkhover;
228
+ color: #fff;
229
+ }
230
+
231
+ .button.space-top {
232
+ margin-top: 100px;
233
+ }
234
+
235
+ .left {
236
+ float: left;
237
+ }
238
+
239
+ .right {
240
+ float: right;
241
+ }
242
+
243
+ .actions {
244
+ position: absolute;
245
+ top: 0;
246
+ right: -60px;
247
+ font-size: 12px;
248
+ margin: 0;
249
+ padding: 0;
250
+ }
251
+
252
+ .actions li {
253
+ display: inline-block;
254
+ margin: 0 10px 0 0;
255
+ }
256
+
257
+ label {
258
+ font-size: 16px;
259
+ color: #fff;
260
+ font-weight: bold;
261
+ margin: 0 8px 0 0;
262
+ }
263
+
264
+ #post_draft {
265
+ position: relative;
266
+ margin: 0 20px 0 0;
267
+ }
268
+
269
+ .admin-links {
270
+ position: absolute;
271
+ text-align: right;
272
+ top: 18px;
273
+ right: 20px;
274
+ margin: 0;
275
+
276
+ li {float: left; margin-left: 6px;}
277
+ a {float: left;}
278
+ }
279
+
280
+ .notice {
281
+ position: absolute;
282
+ top: 0;
283
+ background: lightYellow;
284
+ width: 100%;
285
+ display: block;
286
+ text-align: center;
287
+ padding: 3px 0;
288
+ font-size: 12px;
289
+ }
290
+
291
+ body.posts.edit #admin,
292
+ body.posts.new #admin {
293
+ width: 100%;
294
+ }
295
+
296
+ #admin {
297
+ width: 808px;
298
+ margin: 0 auto;
299
+ position: relative;
300
+
301
+ #save-button.saved {
302
+ color: #999;
303
+
304
+ &:hover {
305
+ cursor: normal;
306
+ }
307
+ }
308
+
309
+ #drafts {
310
+ float: left;
311
+ border: 4px solid #000;
312
+ border-top: none;
313
+ background: #fff;
314
+ margin: 0 0 20px 0;
315
+ padding-top: 10px;
316
+
317
+ form {
318
+ margin: 20px 0 20px -20px;
319
+ padding: 0 0 0 20px;
320
+ border-left: 4px solid lightblue;
321
+ }
322
+
323
+ #post_title {
324
+ width: 350px;
325
+ font-size: 16px;
326
+ font-weight: 400;
327
+ margin: 0;
328
+ border-bottom: 1px solid #ddd;
329
+ }
330
+ }
331
+
332
+ #published {
333
+ float: right;
334
+
335
+ h2 {color: #999;}
336
+ h2 a {margin-top: -2px;}
337
+ h3 a {color: #999;}
338
+ }
339
+
340
+ .col h1,
341
+ .col h2 {
342
+ position: relative;
343
+ text-transform: uppercase;
344
+ }
345
+
346
+ .col h1 a,
347
+ .col h2 a {
348
+ position: absolute;
349
+ top: 0;
350
+ right: 0;
351
+ font-size: 12px;
352
+ padding: 2px 10px;
353
+ line-height: 2.7em;
354
+ margin: 5px 0 0;
355
+ }
356
+
357
+ .col {
358
+ width: 360px;
359
+ padding: 20px;
360
+
361
+ h2 a {
362
+ background: #999;
363
+
364
+ &:hover {
365
+ background: $linkhover;
366
+ }
367
+ }
368
+
369
+ ul {
370
+ padding: 0;
371
+
372
+ li {
373
+ border-bottom: 1px solid #ddd;
374
+ padding: 15px 0;
375
+ position: relative;
376
+
377
+ &:hover .links {
378
+ visibility: visible;
379
+ }
380
+
381
+ .links {
382
+ position: absolute;
383
+ right: 0;
384
+ top: 14px;
385
+ background: #fff;
386
+ padding: 1px 8px;
387
+ visibility: hidden;
388
+
389
+ a {
390
+ color: #999;
391
+ border-radius: 5px;
392
+ -moz-border-radius: 5px;
393
+ -webkit-border-radius: 5px;
394
+
395
+ &:hover {
396
+ color: $linkhover;
397
+ }
398
+ }
399
+ }
400
+
401
+ h3 {
402
+ margin: 0;
403
+ font-size: 16px;
404
+ max-width: 100%;
405
+ text-overflow: ellipsis;
406
+ overflow: hidden;
407
+
408
+ a {
409
+ border: none;
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
415
+
416
+ textarea,pre {
417
+ margin: 0;
418
+ padding: 0;
419
+ outline: 0;
420
+ border: 0;
421
+ }
422
+
423
+ .expandingArea > textarea,
424
+ .expandingArea > pre {
425
+ background: transparent;
426
+ white-space: pre-wrap;
427
+ word-wrap: break-word;
428
+ }
429
+
430
+ .expandingArea > textarea {
431
+ /* The border-box box model is used to allow
432
+ * padding whilst still keeping the overall width
433
+ * at exactly that of the containing element.
434
+ */
435
+ -webkit-box-sizing: border-box;
436
+ -moz-box-sizing: border-box;
437
+ -ms-box-sizing: border-box;
438
+ box-sizing: border-box;
439
+ width: 100%;
440
+ }
441
+
442
+ .expandingArea.active > textarea {
443
+ resize: none;
444
+ }
445
+
446
+ .expandingArea > pre {
447
+ display: none;
448
+ }
449
+
450
+ .expandingArea.active > pre {
451
+ display: block;
452
+ /* Hide the text; just using it for sizing */
453
+ visibility: hidden;
454
+ }
455
+ }
456
+
457
+ fieldset.markdown {
458
+ position: relative;
459
+ border: none;
460
+ margin: 0;
461
+ padding: 0;
462
+ }
463
+
464
+ #split {
465
+ width: 716px;
466
+ margin: 0 auto;
467
+
468
+ #post-editor {
469
+ width: 700px;
470
+ float: left;
471
+ }
472
+
473
+ #fullscreen {
474
+ float: left;
475
+ position: relative;
476
+ top: 35px;
477
+ border: 0 none;
478
+ }
479
+
480
+ }
481
+
482
+ .fullScreen {
483
+ #fullscreen {
484
+ visibility: hidden;
485
+ }
486
+ }
487
+
488
+
489
+ .markdown:before {
490
+ display: block;
491
+ content: "";
492
+ width: 39px;
493
+ height: 24px;
494
+ position: absolute;
495
+ top: 4px;
496
+ left: -60px;
497
+ background: url(/assets/markdown.png) no-repeat top left;
498
+ }
499
+
500
+ #text-title {
501
+ margin: 23px 0 0 0;
502
+ }
503
+
504
+ #post_title {
505
+ width: 100%;
506
+ border: none;
507
+ background: none;
508
+ line-height: 45px;
509
+ }
510
+
511
+ #post_content {
512
+ border: none;
513
+ width: 100%;
514
+ position: relative;
515
+ margin: 0;
516
+ resize: none;
517
+ }
518
+
519
+ #post_title {
520
+ resize: none;
521
+ }
522
+
523
+ form .permalink {
524
+ position: absolute;
525
+ left: -34px;
526
+ top: 12px;
527
+ border: none;
528
+ color: #ddd;
529
+ }
530
+
531
+ .admin-view {
532
+ font-size: 11px;
533
+ margin: 0 10px 2px 0;
534
+ font-weight: 900;
535
+ text-transform: uppercase;
536
+ }
537
+
538
+ nav.pagination {
539
+ text-align: right;
540
+ font-size: 16px;
541
+ font-weight: 900;
542
+ text-transform: uppercase;
543
+ margin: 0;
544
+ padding: 0;
545
+ }
546
+
547
+ nav.pagination a {
548
+ margin-left: 10px;
549
+ }
550
+
551
+ body {
552
+ margin: 0;
553
+ }
554
+
555
+ .settings {
556
+ .settings-bd {
557
+ border: 4px solid #000;
558
+ border-top: none;
559
+ background: #fff;
560
+ margin: 0 auto;
561
+ padding: 10px 20px;
562
+ width: 760px;
563
+ }
564
+
565
+ .admin-btn {
566
+ float: right;
567
+ margin-top: 30px;
568
+ }
569
+
570
+ .left-col {
571
+ display: inline-block;
572
+ width: 350px;
573
+ }
574
+ }
575
+
576
+ #publish-bar input[type=submit].post-saving {
577
+ background: #40A4FB;
578
+ }