rostra 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/rostra/application.css +18 -18
- data/app/helpers/rostra/base/application_helper.rb +20 -2
- data/app/views/rostra/questions/show.html.erb +1 -0
- data/app/views/rostra/shared/_sharing_links.html.erb +4 -0
- data/lib/generators/rostra/templates/app/helpers/rostra/application_helper.rb +18 -0
- data/lib/rostra/version.rb +1 -1
- metadata +3 -3
- data/app/assets/images/rostra/vote_arrows.png +0 -0
@@ -244,28 +244,28 @@ form.comment input[type="submit"] {
|
|
244
244
|
margin: -5px 0 0 -66px;
|
245
245
|
}
|
246
246
|
.vote {
|
247
|
-
|
248
|
-
|
249
|
-
width: 43px;
|
250
|
-
height: 43px;
|
247
|
+
padding: 15px 0;
|
248
|
+
font-size: 30px;
|
251
249
|
display: block;
|
252
|
-
|
253
|
-
|
250
|
+
color: #333;
|
251
|
+
text-decoration: none;
|
254
252
|
}
|
255
|
-
.vote:hover{
|
253
|
+
.vote:hover {
|
256
254
|
background-color: transparent;
|
257
255
|
}
|
258
|
-
.vote.
|
259
|
-
|
260
|
-
}
|
261
|
-
.vote.up:hover, .vote.up.selected{
|
262
|
-
background-position: 0 -43px;
|
263
|
-
}
|
264
|
-
.vote.down{
|
265
|
-
background-position: 0 -129px;
|
266
|
-
}
|
267
|
-
.vote.down:hover, .vote.down.selected{
|
268
|
-
background-position: 0 -86px;
|
256
|
+
.vote:hover, .vote.selected {
|
257
|
+
color: green;
|
269
258
|
}
|
270
259
|
|
271
260
|
|
261
|
+
/* sharing links */
|
262
|
+
.sharing_links {
|
263
|
+
margin-top: 10px;
|
264
|
+
}
|
265
|
+
.sharing_links span {
|
266
|
+
float: left;
|
267
|
+
margin-right: 10px;
|
268
|
+
}
|
269
|
+
.sharing_links a:hover {
|
270
|
+
background-color: transparent;
|
271
|
+
}
|
@@ -2,6 +2,24 @@ module Rostra
|
|
2
2
|
module Base
|
3
3
|
module ApplicationHelper
|
4
4
|
|
5
|
+
# Snippet used to share a question on Twitter.
|
6
|
+
#
|
7
|
+
def twitter_sharing_link
|
8
|
+
raw %{
|
9
|
+
<a href="https://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>
|
10
|
+
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
# Snippet used to share a question on Facebook.
|
15
|
+
#
|
16
|
+
def facebook_sharing_link
|
17
|
+
raw %{
|
18
|
+
<a name="fb_share"></a>
|
19
|
+
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
5
23
|
# Method used to render to user names (e.g. where it says: "John Does says:"). You can,
|
6
24
|
# for example, use this method to turn "John Doe" into a link to his profile page.
|
7
25
|
#
|
@@ -59,8 +77,8 @@ module Rostra
|
|
59
77
|
else
|
60
78
|
selected = ''
|
61
79
|
end
|
62
|
-
|
63
|
-
link_to
|
80
|
+
entity_arrow = direction == :up ? '▲' : '▼'
|
81
|
+
link_to entity_arrow.html_safe, vote_path(resource, direction), method: :put, remote: true, class: "vote #{direction} #{selected}"
|
64
82
|
end
|
65
83
|
|
66
84
|
# Returns a rostra object's base class name. For example, <tt>@question</tt> is an instance of
|
@@ -13,6 +13,24 @@ module Rostra
|
|
13
13
|
#
|
14
14
|
# include MainAppHelper
|
15
15
|
|
16
|
+
# Snippet used to share a question on Twitter.
|
17
|
+
#
|
18
|
+
# def twitter_sharing_link
|
19
|
+
# raw %{
|
20
|
+
# <a href="https://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>
|
21
|
+
# <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
|
22
|
+
# }
|
23
|
+
# end
|
24
|
+
|
25
|
+
# Snippet used to share a question on Facebook.
|
26
|
+
#
|
27
|
+
# def facebook_sharing_link
|
28
|
+
# raw %{
|
29
|
+
# <a name="fb_share"></a>
|
30
|
+
# <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
|
31
|
+
# }
|
32
|
+
# end
|
33
|
+
|
16
34
|
# Creates a list of tags linking to the index showing only questions with that tag
|
17
35
|
#
|
18
36
|
# def tag_list(question)
|
data/lib/rostra/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rostra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.18
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Cory Schires
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-09 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -243,7 +243,6 @@ extra_rdoc_files: []
|
|
243
243
|
|
244
244
|
files:
|
245
245
|
- app/assets/images/rostra/anonymous_avatar.png
|
246
|
-
- app/assets/images/rostra/vote_arrows.png
|
247
246
|
- app/assets/javascripts/rostra/application.js
|
248
247
|
- app/assets/javascripts/rostra/jquery.autoSuggest.js
|
249
248
|
- app/assets/javascripts/rostra/jquery.jeditable.js
|
@@ -538,6 +537,7 @@ files:
|
|
538
537
|
- app/views/rostra/questions/show.html.erb
|
539
538
|
- app/views/rostra/questions/toggle_following.js.erb
|
540
539
|
- app/views/rostra/questions/vote.js.erb
|
540
|
+
- app/views/rostra/shared/_sharing_links.html.erb
|
541
541
|
- app/views/rostra/shared/_sidebar.html.erb
|
542
542
|
- app/views/rostra/shared/_toggle_following_question_button.html.erb
|
543
543
|
- app/views/rostra/shared/_votes.html.erb
|
Binary file
|