blog-gem 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/blog/gem/blog_controller.rb +2 -1
- data/app/views/blog/gem/blog/index.slim +1 -1
- data/lib/blog/gem.rb +4 -1
- data/lib/blog/gem/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10fd88dda8a6a69c6cdb2af0389107eb0f4991f9
|
4
|
+
data.tar.gz: 139ab0349259d7cde9187f34c73bd4606f0e7655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3c724e9bf192a3fd6fc8de6c0dcefcf0c6acdb71bcc6ef90d35091127b00621582c9bcaedd02bf081cef2a56dfb12b7200fdcfa0a34ade90f587d5bae0066cc
|
7
|
+
data.tar.gz: bd23856d556caa64b968eec1054cdebe86f16422a9e92f239875623cfd8087b3df3459a7c61a55b786616652ab12ef7b4d694f0cc8e478bd356d7f10c48e6a57
|
@@ -39,7 +39,8 @@ class Blog::Gem::BlogController < Blog::Gem::ApplicationController
|
|
39
39
|
render json: @posts.map{|x| {title: x.title, teaser: x.teaser, url: x.url, tags: x.tags, category: x.category, author: x.author_name, thumbnail: x.thumbnail.url(:medium)}}
|
40
40
|
end
|
41
41
|
format.html do
|
42
|
-
@
|
42
|
+
@current_path = blogs_path
|
43
|
+
@posts = posts.published.paginate(page: params[:page], per_page: Blog::Gem.per_page)
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
@@ -40,7 +40,7 @@
|
|
40
40
|
p = raw post.teaser
|
41
41
|
= link_to "#{t("blog.read_more")} #{icon("angle-right")}".html_safe, post.to_path, class: "btn btn-link"
|
42
42
|
.gap
|
43
|
-
= will_paginate @posts
|
43
|
+
= will_paginate @posts, renderer: BootstrapPagination::Rails
|
44
44
|
- else
|
45
45
|
h2 = t("blog.not_found.heading")
|
46
46
|
h5 = t("blog.not_found.lead")
|
data/lib/blog/gem.rb
CHANGED
@@ -6,6 +6,7 @@ require "stringex"
|
|
6
6
|
require "gravtastic"
|
7
7
|
require "bcrypt"
|
8
8
|
require "will_paginate"
|
9
|
+
require "will_paginate-bootstrap"
|
9
10
|
require "simple_form"
|
10
11
|
require "nokogiri"
|
11
12
|
require "blog/gem/engine"
|
@@ -22,15 +23,17 @@ module Blog
|
|
22
23
|
mattr_accessor :url
|
23
24
|
mattr_accessor :image_path
|
24
25
|
mattr_accessor :title_enable
|
26
|
+
mattr_accessor :per_page
|
25
27
|
|
26
28
|
self.archive_count = 13
|
27
|
-
self.home_posts_count =
|
29
|
+
self.home_posts_count = 8
|
28
30
|
self.tags_count = 24
|
29
31
|
self.widget_posts_count = 6
|
30
32
|
self.categories = {}
|
31
33
|
self.path = "/blog"
|
32
34
|
self.image_path = "/uploads"
|
33
35
|
self.title_enable = true
|
36
|
+
self.per_page = 5
|
34
37
|
end
|
35
38
|
|
36
39
|
def self.setup(&block)
|
data/lib/blog/gem/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blog-gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Thelang
|
@@ -137,6 +137,20 @@ dependencies:
|
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: will_paginate-bootstrap
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
type: :runtime
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
140
154
|
- !ruby/object:Gem::Dependency
|
141
155
|
name: simple_form
|
142
156
|
requirement: !ruby/object:Gem::Requirement
|