effective_posts 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c022efd2bcc520c8c917470ed78cfc6d59383a6d
4
- data.tar.gz: 7b0e965d6149141d91764bff9405ba0bf5407d17
3
+ metadata.gz: e7e2b60e89549a66946feb9f84f811a90fa6ae02
4
+ data.tar.gz: d7340cf007baa0db85a8d0b5073a9e202edf9e6a
5
5
  SHA512:
6
- metadata.gz: 0fdd4fe4cbb4e0a5bd4ca0d965464bea38a54075470cd326529d9b3d297626dc1235a14292aa90093b99863d91a5596adc58b27e667c309f883303967fece7ca
7
- data.tar.gz: fcc25d31d20948003c2759801034cf981a522a3e5cc8541751e11f46bad4552ecbd9abab7fb769f2317b4464c2b705e36a64bcc0f8c07bf5631574f889fab35b
6
+ metadata.gz: d8c233609e2ab6151f8ccc911855b60b0175eaec11289031853fbc567d04f1e1a2731b97e6a66a56e1b70007c56240a697f33ac863d88c1d76114b78ee730eba
7
+ data.tar.gz: 49570f10e2e4e43d528ea96329946cf73cbc9cde86315b32d78f75b784db6ad2c1096df0108a1c2b5211e3665c146f21de9e914e90383e01a51ca416e9839496
@@ -0,0 +1,5 @@
1
+ .jumbotron.jumbotron-fluid.jumbotron-intro
2
+ .container
3
+ .row
4
+ .col-sm-4= render 'sidebar'
5
+ .col-sm-8= yield
@@ -1,7 +1,7 @@
1
1
  .effective-post
2
2
  %h2.post-title= link_to post, effective_post_path(post)
3
3
 
4
- %p.post-meta= post_meta(post)
4
+ %p.post-meta= post_meta(post, author: false)
5
5
 
6
6
  - if post.category == 'events'
7
7
  %table.table.post-events
@@ -14,7 +14,7 @@
14
14
  - if post.end_at.present?
15
15
  %tr
16
16
  %th Ends
17
- %td= post.start_at
17
+ %td= post.end_at
18
18
 
19
19
  - if post.location.present?
20
20
  %tr
@@ -26,4 +26,7 @@
26
26
  %th Website
27
27
  %td= link_to post.website_name, post.website_href
28
28
 
29
- .post-content.post-excerpt= post_excerpt(post)
29
+ - if block_given?
30
+ = yield
31
+ - else
32
+ .post-content.post-excerpt= post_excerpt(post)
@@ -0,0 +1,28 @@
1
+ - posts = recent_posts(category: nil, limit: 5)
2
+ %h4.sidebar-title Recent Posts
3
+ %ul.nav.flex-column
4
+ - posts.each do |post|
5
+ = nav_link_to post, effective_post_path(post)
6
+
7
+ - if posts.length == 0
8
+ = nav_link_to 'None', effective_posts.posts_path, class: 'disabled'
9
+
10
+ - if EffectivePosts.categories.present?
11
+ - categories = EffectivePosts.categories
12
+ %h4.sidebar-title Categories
13
+ %ul.nav.flex-column
14
+ = nav_link_to 'All Posts', effective_posts.posts_path
15
+
16
+ - categories.each do |category|
17
+ = nav_link_to category.to_s.titleize, effective_post_category_path(category)
18
+
19
+ - if params[:category]
20
+ - category_posts = recent_posts(category: params[:category], limit: 5)
21
+ %h4.sidebar-title Recent #{params[:category].titleize}
22
+ %ul.nav.flex-column
23
+ - category_posts.each do |post|
24
+ = nav_link_to post, effective_post_path(post)
25
+
26
+ - if category_posts.length == 0
27
+ = nav_link_to 'None', effective_posts.posts_path, class: 'disabled'
28
+
@@ -1 +1 @@
1
- - # intentionally left blank
1
+ %hr
@@ -1,9 +1,7 @@
1
- - if EffectivePosts.submissions_enabled
2
- %p.text-right= link_to 'Submit New Post', effective_posts.new_post_path, class: 'btn btn-primary'
1
+ = render 'layout' do
2
+ %nav= paginate @posts
3
3
 
4
- %nav= paginate @posts
4
+ .effective-posts
5
+ = render partial: @posts, spacer_template: 'spacer'
5
6
 
6
- .effective-posts
7
- = render partial: @posts, spacer_template: 'spacer'
8
-
9
- %nav= paginate @posts
7
+ %nav= paginate @posts
@@ -1,32 +1,8 @@
1
- .effective-post
2
- %h2.post-title= link_to @post, effective_post_path(@post)
3
-
4
- %p.post-meta= post_meta(@post)
5
-
6
- - if @post.category == 'events'
7
- %table.table.post-events
8
- %tbody
9
- - if @post.start_at.present?
10
- %tr
11
- %th Starts
12
- %td= @post.start_at.stftime('%F %H:%M')
13
-
14
- - if @post.end_at.present?
15
- %tr
16
- %th Ends
17
- %td= @post.end_at.stftime('%F %H:%M')
18
-
19
- - if @post.location.present?
20
- %tr
21
- %th Location
22
- %td= @post.location
23
-
24
- - if @post.website_href.present? && @post.website_name.present?
25
- %tr
26
- %th Website
27
- %td= link_to @post.website_name, @post.website_href
28
-
29
- .post-body.post-content
30
- = effective_region @post, :body do
31
- %p Default content
32
-
1
+ = render 'layout' do
2
+ = render('effective/posts/post', post: @post) do
3
+ .post-body.post-content
4
+ = effective_region @post, :body do
5
+ %p Default content
6
+
7
+ .border-top.mb-3
8
+ = link_to 'Continue', effective_posts.posts_path, class: 'btn btn-primary'
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2019-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: effective_bootstrap
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: effective_ckeditor
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -141,8 +155,10 @@ files:
141
155
  - app/views/effective/posts/_additional_fields.html.haml
142
156
  - app/views/effective/posts/_categories.html.haml
143
157
  - app/views/effective/posts/_form.html.haml
158
+ - app/views/effective/posts/_layout.html.haml
144
159
  - app/views/effective/posts/_post.html.haml
145
160
  - app/views/effective/posts/_recent_posts.html.haml
161
+ - app/views/effective/posts/_sidebar.html.haml
146
162
  - app/views/effective/posts/_spacer.html.haml
147
163
  - app/views/effective/posts/_upcoming_events.html.haml
148
164
  - app/views/effective/posts/edit.html.haml
@@ -188,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
204
  version: '0'
189
205
  requirements: []
190
206
  rubyforge_project:
191
- rubygems_version: 2.5.2.3
207
+ rubygems_version: 2.4.5.1
192
208
  signing_key:
193
209
  specification_version: 4
194
210
  summary: A blog implementation with WYSIWYG content editing, post scheduling, pagination