homeland-press 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/homeland/press/application.scss +26 -2
- data/app/views/homeland/press/admin/posts/index.html.erb +1 -1
- data/app/views/homeland/press/posts/_sidebar.html.erb +2 -0
- data/app/views/homeland/press/posts/index.html.erb +1 -1
- data/app/views/homeland/press/posts/index.xml.builder +19 -0
- data/app/views/homeland/press/posts/show.html.erb +1 -0
- data/app/views/homeland/press/posts/upcoming.html.erb +1 -1
- data/lib/homeland/press/engine.rb +18 -15
- data/lib/homeland/press/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84a424f8551d6830c25174da3ee5df9c73f5be68
|
4
|
+
data.tar.gz: e3eeecac2754dab4b91b16ab270eb58036cc7eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f407cfd77511ac3bc66e89ae878629c94adbe89d8384f1081accbe112058da9376510e3273368f723765d01ba1a5996de5d2dfc9708a03a0e2d70a485ccb44
|
7
|
+
data.tar.gz: 389974ae322f2c83784d0ffdc0412b496024d013d7e6a53c66dbcacc333df463e3997334aa8798dc427999f2b7128c640d15a0750f6ae9780dfeab1c1f9e1abe
|
@@ -26,6 +26,9 @@
|
|
26
26
|
margin-bottom: 15px;
|
27
27
|
border-bottom: 1px solid #eee;
|
28
28
|
|
29
|
+
@media (max-width: 480px) {
|
30
|
+
}
|
31
|
+
|
29
32
|
&:last-child {
|
30
33
|
border-bottom: 0;
|
31
34
|
margin-bottom: 0px;
|
@@ -60,9 +63,13 @@
|
|
60
63
|
a { color: #aaa; }
|
61
64
|
}
|
62
65
|
|
63
|
-
|
64
|
-
.post-title { font-size: 16px; }
|
66
|
+
@media (max-width: 480px) {
|
67
|
+
.post-title { font-size: 16px; line-height: 18px; }
|
68
|
+
.post-likes {
|
69
|
+
width: 40px;
|
70
|
+
}
|
65
71
|
}
|
72
|
+
|
66
73
|
}
|
67
74
|
|
68
75
|
|
@@ -71,6 +78,12 @@
|
|
71
78
|
padding: 30px 50px;
|
72
79
|
}
|
73
80
|
|
81
|
+
@media (max-width: 480px) {
|
82
|
+
.panel-body {
|
83
|
+
padding: 15px;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
74
87
|
h1 {
|
75
88
|
text-align: center; margin-bottom: 15px;
|
76
89
|
font-size: 24px;
|
@@ -83,6 +96,17 @@
|
|
83
96
|
color: #999;
|
84
97
|
}
|
85
98
|
|
99
|
+
|
100
|
+
.social-share-button {
|
101
|
+
text-align: center;
|
102
|
+
margin: 15px 0;
|
103
|
+
height: 24px;
|
104
|
+
.ssb-icon {
|
105
|
+
width: 24px; height: 24px;
|
106
|
+
background-size: 24px 24px;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
86
110
|
.post-info {
|
87
111
|
.media-object { display: inline; }
|
88
112
|
a { color: #777;}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
xml.instruct! :xml, version: "1.0"
|
2
|
+
xml.rss(version: "2.0"){
|
3
|
+
xml.channel{
|
4
|
+
xml.title "#{Setting.app_name} - #{t('plugin.press')}"
|
5
|
+
xml.link posts_url
|
6
|
+
xml.description "#{Setting.app_name} - #{t('plugin.press')}"
|
7
|
+
xml.language('zh-CN')
|
8
|
+
for post in @posts
|
9
|
+
xml.item do
|
10
|
+
xml.title post.title
|
11
|
+
xml.description markdown(post.body)
|
12
|
+
xml.author post.user&.login
|
13
|
+
xml.pubDate(post.created_at.strftime("%a, %d %b %Y %H:%M:%S %z"))
|
14
|
+
xml.link post_url(post)
|
15
|
+
xml.guid post_url(post)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
}
|
19
|
+
}
|
@@ -3,28 +3,31 @@ module Homeland
|
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
isolate_namespace Homeland::Press
|
5
5
|
|
6
|
-
initializer '
|
7
|
-
|
6
|
+
initializer 'homeland.press.init' do |app|
|
7
|
+
return unless Setting.has_module?(:press)
|
8
|
+
app.config.after_initialize do
|
9
|
+
# Because need use I18n.t
|
10
|
+
# must after Rails application initialized will get correct locale
|
8
11
|
Homeland.register_plugin do |plugin|
|
9
|
-
plugin.name
|
10
|
-
plugin.display_name
|
11
|
-
plugin.description
|
12
|
-
plugin.navbar_link
|
12
|
+
plugin.name = 'press'
|
13
|
+
plugin.display_name = I18n.t('plugin.press')
|
14
|
+
plugin.description = 'A Press/News plugin for Homeland.'
|
15
|
+
plugin.navbar_link = true
|
13
16
|
plugin.admin_navbar_link = true
|
14
|
-
plugin.user_menu_link
|
15
|
-
plugin.root_path
|
16
|
-
plugin.admin_path
|
17
|
-
plugin.spec_path = config.root.join('spec')
|
17
|
+
plugin.user_menu_link = true
|
18
|
+
plugin.root_path = "/posts"
|
19
|
+
plugin.admin_path = "/admin/posts"
|
18
20
|
end
|
21
|
+
end
|
19
22
|
|
20
|
-
User.send :include, Homeland::Press::UserMixin
|
21
23
|
|
22
|
-
|
23
|
-
mount Homeland::Press::Engine => '/'
|
24
|
-
end
|
24
|
+
User.send :include, Homeland::Press::UserMixin
|
25
25
|
|
26
|
-
|
26
|
+
app.routes.prepend do
|
27
|
+
mount Homeland::Press::Engine => '/'
|
27
28
|
end
|
29
|
+
|
30
|
+
app.config.paths["db/migrate"].concat(config.paths["db/migrate"].expanded)
|
28
31
|
end
|
29
32
|
end
|
30
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homeland-press
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- app/views/homeland/press/posts/_sidebar.html.erb
|
51
51
|
- app/views/homeland/press/posts/edit.html.erb
|
52
52
|
- app/views/homeland/press/posts/index.html.erb
|
53
|
+
- app/views/homeland/press/posts/index.xml.builder
|
53
54
|
- app/views/homeland/press/posts/new.html.erb
|
54
55
|
- app/views/homeland/press/posts/show.html.erb
|
55
56
|
- app/views/homeland/press/posts/upcoming.html.erb
|
@@ -82,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
83
|
version: '0'
|
83
84
|
requirements: []
|
84
85
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
86
|
+
rubygems_version: 2.5.2
|
86
87
|
signing_key:
|
87
88
|
specification_version: 4
|
88
89
|
summary: Press/Blog/News plugin for Homeland.
|