pagoda-jekyll 0.0.3 → 0.0.4

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
- MGQyODk2NTdlYWQwNGZjZTllN2Y0ZWJmNTk0ZGVkN2NlMGVjN2ZlZA==
4
+ YmIzMzYyOTEwNTA0Yzc0YTkwZmVkZTdlZjFiMzEyMThjYmZmOWZlZg==
5
5
  data.tar.gz: !binary |-
6
- NzEyMWE4NjQ2NDYwOWEyZDFkYzc5Y2ZhZDczNTZiMDMxMDU0OWZjMA==
6
+ MGU3NTBlYTQxNTJhYzdjNDQ2ZTZiNGYzYWMzMDIxNGU5YzA3ZDFkNw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzA1NTBmN2RkZTU2MDlhYjlkYjRlNWNiN2Q0NGNmNDI2NDc4YjRlODJjMGVk
10
- ZDhjNDI4M2Y4ZDFmOTYzYTRmY2JkNzA0MDkwMjE5OWRjMDBlMjYzYjkzMzE3
11
- ZWU2MmM4ZWU1YzE4OTVhOTI4NDhlOGRkYjQwNzNiYTljNDlmOGU=
9
+ YWE2MzM5NTA5Yzk0NzY2MDFjZDIwNWJkNmVmYzJmN2VkMzAwODlkZTRjMjQ0
10
+ Zjg0Y2ExMmRhZjE4NmMyOGYwODIzMWNjMzlkMDg1YTdjODM1ZmY5YmUxY2Fl
11
+ YTE4NDU0M2YyMmNlNzY2NGI5NjRjMjA3Njc2ODllZjg0YzQ2ZWU=
12
12
  data.tar.gz: !binary |-
13
- NDA5OGM0MDlkZDYzOTUzODZlOTI4N2NmZWNlN2FjMmIxYjNlZGExNjhjZDY1
14
- ZjEyYzliYjA3MDZhMmE0M2I1NmM1NDI3MWEwMDA5MDM2MWFhYTM5NjViZmFi
15
- M2UwYTMyMjk0ZTEwNGMzZGZlMGI3YTY1ZWM3ZWMwODQ5MTIwNmY=
13
+ Yjc3OGM0M2FlMDUzNDBjZDdiZmI0M2RmNDRiZjE1OTMwMzRlYmZhZWQ5OGJm
14
+ OWRjOGM0YTY4M2Y0MjA3NTdlZWMwYWM3ODUzNDlhNjY0NmNiYjQ4ZGQ2OTEz
15
+ YWVjYzhlZDdlOWU0YTdkNzg5MDhjYmU0YzYzNjMyYjcxMDFiODY=
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
- gem 'rake', '~> 10.0.3'
4
+ gem 'rake', '~> 10.0.3'
5
+
6
+ # Test related
7
+ gem 'simplecov', :require => false, :group => :test
8
+ gem 'coveralls', require: false
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pagoda-jekyll (0.0.2)
4
+ pagoda-jekyll (0.0.3)
5
5
  grit
6
6
  jekyll
7
7
  json
@@ -23,10 +23,17 @@ GEM
23
23
  chunky_png (1.2.7)
24
24
  classifier (1.3.3)
25
25
  fast-stemmer (>= 1.0.0)
26
+ colorize (0.5.8)
26
27
  compass (0.12.2)
27
28
  chunky_png (~> 1.2)
28
29
  fssm (>= 0.2.7)
29
30
  sass (~> 3.1)
31
+ coveralls (0.6.6)
32
+ colorize
33
+ multi_json (~> 1.3)
34
+ rest-client
35
+ simplecov (>= 0.7)
36
+ thor
30
37
  diff-lcs (1.2.2)
31
38
  directory_watcher (1.5.1)
32
39
  eventmachine (1.0.3)
@@ -75,6 +82,8 @@ GEM
75
82
  rack-test (0.6.2)
76
83
  rack (>= 1.0)
77
84
  rake (10.0.3)
85
+ rest-client (1.6.7)
86
+ mime-types (>= 1.16)
78
87
  sass (3.2.7)
79
88
  shoulda (3.4.0)
80
89
  shoulda-context (~> 1.0, >= 1.0.1)
@@ -83,6 +92,10 @@ GEM
83
92
  shoulda-matchers (1.5.6)
84
93
  activesupport (>= 3.0.0)
85
94
  bourne (~> 1.3)
95
+ simplecov (0.7.1)
96
+ multi_json (~> 1.0)
97
+ simplecov-html (~> 0.7.1)
98
+ simplecov-html (0.7.1)
86
99
  sinatra (1.3.6)
87
100
  rack (~> 1.4)
88
101
  rack-protection (~> 1.3)
@@ -102,6 +115,7 @@ GEM
102
115
  sinatra-contrib
103
116
  stringex (1.5.1)
104
117
  syntax (1.0.0)
118
+ thor (0.18.1)
105
119
  tilt (1.3.6)
106
120
  yajl-ruby (1.1.0)
107
121
 
@@ -110,10 +124,12 @@ PLATFORMS
110
124
 
111
125
  DEPENDENCIES
112
126
  compass
127
+ coveralls
113
128
  fssm
114
129
  minitest-reporters
115
130
  pagoda-jekyll!
116
131
  rack-test
117
132
  rake (~> 10.0.3)
118
133
  shoulda
134
+ simplecov
119
135
  sinatra-reloader
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2007-2009 Tom Preston-Werner
3
+ Copyright (c) 2007-2009 Allagappan Muthuraman
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
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)
1
+ Pagoda [![Coverage Status](https://coveralls.io/repos/alagu/pagoda/badge.png?branch=master)](https://coveralls.io/r/alagu/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
3
  Zen like blog editor for your Jekyll blog
4
4
 
@@ -6,6 +6,7 @@ Install
6
6
  =======
7
7
 
8
8
  ```
9
+ cd your-jekyll-blog-repo/
9
10
  gem install pagoda-jekyll
10
11
  pagoda .
11
12
  ```
data/config.ru CHANGED
@@ -7,5 +7,5 @@ require 'pagoda/app'
7
7
 
8
8
  use Rack::ShowExceptions
9
9
 
10
- Shwedagon::App.set :blog, '../blog'
10
+ Shwedagon::App.set :blog, '../blog/'
11
11
  run Shwedagon::App.new
@@ -143,7 +143,7 @@ code {
143
143
  }
144
144
 
145
145
  .contain {
146
- width: 600px;
146
+ width: 960px;
147
147
  position: relative;
148
148
  }
149
149
 
@@ -160,11 +160,11 @@ code {
160
160
  color: #fff;
161
161
  width: 100%;
162
162
  text-align: center;
163
- padding: 15px 0 15px;
163
+ padding: 10px 0 3px;
164
164
  }
165
165
  #publish-bar .contain {
166
166
  margin: 0 auto;
167
- width: 600px;
167
+ width: 960px;
168
168
  }
169
169
  #publish-bar input[type=text] {
170
170
  border: none;
@@ -445,15 +445,15 @@ fieldset.markdown {
445
445
  }
446
446
 
447
447
  #split {
448
- width: 716px;
448
+ width: 960px;
449
449
  margin: 0 auto;
450
450
  }
451
451
  #split #post-editor {
452
- width: 700px;
452
+ width: 960px;
453
453
  float: left;
454
454
  }
455
455
  #split #fullscreen {
456
- float: left;
456
+ float: right;
457
457
  position: relative;
458
458
  top: 35px;
459
459
  border: 0 none;
@@ -491,10 +491,14 @@ fieldset.markdown {
491
491
  position: relative;
492
492
  margin: 0;
493
493
  resize: none;
494
+ font-size: 20px;
494
495
  }
495
496
 
496
- #post_title {
497
+ textarea#post_title {
497
498
  resize: none;
499
+ font-family: 'Asap', sans-serif;
500
+ font-size: 40px;
501
+ font-weight: normal;
498
502
  }
499
503
 
500
504
  form .permalink {
@@ -138,7 +138,7 @@ code {
138
138
  }
139
139
 
140
140
  .contain {
141
- width: 600px;
141
+ width: 960px;
142
142
  position: relative;
143
143
  }
144
144
 
@@ -155,11 +155,11 @@ code {
155
155
  color: #fff;
156
156
  width: 100%;
157
157
  text-align: center;
158
- padding: 15px 0 15px;
158
+ padding: 10px 0 3px;
159
159
 
160
160
  .contain {
161
161
  margin: 0 auto;
162
- width: 600px;
162
+ width: 960px;
163
163
  }
164
164
 
165
165
  input[type=text] {
@@ -462,16 +462,16 @@ fieldset.markdown {
462
462
  }
463
463
 
464
464
  #split {
465
- width: 716px;
465
+ width: 960px;
466
466
  margin: 0 auto;
467
467
 
468
468
  #post-editor {
469
- width: 700px;
469
+ width: 960px;
470
470
  float: left;
471
471
  }
472
472
 
473
473
  #fullscreen {
474
- float: left;
474
+ float: right;
475
475
  position: relative;
476
476
  top: 35px;
477
477
  border: 0 none;
@@ -514,10 +514,14 @@ fieldset.markdown {
514
514
  position: relative;
515
515
  margin: 0;
516
516
  resize: none;
517
+ font-size: 20px;
517
518
  }
518
519
 
519
- #post_title {
520
+ textarea#post_title {
520
521
  resize: none;
522
+ font-family: 'Asap', sans-serif;
523
+ font-size: 40px;
524
+ font-weight: normal;
521
525
  }
522
526
 
523
527
  form .permalink {
@@ -6,7 +6,7 @@ $(document).ready ->
6
6
  true
7
7
 
8
8
  is_edit_page = ->
9
- window.location.pathname.indexOf('edit')
9
+ window.location.pathname.indexOf('edit') != -1
10
10
 
11
11
  set_save_button = (status)->
12
12
  if(status == 'saving')
@@ -55,17 +55,17 @@ $(document).ready ->
55
55
 
56
56
  screenfull.onchange = ->
57
57
  if screenfull.isFullscreen
58
- $('#fullscreen').hide();
58
+ $('#fullscreen').hide()
59
+ $('#post_content').focus()
59
60
 
60
61
  setTimeout( ->
61
- console.log $(window).height()
62
- rows = Math.ceil($(window).height()/40)
63
- $('#post_content').attr('rows', rows);
62
+ rows = Math.ceil($(window).height()/48)
63
+ $('#post_content').attr('rows', rows)
64
64
  , 1000)
65
65
 
66
66
  else
67
67
  $('#fullscreen').show();
68
- $('#post_content').attr('rows', 18);
68
+ $('#post_content').attr('rows', 15);
69
69
 
70
70
  $('.delete-button').click ->
71
71
  if not confirm("Confirm delete?")
@@ -105,10 +105,18 @@ $(document).ready ->
105
105
  $("#fullscreen").tipTip({delay: 200, defaultPosition: 'right'})
106
106
 
107
107
 
108
+ focus_to_type =->
109
+ if not is_edit_page() and ($('#post_title').val() == '')
110
+ $('#post_title').focus()
111
+ else
112
+ $('#post_content').focus()
113
+
114
+
108
115
  init =->
109
116
  handle_events()
110
117
  keyboard_events()
111
118
  show_shortcuts()
119
+ focus_to_type()
112
120
 
113
121
 
114
122
  init()
@@ -2,12 +2,12 @@
2
2
  (function() {
3
3
 
4
4
  $(document).ready(function() {
5
- var handle_events, init, is_edit_page, keyboard_events, save_post, set_save_button, show_shortcuts;
5
+ var focus_to_type, handle_events, init, is_edit_page, keyboard_events, save_post, set_save_button, show_shortcuts;
6
6
  key.filter = function(e) {
7
7
  return true;
8
8
  };
9
9
  is_edit_page = function() {
10
- return window.location.pathname.indexOf('edit');
10
+ return window.location.pathname.indexOf('edit') !== -1;
11
11
  };
12
12
  set_save_button = function(status) {
13
13
  if (status === 'saving') {
@@ -64,15 +64,15 @@
64
64
  screenfull.onchange = function() {
65
65
  if (screenfull.isFullscreen) {
66
66
  $('#fullscreen').hide();
67
+ $('#post_content').focus();
67
68
  return setTimeout(function() {
68
69
  var rows;
69
- console.log($(window).height());
70
- rows = Math.ceil($(window).height() / 40);
70
+ rows = Math.ceil($(window).height() / 48);
71
71
  return $('#post_content').attr('rows', rows);
72
72
  }, 1000);
73
73
  } else {
74
74
  $('#fullscreen').show();
75
- return $('#post_content').attr('rows', 18);
75
+ return $('#post_content').attr('rows', 15);
76
76
  }
77
77
  };
78
78
  $('.delete-button').click(function() {
@@ -116,10 +116,18 @@
116
116
  defaultPosition: 'right'
117
117
  });
118
118
  };
119
+ focus_to_type = function() {
120
+ if (!is_edit_page() && ($('#post_title').val() === '')) {
121
+ return $('#post_title').focus();
122
+ } else {
123
+ return $('#post_content').focus();
124
+ }
125
+ };
119
126
  init = function() {
120
127
  handle_events();
121
128
  keyboard_events();
122
- return show_shortcuts();
129
+ show_shortcuts();
130
+ return focus_to_type();
123
131
  };
124
132
  return init();
125
133
  });
@@ -1,14 +1,13 @@
1
1
  <div id="split">
2
2
  <div id="post-editor" class="split-section">
3
+ <a href="#fullscreen" id="fullscreen"><img src="/images/fullscreen.png"></a>
3
4
  <div id="text-title">
4
5
  <textarea cols="40" id="post_title" name="post[title]" placeholder="Title here" rows="1">{{#ptitle}}{{ ptitle }}{{/ptitle}}{{^ptitle}}{{ title }}{{/ptitle}}</textarea>
5
6
  <input type="hidden" id="post_name" name="post[name]" value="{{ name }}">
6
7
  </div>
7
8
 
8
9
  <div id="text-content">
9
- <textarea cols="40" id="post_content" name="post[content]" placeholder="Write post here" rows="18">{{content}}</textarea>
10
+ <textarea cols="40" id="post_content" name="post[content]" placeholder="Write post here" rows="15">{{content}}</textarea>
10
11
  </div>
11
12
  </div>
12
-
13
- <a href="#fullscreen" id="fullscreen"><img src="/images/fullscreen.png"></a>
14
13
  </div>
@@ -4,7 +4,7 @@
4
4
  <meta http-equiv="Content-type" content="text/html;charset=utf-8">
5
5
  <link rel="stylesheet" type="text/css" href="{{base_url}}/css/pagoda.css" media="all">
6
6
  <link rel="stylesheet" type="text/css" href="{{base_url}}/css/tiptip.css" media="all">
7
- <link href='http://fonts.googleapis.com/css?family=Lato:300,900' rel='stylesheet' type='text/css' />
7
+ <link href='http://fonts.googleapis.com/css?family=Lato:300,900|Asap' rel='stylesheet' type='text/css' />
8
8
  {{#css}}
9
9
  <link rel="stylesheet" type="text/css" href="{{base_url}}/custom.css" media="all">
10
10
  {{/css}}
@@ -8,10 +8,6 @@ module Shwedagon
8
8
 
9
9
  attr_reader :name, :path
10
10
 
11
- def escaped_name
12
- CGI.escape(@name)
13
- end
14
-
15
11
  def title
16
12
  "Home"
17
13
  end
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
5
5
  s.required_ruby_version = ">= 1.8.7"
6
6
 
7
7
  s.name = 'pagoda-jekyll'
8
- s.version = '0.0.3'
8
+ s.version = '0.0.4'
9
9
  s.date = '2013-03-26'
10
10
  s.rubyforge_project = 'pagoda-jekyll'
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagoda-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alagu