Add telegram to footer and to social share button
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -41,7 +41,7 @@ gem 'acts_as_votable'
|
|||||||
gem 'ckeditor', '~> 4.2.2'
|
gem 'ckeditor', '~> 4.2.2'
|
||||||
gem 'invisible_captcha', '~> 0.9.2'
|
gem 'invisible_captcha', '~> 0.9.2'
|
||||||
gem 'cancancan', '~> 1.16.0'
|
gem 'cancancan', '~> 1.16.0'
|
||||||
gem 'social-share-button'
|
gem 'social-share-button', '~> 0.10'
|
||||||
gem 'initialjs-rails', '0.2.0.4'
|
gem 'initialjs-rails', '0.2.0.4'
|
||||||
gem 'unicorn', '~> 5.2.0'
|
gem 'unicorn', '~> 5.2.0'
|
||||||
gem 'paranoia', '~> 2.2.1'
|
gem 'paranoia', '~> 2.2.1'
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ DEPENDENCIES
|
|||||||
sass-rails (~> 5.0, >= 5.0.4)
|
sass-rails (~> 5.0, >= 5.0.4)
|
||||||
savon
|
savon
|
||||||
sitemap_generator (~> 5.3.1)
|
sitemap_generator (~> 5.3.1)
|
||||||
social-share-button
|
social-share-button (~> 0.10)
|
||||||
spring
|
spring
|
||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
sprockets (~> 3.7.1)
|
sprockets (~> 3.7.1)
|
||||||
|
|||||||
@@ -1167,7 +1167,8 @@ table {
|
|||||||
|
|
||||||
.button.button-twitter,
|
.button.button-twitter,
|
||||||
.button.button-facebook,
|
.button.button-facebook,
|
||||||
.button.button-google {
|
.button.button-google,
|
||||||
|
.button.button-telegram {
|
||||||
background: white;
|
background: white;
|
||||||
color: $text;
|
color: $text;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -1303,6 +1304,48 @@ table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.button-telegram {
|
||||||
|
background: #ECF7FC;
|
||||||
|
border-left: 3px solid #45B0E3;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
color: #45B0E3;
|
||||||
|
content: "t";
|
||||||
|
font-family: "icons" !important;
|
||||||
|
font-size: rem-calc(24);
|
||||||
|
left: 0;
|
||||||
|
line-height: $line-height*2;
|
||||||
|
padding: 0 rem-calc(20);
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ssb-telegram {
|
||||||
|
background: #45B0E3;
|
||||||
|
background-image: none !important;
|
||||||
|
color: white;
|
||||||
|
height: $line-height*2 !important;
|
||||||
|
position: relative;
|
||||||
|
width: $line-height*2 !important;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: "t";
|
||||||
|
font-family: "icons" !important;
|
||||||
|
font-size: rem-calc(24);
|
||||||
|
left: 50%;
|
||||||
|
line-height: $line-height*2;
|
||||||
|
margin-left: rem-calc(-11);
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
background: white;
|
||||||
|
color: #40A2D1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.social {
|
.social {
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -1394,6 +1437,30 @@ table {
|
|||||||
color: #CE3E26;
|
color: #CE3E26;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ssb-telegram {
|
||||||
|
background: #45B0E3;
|
||||||
|
color: white;
|
||||||
|
height: $line-height;
|
||||||
|
position: relative;
|
||||||
|
width: $line-height*2;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: "A";
|
||||||
|
font-family: "icons" !important;
|
||||||
|
font-size: rem-calc(24);
|
||||||
|
left: 50%;
|
||||||
|
line-height: $line-height*2;
|
||||||
|
margin-left: rem-calc(-11);
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
background: white;
|
||||||
|
color: #40A2D1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 13. Pages
|
// 13. Pages
|
||||||
|
|||||||
@@ -974,6 +974,10 @@
|
|||||||
&.social-share-button-google_plus:hover {
|
&.social-share-button-google_plus:hover {
|
||||||
color: #CE3E26;
|
color: #CE3E26;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.social-share-button-telegram:hover {
|
||||||
|
color: #CE3E26;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,14 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if setting['telegram_handle'] %>
|
||||||
|
<li class="inline-block">
|
||||||
|
<%= link_to "https://www.telegram.me/#{setting['telegram_handle']}", target: "_blank", title: t("social.telegram") + t('shared.target_blank_html') do %>
|
||||||
|
<span class="sr-only"><%= t("social.telegram") %></span>
|
||||||
|
<span class="icon-telegram" aria-hidden="true"></span>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
SocialShareButton.configure do |config|
|
SocialShareButton.configure do |config|
|
||||||
config.allow_sites = %w(twitter facebook google_plus)
|
config.allow_sites = %w(twitter facebook google_plus telegram)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -474,6 +474,7 @@ en:
|
|||||||
twitter: Twitter
|
twitter: Twitter
|
||||||
youtube: YouTube
|
youtube: YouTube
|
||||||
whatsapp: WhatsApp
|
whatsapp: WhatsApp
|
||||||
|
telegram: Telegram
|
||||||
spending_proposals:
|
spending_proposals:
|
||||||
form:
|
form:
|
||||||
association_name_label: 'If you propose in name of an assocation or collective add the name here'
|
association_name_label: 'If you propose in name of an assocation or collective add the name here'
|
||||||
|
|||||||
@@ -474,6 +474,7 @@ es:
|
|||||||
twitter: Twitter
|
twitter: Twitter
|
||||||
youtube: YouTube
|
youtube: YouTube
|
||||||
whatsapp: WhatsApp
|
whatsapp: WhatsApp
|
||||||
|
telegram: Telegram
|
||||||
spending_proposals:
|
spending_proposals:
|
||||||
form:
|
form:
|
||||||
association_name_label: 'Si propones en nombre de una asociación o colectivo añade el nombre aquí'
|
association_name_label: 'Si propones en nombre de una asociación o colectivo añade el nombre aquí'
|
||||||
|
|||||||
@@ -1395,6 +1395,8 @@ fr:
|
|||||||
facebook: Facebook
|
facebook: Facebook
|
||||||
twitter: Twitter
|
twitter: Twitter
|
||||||
youtube: YouTube
|
youtube: YouTube
|
||||||
|
whatsapp: WhatsApp
|
||||||
|
telegram: Telegram
|
||||||
social_share_button:
|
social_share_button:
|
||||||
baidu: Baidu.com
|
baidu: Baidu.com
|
||||||
delicious: Delicious
|
delicious: Delicious
|
||||||
@@ -1413,6 +1415,7 @@ fr:
|
|||||||
tumblr: Tumblr
|
tumblr: Tumblr
|
||||||
twitter: Twitter
|
twitter: Twitter
|
||||||
weibo: Sina Weibo
|
weibo: Sina Weibo
|
||||||
|
telegram: Telegram
|
||||||
spending_proposals:
|
spending_proposals:
|
||||||
form:
|
form:
|
||||||
description: Description
|
description: Description
|
||||||
|
|||||||
@@ -16,4 +16,5 @@ en:
|
|||||||
tumblr: "Tumblr"
|
tumblr: "Tumblr"
|
||||||
plurk: "Plurk"
|
plurk: "Plurk"
|
||||||
pinterest: "Pinterest"
|
pinterest: "Pinterest"
|
||||||
email: "Email"
|
email: "Email"
|
||||||
|
telegram: "Telegram"
|
||||||
|
|||||||
@@ -16,4 +16,5 @@ es:
|
|||||||
tumblr: "Tumblr"
|
tumblr: "Tumblr"
|
||||||
plurk: "Plurk"
|
plurk: "Plurk"
|
||||||
pinterest: "Pinterest"
|
pinterest: "Pinterest"
|
||||||
email: "Correo electrónico"
|
email: "Correo electrónico"
|
||||||
|
telegram: "Telegram"
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ Setting["twitter_handle"] = nil
|
|||||||
Setting["twitter_hashtag"] = nil
|
Setting["twitter_hashtag"] = nil
|
||||||
Setting["facebook_handle"] = nil
|
Setting["facebook_handle"] = nil
|
||||||
Setting["youtube_handle"] = nil
|
Setting["youtube_handle"] = nil
|
||||||
|
Setting["telegram_handle"] = nil
|
||||||
Setting["blog_url"] = nil
|
Setting["blog_url"] = nil
|
||||||
|
|
||||||
# Public-facing URL of the app.
|
# Public-facing URL of the app.
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ feature 'Debates' do
|
|||||||
expect(page.html).to include "<title>#{debate.title}</title>"
|
expect(page.html).to include "<title>#{debate.title}</title>"
|
||||||
|
|
||||||
within('.social-share-button') do
|
within('.social-share-button') do
|
||||||
expect(page.all('a').count).to be(3) # Twitter, Facebook, Google+
|
expect(page.all('a').count).to be(4) # Twitter, Facebook, Google+, Telegram
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ feature 'Proposals' do
|
|||||||
expect(page.html).to include "<title>#{proposal.title}</title>"
|
expect(page.html).to include "<title>#{proposal.title}</title>"
|
||||||
|
|
||||||
within('.social-share-button') do
|
within('.social-share-button') do
|
||||||
expect(page.all('a').count).to be(3) # Twitter, Facebook, Google+
|
expect(page.all('a').count).to be(4) # Twitter, Facebook, Google+, Telegram
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user