lines-engine 0.3.2 → 0.3.3
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/app/assets/stylesheets/lines/application.css +1 -0
- data/app/assets/stylesheets/lines/lines_overrides.css.scss +9 -0
- data/app/helpers/lines/application_helper.rb +11 -1
- data/app/views/lines/articles/_article.html.erb +1 -6
- data/lib/lines/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16fcb8d1c980629c22cf396e2c16d7dd373139c7
|
4
|
+
data.tar.gz: e809ecba8af0e4599543558f625320deffce00a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af475a19b45f1aa55ec8874011e73ceaae6ff668f6af332199fd8c12f55d6f8edc04cd0724ab04399e5a91925739ddd778f3e4f092001d08ec683ac4704744c5
|
7
|
+
data.tar.gz: 503d7d23fd0c4d2056451ce1190cad77da617015c4152a133f51decc106c9aa0a3bc9caeec0f6d765e5df35cdc4d51055a4a0e9d92ee730e120962c717a58681
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.3.3
|
4
|
+
|
5
|
+
- Override file for custom CSS added (lines_overrides.css.scss)
|
6
|
+
- Rendering of teaser extracted to helper method 'render_teaser'
|
7
|
+
|
3
8
|
## 0.3.2
|
4
9
|
|
5
10
|
- Pagination (kaminari gem) fixed: templates are now loaded from app/views/kaminari/lines/ as theme
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
* Place your custom CSS and overrides here. You can find the original CSS source under:
|
3
|
+
*
|
4
|
+
* app/assets/stylesheets/lines/style.css.scss
|
5
|
+
*
|
6
|
+
* Make sure to only use the override file for your custom CSS. The style.css may be overwritten
|
7
|
+
* with newer gem versions.
|
8
|
+
*
|
9
|
+
*/
|
@@ -4,7 +4,17 @@ require 'pygments'
|
|
4
4
|
# Provides helper methods for views.
|
5
5
|
module Lines
|
6
6
|
module ApplicationHelper
|
7
|
-
|
7
|
+
|
8
|
+
# Renders the teaser for an article.
|
9
|
+
def render_teaser(article, article_counter=0)
|
10
|
+
if article_counter < 0
|
11
|
+
teaser = article.teaser.present? ? markdown(article.teaser) : nil
|
12
|
+
else
|
13
|
+
teaser = article.teaser.present? ? format_code(article.teaser) : format_code(article.content)
|
14
|
+
end
|
15
|
+
teaser
|
16
|
+
end
|
17
|
+
|
8
18
|
# Highlights and formats code fragments with Pygments
|
9
19
|
class HTMLwithPygments < Redcarpet::Render::XHTML
|
10
20
|
def block_code(code, language)
|
@@ -15,12 +15,7 @@
|
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<div class="article_teaser">
|
18
|
-
|
19
|
-
<% teaser = article.teaser.present? ? markdown(article.teaser) : nil %>
|
20
|
-
<% else %>
|
21
|
-
<% teaser = article.teaser.present? ? format_code(article.teaser) : format_code(article.content) %>
|
22
|
-
<% end %>
|
23
|
-
<%= teaser %>
|
18
|
+
<%= render_teaser(article, article_counter) %>
|
24
19
|
<div class="more-link">
|
25
20
|
<%= link_to "Read full article", article_path(article) %>
|
26
21
|
</div>
|
data/lib/lines/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lines-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Opoloo GbR
|
@@ -647,6 +647,7 @@ files:
|
|
647
647
|
- app/assets/stylesheets/lines/admin.css.scss
|
648
648
|
- app/assets/stylesheets/lines/application.css
|
649
649
|
- app/assets/stylesheets/lines/fonts.css.scss
|
650
|
+
- app/assets/stylesheets/lines/lines_overrides.css.scss
|
650
651
|
- app/assets/stylesheets/lines/media_queries.css.scss
|
651
652
|
- app/assets/stylesheets/lines/navbar.css.scss
|
652
653
|
- app/assets/stylesheets/lines/pygments.css.erb
|