lines-engine 0.1.22 → 0.1.23
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/Gemfile.lock +1 -1
- data/app/assets/stylesheets/lines/admin.css.scss +1 -1
- data/app/assets/stylesheets/lines/style.css.scss +24 -28
- data/app/controllers/lines/admin/articles_controller.rb +1 -1
- data/app/views/lines/admin/articles/_form.html.erb +10 -0
- data/app/views/lines/articles/_article.html.erb +12 -6
- data/app/views/lines/articles/index.atom.builder +5 -1
- data/db/migrate/20141027143656_add_teaser_to_article.rb +5 -0
- data/lib/lines/version.rb +1 -1
- data/spec/dummy/db/schema.rb +2 -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: 44eee1e47e463bda3f916ec470c24c7bf74c966f
|
4
|
+
data.tar.gz: 5826129bde5172984d1672183a3310208b70a951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db9451ef1eb6d1a63b352cc98d961ca19e202db721884b08285a31b0c15f54086f316f966fe519ea3c11b95ec303e6c8bea67f89bb932a2c094cc8053e3b97f3
|
7
|
+
data.tar.gz: 3bee7873ee5d77f4f6c766449aba31a27bf46464dceca4799339747f35ebc71e53b3fbb1577221b58cf1b1ef648bd296480dd99de4690123b8eb40c39be6502c
|
data/Gemfile.lock
CHANGED
@@ -332,9 +332,7 @@ div.article.first {
|
|
332
332
|
.article_googleplus, .article_footer, .article_content, div.sub_title {
|
333
333
|
display: block;
|
334
334
|
}
|
335
|
-
.
|
336
|
-
display: none;
|
337
|
-
}
|
335
|
+
.more-link { display: none; }
|
338
336
|
div.article_wrapper {
|
339
337
|
border-bottom: 1px solid #ccc;
|
340
338
|
padding: 30px 20px 30px 20px;
|
@@ -427,6 +425,12 @@ div.article_content {
|
|
427
425
|
font-family: 'UbuntuBold';
|
428
426
|
margin: 20px 0 0 0;
|
429
427
|
}
|
428
|
+
p {
|
429
|
+
margin: 0 0 20px 0;
|
430
|
+
width: 100%;
|
431
|
+
min-width: 100%;
|
432
|
+
display: block;
|
433
|
+
}
|
430
434
|
ul {
|
431
435
|
margin-left: 10px;
|
432
436
|
li {
|
@@ -459,13 +463,23 @@ div.article_content {
|
|
459
463
|
display: block;
|
460
464
|
margin: 0 auto;
|
461
465
|
}
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
466
|
+
.more-link {
|
467
|
+
margin:40px 20px 0px 20px;
|
468
|
+
text-transform: uppercase;
|
469
|
+
letter-spacing: 0.06em;
|
470
|
+
font-size:0.8em;
|
471
|
+
a {
|
472
|
+
background-color: #f4f4f4;
|
473
|
+
padding:5px 10px;
|
474
|
+
color: #4d4d4d;
|
475
|
+
display:block;
|
476
|
+
width:100%;
|
477
|
+
text-align:center;
|
478
|
+
}
|
479
|
+
a:hover {
|
480
|
+
background-color: #e7e7e7;
|
481
|
+
}
|
482
|
+
}
|
469
483
|
}
|
470
484
|
|
471
485
|
div.article_footer {
|
@@ -561,24 +575,6 @@ div.article_googleplus {
|
|
561
575
|
}
|
562
576
|
}
|
563
577
|
|
564
|
-
div.more-link {
|
565
|
-
margin:40px 20px 0px 20px;
|
566
|
-
text-transform: uppercase;
|
567
|
-
letter-spacing: 0.06em;
|
568
|
-
font-size:0.8em;
|
569
|
-
a {
|
570
|
-
background-color: #f4f4f4;
|
571
|
-
padding:5px 10px;
|
572
|
-
color: #4d4d4d;
|
573
|
-
display:block;
|
574
|
-
width:100%;
|
575
|
-
text-align:center;
|
576
|
-
}
|
577
|
-
a:hover {
|
578
|
-
background-color: #e7e7e7;
|
579
|
-
}
|
580
|
-
}
|
581
|
-
|
582
578
|
#footer {
|
583
579
|
background-color: #f4f4f4;
|
584
580
|
margin:50px 0 0 0;
|
@@ -162,7 +162,7 @@ module Lines
|
|
162
162
|
|
163
163
|
# Allowed attribute with strong_params
|
164
164
|
def article_params
|
165
|
-
params.require(:article).permit(:content, :hero_image, :short_hero_image, :published, :published_at,
|
165
|
+
params.require(:article).permit(:content, :teaser, :hero_image, :short_hero_image, :published, :published_at,
|
166
166
|
:sub_title, :title, :pictures, :author_ids, :hero_image_cache, :tag_list, :gplus_url, :featured,
|
167
167
|
:document, :document_cache, :hero_image_file, :remove_document, :pictures, :authors,
|
168
168
|
pictures_attributes: [:id, :image, :name, :article_id], author_ids: [] )
|
@@ -62,6 +62,16 @@
|
|
62
62
|
</div>
|
63
63
|
</div>
|
64
64
|
|
65
|
+
<div class="row">
|
66
|
+
<div class="label">
|
67
|
+
<h3><%= f.label :teaser, "Teaser" %></h3>
|
68
|
+
</div>
|
69
|
+
<div class="input input-textarea">
|
70
|
+
<%= f.text_area :teaser %>
|
71
|
+
</div>
|
72
|
+
<div class="additional"></div>
|
73
|
+
</div>
|
74
|
+
|
65
75
|
<div class="row">
|
66
76
|
<div class="label">
|
67
77
|
<h3><%= f.label :content, "Content" %> <span class="required">*</span></h3>
|
@@ -16,6 +16,18 @@
|
|
16
16
|
|
17
17
|
<div class="article_wrapper">
|
18
18
|
|
19
|
+
<div class="article_teaser">
|
20
|
+
<% if article.teaser.present? %>
|
21
|
+
<%= markdown article.teaser %>
|
22
|
+
<% else %>
|
23
|
+
<%= format_code(article.content) %>
|
24
|
+
<% end -%>
|
25
|
+
<div class="more-link">
|
26
|
+
<%= link_to "Read full article", article_path(article) %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
|
19
31
|
<div class="article_content">
|
20
32
|
<%= markdown article.content %>
|
21
33
|
<% if article.document? %>
|
@@ -25,12 +37,6 @@
|
|
25
37
|
<% end %>
|
26
38
|
</div>
|
27
39
|
|
28
|
-
<div class="article_teaser">
|
29
|
-
<%= format_code(article.content) %>
|
30
|
-
<div class="more-link">
|
31
|
-
<%= link_to "Read full article", article_path(article) %>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
40
|
|
35
41
|
</div>
|
36
42
|
|
@@ -8,7 +8,11 @@ atom_feed do |feed|
|
|
8
8
|
feed.entry article, url: article_url(article), published: article.published_at do |entry|
|
9
9
|
entry.title article.title
|
10
10
|
entry.summary type: 'xhtml' do |xhtml|
|
11
|
-
|
11
|
+
if article.teaser.present?
|
12
|
+
xhtml << markdown(article.teaser)
|
13
|
+
else
|
14
|
+
xhtml << format_code(article.content)
|
15
|
+
end
|
12
16
|
end
|
13
17
|
entry.content type: 'xhtml' do |xhtml|
|
14
18
|
xhtml << content_tag(:p,"<img src=\"#{article.image_url}\" alt=\"#{article.title}\"/>".html_safe).html_safe
|
data/lib/lines/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20141027143656) do
|
15
15
|
|
16
16
|
create_table "friendly_id_slugs", force: true do |t|
|
17
17
|
t.string "slug", null: false
|
@@ -38,6 +38,7 @@ ActiveRecord::Schema.define(version: 20140702160604) do
|
|
38
38
|
t.boolean "featured", default: false
|
39
39
|
t.string "document"
|
40
40
|
t.string "short_hero_image"
|
41
|
+
t.text "teaser"
|
41
42
|
end
|
42
43
|
|
43
44
|
add_index "lines_articles", ["slug"], name: "index_lines_articles_on_slug", unique: true, using: :btree
|
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.1.
|
4
|
+
version: 0.1.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Opoloo GbR
|
@@ -721,6 +721,7 @@ files:
|
|
721
721
|
- db/migrate/20140702160602_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
|
722
722
|
- db/migrate/20140702160603_add_missing_unique_indices.acts_as_taggable_on_engine.rb
|
723
723
|
- db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
|
724
|
+
- db/migrate/20141027143656_add_teaser_to_article.rb
|
724
725
|
- db/seeds.rb
|
725
726
|
- lib/generators/lines/README
|
726
727
|
- lib/generators/lines/install_generator.rb
|