blogelator 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ceea789851cd653474986dcd23dd7a82747e92e
4
- data.tar.gz: 79768dbdfa3cd89677b76aebdaa992717a938823
3
+ metadata.gz: d14ce517e1d29110676f14ec8b3a9fba4ebb7fb9
4
+ data.tar.gz: c8e3828ba05e7bf8f27a590c776e520d172cdfbb
5
5
  SHA512:
6
- metadata.gz: 090c7a58f5eeb6ca6926e403b3253da4491a16251be6a4b6ec50d2e4e634179d596358cab71b67e7804c111ebb51c04aab2143bf11a148f0744684bbe14daa4d
7
- data.tar.gz: 29d89a470b26df41e57f018be41e55cb2d79d344416cbdc82842a28e49f4f2a94364da56851734861bd705410b71e22850e69bde73cb2c75260eab71b7894e21
6
+ metadata.gz: 8f83782553256422ff42d93579ead7b6b238d705ac950879b94fc6abe67963d2b392a4b374e79fc6b1309164e059c245a909c52dbe8e7a9bb37e7396b5b14496
7
+ data.tar.gz: eb023adff7c6932cc531e857ad2fe6c76ad13a44704f87573b43eb722617c32366998ff45c6bee346ffea6c76c15cd339dfa11c493be1e708684584bcae54684
@@ -67,8 +67,8 @@ module Blogelator
67
67
 
68
68
  # Convert the Markdown for the post body and summary to HTML.
69
69
  def parse_markdown
70
- self.body_html = markdown.render(body_markdown)
71
- self.summary_html = markdown.render(summary_markdown)
70
+ self.body_html = markdown.render(body_markdown.to_s)
71
+ self.summary_html = markdown.render(summary_markdown.to_s)
72
72
  end
73
73
 
74
74
  # Touch the associated tags to update cache keys.
@@ -1,24 +1,19 @@
1
1
  <div class="author">
2
2
  <% if author.profile_photo.exists? %>
3
- <div class="profile-photo">
4
- <%= image_tag author.profile_photo.url(:small) %>
3
+ <div class="author-image">
4
+ <%= image_tag author.profile_photo(:medium) %>
5
5
  </div>
6
6
  <% end %>
7
+ <div class="author-bio">
8
+ <h4><a href="<%= author.website %>" target="_blank"><%= author.name %></a></h4>
9
+ <p><%= author.bio_markdown %></p>
7
10
 
8
- <div class="name">
9
- <%= author.name %>
10
- </div>
11
-
12
- <div class="bio">
13
- <%== author.bio_html %>
14
- </div>
15
-
16
- <div>
17
- <small class="location">
18
- <%= author.location %>
19
- </small>
20
- <small class="website">
21
- <%= link_to author.website, author.website %>
22
- </small>
11
+ <div class="author-meta">
12
+ <i class="icon icon-location-on"></i> <%= author.location %>
13
+ <a href="<%= author.website %>">
14
+ <i class="icon icon-link"></i>
15
+ <%= author.website %>
16
+ </a>
17
+ </div>
23
18
  </div>
24
19
  </div>
@@ -1,40 +1,40 @@
1
- <link rel="canonical" href="<%= blogelator_post_url(@post) %>" />
2
- <% unless @post.meta_description.blank? %>
3
- <meta name="description" content="<%= @post.meta_description %>">
4
- <% end %>
5
- <% unless @post.meta_keywords.blank? %>
6
- <meta name="keywords" content="<%= @post.meta_keywords %>">
7
- <% end %>
1
+ <link rel="canonical" href="<%= @post.url(request) %>" />
2
+ <meta property="article:published_time" content="<%= @post.published_at %>" />
8
3
 
9
- <meta property="article:published_time" content="<%= @post.created_at %>" />
10
- <meta property="og:site_name" content="In the Booth" />
4
+ <meta name="description" content="<%= @post.meta_description %>">
5
+ <meta name="keywords" content="<%= @post.meta_keywords %>">
6
+
7
+ <meta property="og:site_name" content="<%= t('titles.application') %>" />
11
8
  <meta property="og:type" content="article" />
12
9
  <meta property="og:title" content="<%= @post.title %>" />
13
- <meta property="og:description" content="<%=strip_tags(@post.summary_html) %>" />
14
- <meta property="og:url" content="<%= blogelator_post_url(@post) %>" />
10
+ <meta property="og:url" content="<%= @post.url(request) %>" />
15
11
  <meta property="og:image" content="<%= @post.image.url %>" />
12
+ <meta property="og:description" content="<%= @post.meta_description %>" />
13
+
16
14
  <meta name="twitter:card" content="summary_large_image" />
17
15
  <meta name="twitter:title" content="<%= @post.title %>" />
18
- <meta name="twitter:description" content="<%=strip_tags(@post.summary_html) %>" />
19
- <meta name="twitter:url" content="<%= blogelator_post_url(@post) %>" />
16
+ <meta name="twitter:url" content="<%= @post.url(request) %>" />
20
17
  <meta name="twitter:image:src" content="<%= @post.image.url %>" />
18
+ <meta property="twitter:description" content="<%= @post.meta_description %>" />
21
19
 
22
20
  <script type="application/ld+json">
23
21
  {
24
22
  "@context": "http://schema.org",
25
23
  "@type": "Article",
26
- "publisher": "<%= t('titles.application') %>",
24
+ "publisher": {
25
+ "name": "<%= t('titles.application') %>"
26
+ },
27
27
  "author": {
28
28
  "@type": "Person",
29
29
  "name": "<%= @post.author.name %>",
30
30
  "image": "<%= @post.author.profile_photo.url %>",
31
- "url": "/blog",
31
+ "url": "<%= @post.author.website %>",
32
32
  "description": "<%= strip_tags(@post.author.bio_html) %>"
33
33
  },
34
34
  "headline": "<%= @post.title %>",
35
- "url": "<%= blogelator_post_url(@post) %>",
35
+ "url": "<%= @post.url(request) %>",
36
36
  "datePublished": "<%= @post.created_at %>",
37
- "image": "<%= blogelator_post_url(@post) %>",
38
- "description": "<%= strip_tags(@post.summary_html) %>"
37
+ "image": "<%= @post.image.url %>",
38
+ "description": "<%= strip_tags(@post.meta_description) %>"
39
39
  }
40
40
  </script>
@@ -1,21 +1,13 @@
1
- <% cache [Blogelator::VERSION, post, "index"] do %>
2
- <div class="post <%= post.status %>">
3
- <%= link_to post, class: "post-link" do %>
4
- <% if post.image.exists? %>
5
- <span class="post-image">
6
- <%= image_tag post.image.url(:small) %>
7
- </span>
8
- <% end %>
9
-
10
- <span class="title">
11
- <%= post.title %>
12
- </span>
13
- <% end %>
14
-
15
- <%= local_time(post.published_at, format: "%B %e, %Y", class: "published-at") %>
16
-
17
- <div class="tags">
18
- <%= render post.tags %>
19
- </div>
1
+ <div class="post <%= post.status %>">
2
+ <%= link_to post, class: "post-image" do %>
3
+ <% if post.image.exists? %>
4
+ <span class="post-image">
5
+ <%= image_tag post.image.url(:small) %>
6
+ </span>
7
+ <% end %>
8
+ <% end %>
9
+ <h2><%= link_to post.title, post %></h2>
10
+ <div class="published-at">
11
+ <%= local_time(post.published_at, format: "%B %e, %Y") %>
20
12
  </div>
21
- <% end %>
13
+ </div>
@@ -1,10 +1,32 @@
1
- <% cache [Blogelator::VERSION, @posts] do %>
1
+ <% if @featured_post %>
2
+ <section class="featured-post">
3
+ <span>Featured Article</span>
4
+ <h3>
5
+ <%= link_to @featured_post.url(request) do %>
6
+ <%= @featured_post.title %>
7
+ <% end %>
8
+ </h3>
9
+ <div class="darken-background"></div>
10
+ <% if @featured_post.image.exists? %>
11
+ <div class="background-image">
12
+ <%= image_tag @featured_post.image.url(:large) %>
13
+ </div>
14
+ <% end %>
15
+ </section>
16
+ <% end %>
17
+
18
+ <% if @tag %>
19
+ <h1 class="tag-header">Articles in: <%= @tag.name %></h1>
20
+ <% end %>
21
+
22
+ <section class="post-wrap">
2
23
  <% if @posts.length > 0 %>
3
24
  <%= render @posts %>
4
- <%= paginate @posts, views_prefix: "blogelator" %>
5
25
  <% else %>
6
26
  <p>
7
27
  There are no blog posts.
8
28
  </p>
9
29
  <% end %>
10
- <% end %>
30
+ </section>
31
+
32
+ <%= paginate @posts, views_prefix: "blogelator" %>
@@ -1,29 +1,32 @@
1
- <% cache [Blogelator::VERSION, @post, "show"] do %>
2
- <div class="post <%= @post.status %>">
3
- <div class="post-image">
4
- <%= image_tag @post.image.url(:large) %>
1
+ <div class="post <%= @post.status %>">
2
+ <div class="banner" style="background-image: url(<%= @post.image.exists? ? @post.image.url(:large) : "" %>)">
3
+ <div class="darken-background"></div>
4
+ <div class="tags">
5
+ Found In:
6
+ <ul>
7
+ <%= render @post.tags %>
8
+ </ul>
5
9
  </div>
10
+ <h1><%= link_to @post.title, @post %></h1>
11
+ <%= local_time(@post.published_at, format: "%B %e, %Y", class: "published-at") %>
12
+ </div>
6
13
 
7
- <div class="post-content">
8
- <h1>
9
- <%= link_to @post.title, @post, class: "title" %>
10
- </h1>
11
-
12
- <%= local_time(@post.published_at, format: "%B %e, %Y", class: "published-at") %>
13
-
14
- <div class="tags">
15
- <%= render @post.tags %>
16
- </div>
14
+ <div class="body">
15
+ <%== @post.body_html %>
16
+ <%= render @post.author %>
17
17
 
18
- <div class="body">
19
- <%== @post.body_html %>
18
+ <% if @post.related_posts.length > 0 %>
19
+ <div class="related-posts">
20
+ <h2>Related Posts</h2>
21
+ <hr>
22
+ <div class="related-posts-wrap">
23
+ <%= render @post.related_posts %>
24
+ </div>
20
25
  </div>
21
-
22
- <%= render @post.author if @post.author %>
23
- </div>
26
+ <% end %>
24
27
  </div>
28
+ </div>
25
29
 
26
- <% content_for :head do %>
27
- <% render "meta" %>
28
- <% end %>
30
+ <% content_for :head do %>
31
+ <% render "meta" %>
29
32
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module Blogelator
2
- VERSION = "1.0.6".freeze
2
+ VERSION = "1.0.7".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blogelator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pattison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codelation_assets
@@ -191,3 +191,4 @@ signing_key:
191
191
  specification_version: 4
192
192
  summary: Simple blog for Rails apps.
193
193
  test_files: []
194
+ has_rdoc: