c80_social_networks 0.1.0.1 → 0.1.0.2
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/c80_social_networks/frontend/{links_list.scss → _links_list.scss} +1 -1
- data/app/assets/stylesheets/c80_social_networks/frontend/links_list_icons.scss +11 -0
- data/app/assets/stylesheets/c80_social_networks/frontend/links_list_images.scss +13 -0
- data/app/helpers/c80_social_networks/awesome_social_icons_helper.rb +14 -0
- data/app/helpers/c80_social_networks/links_helper.rb +13 -2
- data/app/helpers/c80_social_networks/types_helper.rb +1 -1
- data/app/models/c80_social_networks/link.rb +10 -0
- data/app/views/c80_social_networks/{_social_icon.html.erb → _awesome_social_icon.html.erb} +0 -0
- data/app/views/c80_social_networks/{_links_list.html.erb → _links_list_icons.html.erb} +2 -2
- data/app/views/c80_social_networks/_links_list_images.html.erb +17 -0
- data/config/initializers/activeadmin.rb +1 -1
- data/lib/c80_social_networks/version.rb +1 -1
- metadata +9 -6
- data/app/helpers/c80_social_networks/social_icons_helper.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b48b022f30e8eaea005809d51410c43291a266d9
|
4
|
+
data.tar.gz: a875c94fdb8ca67091932e71907e14273efda133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8803ea6737613a926b26f12462bcdcd720d9c47d58cf35f5b1d2c683b36d44991bd72ea9fd4ffcb6dac11ade4faf92e78f75b4c6fcf3a4709d1dd8107bade95
|
7
|
+
data.tar.gz: c1852053ad75e25669c69e66525432444ef100da0f50b9b4b85355255155cb929c7b8a4f63f23fe773599bdea460c837be75efea96204eedbe40230207c989b6
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module C80SocialNetworks
|
2
|
+
module AwesomeSocialIconsHelper
|
3
|
+
|
4
|
+
def draw_awesome_social_icon(title='social icon',awesome_icon_code='fa-heart')
|
5
|
+
|
6
|
+
render :partial => 'c80_social_networks/awesome_social_icon',
|
7
|
+
:locals => {
|
8
|
+
title: title,
|
9
|
+
awesome_icon_code: awesome_icon_code
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -1,11 +1,22 @@
|
|
1
1
|
module C80SocialNetworks
|
2
2
|
module LinksHelper
|
3
3
|
|
4
|
-
def
|
4
|
+
def render_social_networks_links_list_icons
|
5
5
|
|
6
6
|
links_list = Link.all.ord_asc
|
7
7
|
|
8
|
-
render :partial => 'c80_social_networks/
|
8
|
+
render :partial => 'c80_social_networks/links_list_icons',
|
9
|
+
:locals => {
|
10
|
+
links_list: links_list
|
11
|
+
}
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
def render_social_networks_links_list_images
|
16
|
+
|
17
|
+
links_list = Link.all.ord_asc
|
18
|
+
|
19
|
+
render :partial => 'c80_social_networks/links_list_images',
|
9
20
|
:locals => {
|
10
21
|
links_list: links_list
|
11
22
|
}
|
@@ -2,7 +2,7 @@ module C80SocialNetworks
|
|
2
2
|
module TypesHelper
|
3
3
|
|
4
4
|
def type_title_html_str(type)
|
5
|
-
"#{
|
5
|
+
"#{draw_awesome_social_icon(type.title, type.awesome_icon_code)} <span class='type_title'>#{type.title}</span>".html_safe
|
6
6
|
end
|
7
7
|
|
8
8
|
end
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="links_list_icons clearfix">
|
2
2
|
<ul>
|
3
3
|
<% links_list.each_with_index do |link, index| %>
|
4
4
|
<li class="link_<%=index%> type_<%= link.type_title %>">
|
5
5
|
<%= link_to link.url, { target: '_blank', title: link.title } do %>
|
6
|
-
<%=
|
6
|
+
<%= draw_awesome_social_icon(link.title, link.type_awesome_icon_code) %>
|
7
7
|
<% end %>
|
8
8
|
</li>
|
9
9
|
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="links_list_images clearfix">
|
2
|
+
<ul class="clearfix">
|
3
|
+
<% links_list.each_with_index do |link, index| %>
|
4
|
+
<li class="link_<%=index%> type_<%= link.type_title %>">
|
5
|
+
|
6
|
+
<%= render_image_link_lazy({ # NOTE:: использует LazyImageHelper
|
7
|
+
:alt_image => link.title,
|
8
|
+
:image => link.type_image_url,
|
9
|
+
:a_href => link.url,
|
10
|
+
:a_class => '',
|
11
|
+
:target => '_blank'
|
12
|
+
}) %>
|
13
|
+
|
14
|
+
</li>
|
15
|
+
<% end %>
|
16
|
+
</ul>
|
17
|
+
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_social_networks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,19 +69,22 @@ files:
|
|
69
69
|
- app/admin/c80_social_networks/types.rb
|
70
70
|
- app/assets/stylesheets/c80_social_networks.scss
|
71
71
|
- app/assets/stylesheets/c80_social_networks/backend/types.scss
|
72
|
-
- app/assets/stylesheets/c80_social_networks/frontend/
|
72
|
+
- app/assets/stylesheets/c80_social_networks/frontend/_links_list.scss
|
73
|
+
- app/assets/stylesheets/c80_social_networks/frontend/links_list_icons.scss
|
74
|
+
- app/assets/stylesheets/c80_social_networks/frontend/links_list_images.scss
|
73
75
|
- app/assets/stylesheets/c80_social_networks/lib/font_awesome_important.scss
|
74
76
|
- app/assets/stylesheets/c80_social_networks/lib/social_icon.scss
|
75
77
|
- app/assets/stylesheets/c80_social_networks/lib/type_title.scss
|
76
78
|
- app/assets/stylesheets/c80_social_networks_backend.scss
|
79
|
+
- app/helpers/c80_social_networks/awesome_social_icons_helper.rb
|
77
80
|
- app/helpers/c80_social_networks/links_helper.rb
|
78
|
-
- app/helpers/c80_social_networks/social_icons_helper.rb
|
79
81
|
- app/helpers/c80_social_networks/types_helper.rb
|
80
82
|
- app/models/c80_social_networks/link.rb
|
81
83
|
- app/models/c80_social_networks/type.rb
|
82
84
|
- app/uploaders/c80_social_networks/type_icon_uploader.rb
|
83
|
-
- app/views/c80_social_networks/
|
84
|
-
- app/views/c80_social_networks/
|
85
|
+
- app/views/c80_social_networks/_awesome_social_icon.html.erb
|
86
|
+
- app/views/c80_social_networks/_links_list_icons.html.erb
|
87
|
+
- app/views/c80_social_networks/_links_list_images.html.erb
|
85
88
|
- bin/console
|
86
89
|
- bin/setup
|
87
90
|
- c80_social_networks.gemspec
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module C80SocialNetworks
|
2
|
-
module SocialIconsHelper
|
3
|
-
|
4
|
-
def draw_social_icon(title='social icon',awesome_icon_code='fa-heart',width=16,height=16)
|
5
|
-
|
6
|
-
render :partial => 'c80_social_networks/social_icon',
|
7
|
-
:locals => {
|
8
|
-
title: title,
|
9
|
-
awesome_icon_code: awesome_icon_code
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|