rsocialize 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # This is an RVM Project .rvmrc file, used to automatically load the ruby
4
+ # development environment upon cd'ing into the directory
5
+
6
+ # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7
+ # Only full ruby name is supported here, for short names use:
8
+ # echo "rvm use 1.9.3" > .rvmrc
9
+ environment_id="ruby-1.9.3-p194@rsoc326"
10
+
11
+ # Uncomment the following lines if you want to verify rvm version per project
12
+ # rvmrc_rvm_version="1.14.2 (stable)" # 1.10.1 seams as a safe start
13
+ # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14
+ # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15
+ # return 1
16
+ # }
17
+
18
+ # First we attempt to load the desired environment directly from the environment
19
+ # file. This is very fast and efficient compared to running through the entire
20
+ # CLI and selector. If you want feedback on which environment was used then
21
+ # insert the word 'use' after --create as this triggers verbose mode.
22
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
23
+ && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
24
+ then
25
+ \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
26
+ [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
27
+ \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
28
+ if [[ $- == *i* ]] # check for interactive shells
29
+ then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
30
+ else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
31
+ fi
32
+ else
33
+ # If the environment file has not yet been created, use the RVM CLI to select.
34
+ rvm --create use "$environment_id" || {
35
+ echo "Failed to create RVM environment '${environment_id}'."
36
+ return 1
37
+ }
38
+ fi
39
+
40
+ # If you use bundler, this might be useful to you:
41
+ # if [[ -s Gemfile ]] && {
42
+ # ! builtin command -v bundle >/dev/null ||
43
+ # builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
44
+ # }
45
+ # then
46
+ # printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
47
+ # gem install bundler
48
+ # fi
49
+ # if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
50
+ # then
51
+ # bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
52
+ # fi
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rsocialize.gemspec
4
+ gemspec
5
+ gem 'sinatra', '~>1.3.3'
6
+ gem 'curb', '~>0.8.2'
7
+ gem 'activesupport', '~>3.2.8'
8
+ gem 'nokogiri', '~>1.5.5'
9
+ gem 'actionpack', '~>3.2.8'
10
+ gem 'rake','~>0.9.2.2'
11
+ gem 'gemcutter', '~>0.7.1' #needed to add yank command to rubygems command list
data/Gemfile.lock ADDED
@@ -0,0 +1,77 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rsocialize (0.0.1)
5
+ actionpack (~> 3.2.8)
6
+ activesupport (~> 3.2.8)
7
+ curb (~> 0.8.2)
8
+ nokogiri (~> 1.5.5)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionpack (3.2.8)
14
+ activemodel (= 3.2.8)
15
+ activesupport (= 3.2.8)
16
+ builder (~> 3.0.0)
17
+ erubis (~> 2.7.0)
18
+ journey (~> 1.0.4)
19
+ rack (~> 1.4.0)
20
+ rack-cache (~> 1.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.1.3)
23
+ activemodel (3.2.8)
24
+ activesupport (= 3.2.8)
25
+ builder (~> 3.0.0)
26
+ activesupport (3.2.8)
27
+ i18n (~> 0.6)
28
+ multi_json (~> 1.0)
29
+ builder (3.0.4)
30
+ curb (0.8.2)
31
+ diff-lcs (1.1.3)
32
+ erubis (2.7.0)
33
+ gemcutter (0.7.1)
34
+ hike (1.2.1)
35
+ i18n (0.6.1)
36
+ journey (1.0.4)
37
+ multi_json (1.3.7)
38
+ nokogiri (1.5.5)
39
+ rack (1.4.1)
40
+ rack-cache (1.2)
41
+ rack (>= 0.4)
42
+ rack-protection (1.2.0)
43
+ rack
44
+ rack-test (0.6.2)
45
+ rack (>= 1.0)
46
+ rake (0.9.2.2)
47
+ rspec (2.11.0)
48
+ rspec-core (~> 2.11.0)
49
+ rspec-expectations (~> 2.11.0)
50
+ rspec-mocks (~> 2.11.0)
51
+ rspec-core (2.11.1)
52
+ rspec-expectations (2.11.3)
53
+ diff-lcs (~> 1.1.3)
54
+ rspec-mocks (2.11.3)
55
+ sinatra (1.3.3)
56
+ rack (~> 1.3, >= 1.3.6)
57
+ rack-protection (~> 1.2)
58
+ tilt (~> 1.3, >= 1.3.3)
59
+ sprockets (2.1.3)
60
+ hike (~> 1.2)
61
+ rack (~> 1.0)
62
+ tilt (~> 1.1, != 1.3.0)
63
+ tilt (1.3.3)
64
+
65
+ PLATFORMS
66
+ ruby
67
+
68
+ DEPENDENCIES
69
+ actionpack (~> 3.2.8)
70
+ activesupport (~> 3.2.8)
71
+ curb (~> 0.8.2)
72
+ gemcutter
73
+ nokogiri (~> 1.5.5)
74
+ rake (~> 0.9.2.2)
75
+ rsocialize!
76
+ rspec (~> 2.11.0)
77
+ sinatra (~> 1.3.3)
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 BruceP
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # Rsocialize Description
2
+
3
+ This is a ruby on rails gem that enables easy installation of the [sharrre](http://sharrre.com/) jQuery plugin. It provides a simple way to add social media buttons to your rails application. No more digging through APIs or copying and pasting code from developer docs just to install social media buttons for your rails application.
4
+
5
+ #Rsocialize - Who is it for?
6
+
7
+ This gem is ideal for one-person (or severely time-pressed) startups who are time-limited and just need to get some social media buttons installed quickly, because they're really busy working on so many other aspects of deployment.
8
+
9
+ #Rsocialize v0.0.2 - What's working?
10
+
11
+ This is a "beta" release. There's been some minimal testing with rspec. In the current version, I have examples 1,2,3,5 and 6 from the sharrre plugin working in Rails. Users can use their own custom css and specify their own sharrre options to use different buttons than the ones given in examples 1,2,3,5,6.
12
+
13
+ #Rails compatibility
14
+
15
+ I wrote this gem and tested it with Rails 3.2.8. It takes advantage of the asset pipeline. I'm thinking about making it compatible with other versions of rails, so if you're interested in this happening, let me know via the issue queue.
16
+
17
+ ## Installation
18
+
19
+ Add this line to your application's Gemfile:
20
+
21
+ gem 'rsocialize'
22
+
23
+ And then execute:
24
+
25
+ $ bundle
26
+
27
+ Or install it yourself as:
28
+
29
+ $ gem install rsocialize
30
+
31
+ ## Basic Usage
32
+
33
+ ###Installation w/your rails application
34
+
35
+ At the command prompt:
36
+
37
+ `rails g rsocialize:install example1`
38
+
39
+ This will install the required sharrre jQuery code and the Example 1 CSS into your app/assets directory. It will also create a route in your routes.rb file and a controller file. This part is "auto-magic" and done for you.
40
+
41
+ Now in your view(s) file or on whatever page you want the social media buttons to appear, you need to use the following 2 helper functions:
42
+
43
+ `rsocialize_div_tag("", {:div_template=>"example1"})`
44
+
45
+ The *_div_tag helper outputs the necessary css for sharrre's Example 1.
46
+
47
+ `rsocialize_js_tag({:js_template=>"example1"})`
48
+
49
+ The *_js_tag helper outputs the necessary jQuery Code for sharrre's Example 1.
50
+
51
+ You would use "example2", "example3", etc. as the argument if you wanted the Example 2, Example 3, etc. style buttons to be used.
52
+
53
+ ###Uninstalling from your rails application
54
+ At the command prompt:
55
+
56
+ `rails g rsocialize:uninstall`
57
+
58
+ ## Advanced Usage with Custom Options
59
+
60
+ To use social buttons different than what is pre-loaded with the examples, you have to perform the following steps:
61
+ 1. Specify your own (nested) hash of custom options to pass into *_js_tag so that the proper jQuery code is returned in your view
62
+ 2. Specify your own html `<div>` markup for the jQuery code to operate on
63
+ 3. Overwrite the css code in the rsocialize.css file for any custom css styling you want to be applied
64
+
65
+ ###For step 1 - example of specifying the hash of options
66
+ ```ruby
67
+ @js_custom_options = {
68
+ demo1: {
69
+ share: {
70
+ googlePlus: true,
71
+ facebook: true,
72
+ twitter: true
73
+ },
74
+ buttons: {
75
+ googlePlus: {size: 'tall'},
76
+ facebook: {layout: 'box_count'},
77
+ twitter: {count: 'vertical', via: '_JulienH'}
78
+ },
79
+ hover: %Q[function(api, options){
80
+ $(api.element).find('.buttons').show();
81
+ }],
82
+ hide: %Q[function(api, options){
83
+ $(api.element).find('.buttons').hide();
84
+ }],
85
+ enableTracking: true
86
+ }
87
+ }
88
+ ```
89
+
90
+ You would then call the following in your view:
91
+ `<%= rsocialize_js_tag(@js_custom_options) %>`
92
+
93
+ ###For step 2 - example of specifying own html `<div>` markup for the jQuery code to operate on
94
+ ```ruby
95
+ @custom_div = %Q{
96
+ <div id="demo1" data-url="http://sharrre.com" data-text="Make your sharing widget with Sharrre (jQuery Plugin)" data-title="share"></div>
97
+ }
98
+ ````
99
+
100
+ You would then call the following in your view:
101
+ `rsocialize_div_tag(@custom_div,:div_template=>"custom") %>`
102
+
103
+ The *custom* option essentially tells the *_div_tag helper to return whatever html markup you pass in.
104
+
105
+ ###For step 3 - overwrite the css code in the rsocialize.css file for any custom css styling you want to be applied
106
+ This is pretty straightforward. If you don't like the default css (or whatever option you installed), you can overwrite via copy/paste or you can use the *switch_css* command. To use the *switch_css* command:
107
+
108
+ `rails g rsocialize:switch_css example2`
109
+
110
+ Note that the argument "example2" refers to the "example2css.txt" file in the "app/assets/stylesheets" directory. If you have your own custom css file that you want to switch in and out, you can always create your own text file in the "app/assets/stylesheets" directory. The file should be named according to the convention *css.txt, where * = any bunch of characters.
111
+
112
+ ## Contributing
113
+
114
+ 1. Fork it
115
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
116
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
117
+ 4. Push to the branch (`git push origin my-new-feature`)
118
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+
4
+ #source: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/rubygems/rdoc/Gem/PackageTask.html
5
+ require 'rubygems/package_task'
6
+ spec = eval(File.read('rsocialize.gemspec'))
7
+ Gem::PackageTask.new(spec) do |pkg|
8
+ end
data/lib/.rvmrc ADDED
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # This is an RVM Project .rvmrc file, used to automatically load the ruby
4
+ # development environment upon cd'ing into the directory
5
+
6
+ # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7
+ # Only full ruby name is supported here, for short names use:
8
+ # echo "rvm use 1.9.3" > .rvmrc
9
+ environment_id="ruby-1.9.3-p194@rsoc326"
10
+
11
+ # Uncomment the following lines if you want to verify rvm version per project
12
+ # rvmrc_rvm_version="1.14.2 (stable)" # 1.10.1 seams as a safe start
13
+ # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14
+ # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15
+ # return 1
16
+ # }
17
+
18
+ # First we attempt to load the desired environment directly from the environment
19
+ # file. This is very fast and efficient compared to running through the entire
20
+ # CLI and selector. If you want feedback on which environment was used then
21
+ # insert the word 'use' after --create as this triggers verbose mode.
22
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
23
+ && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
24
+ then
25
+ \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
26
+ [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
27
+ \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
28
+ if [[ $- == *i* ]] # check for interactive shells
29
+ then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
30
+ else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
31
+ fi
32
+ else
33
+ # If the environment file has not yet been created, use the RVM CLI to select.
34
+ rvm --create use "$environment_id" || {
35
+ echo "Failed to create RVM environment '${environment_id}'."
36
+ return 1
37
+ }
38
+ fi
39
+
40
+ # If you use bundler, this might be useful to you:
41
+ # if [[ -s Gemfile ]] && {
42
+ # ! builtin command -v bundle >/dev/null ||
43
+ # builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
44
+ # }
45
+ # then
46
+ # printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
47
+ # gem install bundler
48
+ # fi
49
+ # if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
50
+ # then
51
+ # bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
52
+ # fi
@@ -0,0 +1,5 @@
1
+ Description:
2
+ Copies all the needed CSS files into your app's asset pipeline
3
+
4
+ Example:
5
+ rails generate rsocialize
@@ -0,0 +1,33 @@
1
+ require 'rails/generators'
2
+ module Rsocialize
3
+ class InstallGenerator < Rails::Generators::Base
4
+ #rails g rsocialize:install example1
5
+ argument :css_layout_name, :type => :string, :default => "example1"
6
+ def self.source_root
7
+ @_rsocialize_root ||= File.expand_path("../templates", __FILE__)
8
+ end
9
+ def create_layout
10
+ copy_file 'example1.css', 'app/assets/stylesheets/example1css.txt'
11
+ copy_file 'example2.css', 'app/assets/stylesheets/example2css.txt'
12
+ copy_file 'example3.css', 'app/assets/stylesheets/example3css.txt'
13
+ copy_file 'example5.css', 'app/assets/stylesheets/example5css.txt'
14
+ copy_file 'example6.css', 'app/assets/stylesheets/example6css.txt'
15
+ copy_file 'rsocialize.css', 'app/assets/stylesheets/rsocialize.css'
16
+ copy_file %Q{#{Rsocialize::JQUERY_SHARRRE_FILE}}, %Q{app/assets/javascripts/#{Rsocialize::JQUERY_SHARRRE_FILE}}
17
+ copy_file 'rsocialize_controller.rb', 'app/lib/rsocialize_controller.rb'
18
+ directory 'images', 'app/assets/images'
19
+ end
20
+ def modify_css
21
+ css_path = "app/assets/stylesheets/"+"#{css_layout_name}css.txt"
22
+ css_str = IO.read(css_path)
23
+ rs_filename = %Q{app/assets/stylesheets/rsocialize.css}
24
+ File.open(rs_filename, 'w') {|f| f.write(css_str) }
25
+ end
26
+ def modify_routes
27
+ line = "::Application.routes.draw do"
28
+ gsub_file 'config/routes.rb', /(#{Regexp.escape(line)})/mi do |match|
29
+ %Q{#{match}\n match '/sharrre' => 'Rsocialize#sharrre'}
30
+ end
31
+ end
32
+ end #end class InstallGenerator
33
+ end #Rsocialize
@@ -0,0 +1,17 @@
1
+ require 'rails/generators'
2
+ module Rsocialize
3
+ class SwitchCssGenerator < Rails::Generators::Base
4
+ #rails g rsocialize:install example1
5
+ argument :css_layout_name, :type => :string, :default => "example1"
6
+ def self.source_root
7
+ @_rsocialize_root ||= File.expand_path("../templates", __FILE__)
8
+ end
9
+ def modify_css
10
+ css_path = "app/assets/stylesheets/"+"#{css_layout_name}css.txt"
11
+ css_str = IO.read(css_path)
12
+ rs_filename = %Q{app/assets/stylesheets/rsocialize.css}
13
+ File.open(rs_filename, 'w') {|f| f.write(css_str) }
14
+ puts "Status: #{css_layout_name} style applied"
15
+ end
16
+ end #end class SwitchCssGenerator
17
+ end #Rsocialize
@@ -0,0 +1,112 @@
1
+ #example1 {
2
+ float:left;
3
+ margin:0 27% 0 27%;
4
+ }
5
+ .sharrre {
6
+ margin:55px 0 0 50px;
7
+ float:left;
8
+ }
9
+ .sharrre .box a:hover {
10
+ text-decoration:none;
11
+ }
12
+ .sharrre .count {
13
+ color:#525b67;
14
+ display:block;
15
+ font-size:18px;
16
+ font-weight:bold;
17
+ line-height:40px;
18
+ height:40px;
19
+ position:relative;
20
+ text-align:center;
21
+ width:70px;
22
+ -webkit-border-radius:4px;
23
+ -moz-border-radius:4px;
24
+ border-radius:4px;
25
+ border:1px solid #b2c6cc;
26
+ background: #fbfbfb; /* Old browsers */
27
+ background: -moz-linear-gradient(top, #fbfbfb 0%, #f6f6f6 100%); /* FF3.6+ */
28
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fbfbfb), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */
29
+ background: -webkit-linear-gradient(top, #fbfbfb 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */
30
+ background: -o-linear-gradient(top, #fbfbfb 0%,#f6f6f6 100%); /* Opera 11.10+ */
31
+ background: -ms-linear-gradient(top, #fbfbfb 0%,#f6f6f6 100%); /* IE10+ */
32
+ background: linear-gradient(top, #fbfbfb 0%,#f6f6f6 100%); /* W3C */
33
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fbfbfb', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
34
+ }
35
+ .sharrre .count:before, .sharrre .count:after {
36
+ content:'';
37
+ display:block;
38
+ position:absolute;
39
+ left:49%;
40
+ width:0;
41
+ height:0;
42
+ }
43
+ .sharrre .count:before {
44
+ border:solid 7px transparent;
45
+ border-top-color:#b2c6cc;
46
+ margin-left:-7px;
47
+ bottom: -14px;
48
+ }
49
+ .sharrre .count:after {
50
+ border:solid 6px transparent;
51
+ margin-left:-6px;
52
+ bottom:-12px;
53
+ border-top-color:#fbfbfb;
54
+ }
55
+ .sharrre .share {
56
+ color:#FFFFFF;
57
+ display:block;
58
+ font-size:12px;
59
+ font-weight:bold;
60
+ height:30px;
61
+ line-height:30px;
62
+ margin-top:8px;
63
+ padding:0;
64
+ text-align:center;
65
+ text-decoration:none;
66
+ width:70px;
67
+ -webkit-border-radius:4px;
68
+ -moz-border-radius:4px;
69
+ border-radius:4px;
70
+ }
71
+ #twitter .share {
72
+ text-shadow: 1px 0px 0px #0077be;
73
+ filter: dropshadow(color=#0077be, offx=1, offy=0);
74
+ border:1px solid #0075c5;
75
+ background: #26c3eb;
76
+ background: -moz-linear-gradient(top, #26c3eb 0%, #26b3e6 50%, #00a2e1 51%, #0080d6 100%); /* FF3.6+ */
77
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#26c3eb), color-stop(50%,#26b3e6), color-stop(51%,#00a2e1), color-stop(100%,#0080d6)); /* Chrome,Safari4+ */
78
+ background: -webkit-linear-gradient(top, #26c3eb 0%,#26b3e6 50%,#00a2e1 51%,#0080d6 100%); /* Chrome10+,Safari5.1+ */
79
+ background: -o-linear-gradient(top, #26c3eb 0%,#26b3e6 50%,#00a2e1 51%,#0080d6 100%); /* Opera 11.10+ */
80
+ background: -ms-linear-gradient(top, #26c3eb 0%,#26b3e6 50%,#00a2e1 51%,#0080d6 100%); /* IE10+ */
81
+ background: linear-gradient(top, #26c3eb 0%,#26b3e6 50%,#00a2e1 51%,#0080d6 100%); /* W3C */
82
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#26c3eb', endColorstr='#0080d6',GradientType=0 ); /* IE6-9 */
83
+ box-shadow: 0 1px 4px #DDDDDD, 0 1px 0 #5cd3f1 inset;
84
+ }
85
+ #facebook .share {
86
+ text-shadow: 1px 0px 0px #26427e;
87
+ filter: dropshadow(color=#26427e, offx=1, offy=0);
88
+ border:1px solid #24417c;
89
+ background: #5582c9; /* Old browsers */
90
+ background: -moz-linear-gradient(top, #5582c9 0%, #33539a 100%); /* FF3.6+ */
91
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5582c9), color-stop(100%,#33539a)); /* Chrome,Safari4+ */
92
+ background: -webkit-linear-gradient(top, #5582c9 0%,#33539a 100%); /* Chrome10+,Safari5.1+ */
93
+ background: -o-linear-gradient(top, #5582c9 0%,#33539a 100%); /* Opera 11.10+ */
94
+ background: -ms-linear-gradient(top, #5582c9 0%,#33539a 100%); /* IE10+ */
95
+ background: linear-gradient(top, #5582c9 0%,#33539a 100%); /* W3C */
96
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5582c9', endColorstr='#33539a',GradientType=0 ); /* IE6-9 */
97
+ box-shadow: 0 1px 4px #DDDDDD, 0 1px 0 #80a1d6 inset;
98
+ }
99
+ #googleplus .share {
100
+ text-shadow: 1px 0px 0px #222222;
101
+ filter: dropshadow(color=#222222, offx=1, offy=0);
102
+ border:1px solid #262626;
103
+ background: #6d6d6d; /* Old browsers */
104
+ background: -moz-linear-gradient(top, #6d6d6d 0%, #434343 100%); /* FF3.6+ */
105
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6d6d6d), color-stop(100%,#434343)); /* Chrome,Safari4+ */
106
+ background: -webkit-linear-gradient(top, #6d6d6d 0%,#434343 100%); /* Chrome10+,Safari5.1+ */
107
+ background: -o-linear-gradient(top, #6d6d6d 0%,#434343 100%); /* Opera 11.10+ */
108
+ background: -ms-linear-gradient(top, #6d6d6d 0%,#434343 100%); /* IE10+ */
109
+ background: linear-gradient(top, #6d6d6d 0%,#434343 100%); /* W3C */
110
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6d6d6d', endColorstr='#434343',GradientType=0 ); /* IE6-9 */
111
+ box-shadow: 0 1px 4px #DDDDDD, 0 1px 0 #929292 inset;
112
+ }
@@ -0,0 +1,99 @@
1
+ #example2{
2
+ float:left;
3
+ margin:80px 42% 0 42%;
4
+ }
5
+ .sharrre .box{
6
+ background:#6f838c;
7
+ background:-webkit-gradient(linear,left top,left bottom,color-stop(#6f838c,0),color-stop(#4d5e66,1));
8
+ background:-webkit-linear-gradient(top, #6f838c 0%, #4d5e66 100%);
9
+ background:-moz-linear-gradient(top, #6f838c 0%, #4d5e66 100%);
10
+ background:-o-linear-gradient(top, #6f838c 0%, #4d5e66 100%);
11
+ background:linear-gradient(top, #6f838c 0%, #4d5e66 100%);
12
+ filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#6f838c', endColorstr='#4d5e66',GradientType=0 );
13
+ -webkit-box-shadow:0 1px 1px #d3d3d3;
14
+ -moz-box-shadow:0 1px 1px #d3d3d3;
15
+ box-shadow:0 1px 1px #d3d3d3;
16
+ height:22px;
17
+ display:inline-block;
18
+ position:relative;
19
+ padding:0px 55px 0 8px;
20
+ -webkit-border-radius:3px;
21
+ -moz-border-radius:3px;
22
+ border-radius:3px;
23
+ font-size:12px;
24
+ float:left;
25
+ clear:both;
26
+ overflow:hidden;
27
+ -webkit-transition:all 0.3s linear;
28
+ -moz-transition:all 0.3s linear;
29
+ -o-transition:all 0.3s linear;
30
+ transition:all 0.3s linear;
31
+ }
32
+ .sharrre .left{
33
+ line-height:22px;
34
+ display:block;
35
+ white-space:nowrap;
36
+ text-shadow:0px 1px 1px rgba(255,255,255,0.3);
37
+ color:#ffffff;
38
+ -webkit-transition:all 0.2s linear;
39
+ -moz-transition:all 0.2s linear;
40
+ -o-transition:all 0.2s linear;
41
+ transition:all 0.2s linear;
42
+ }
43
+ .sharrre .middle{
44
+ position:absolute;
45
+ height:22px;
46
+ top:0px;
47
+ right:30px;
48
+ width:0px;
49
+ background:#63707e;
50
+ text-shadow:0px -1px 1px #363f49;
51
+ color:#fff;
52
+ white-space:nowrap;
53
+ text-align:left;
54
+ overflow:hidden;
55
+ -webkit-box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;
56
+ -moz-box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;
57
+ box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;
58
+ -webkit-transition:width 0.3s linear;
59
+ -moz-transition:width 0.3s linear;
60
+ -o-transition:width 0.3s linear;
61
+ transition:width 0.3s linear;
62
+ }
63
+ .sharrre .middle a{
64
+ color:#fff;
65
+ font-weight:bold;
66
+ padding:0 9px 0 9px;
67
+ text-align:center;
68
+ float:left;
69
+ line-height:22px;
70
+ -webkit-box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;
71
+ -moz-box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;
72
+ box-shadow:-1px 0px 1px rgba(255,255,255,0.4), 1px 1px 2px rgba(0,0,0,0.2) inset;
73
+ }
74
+ .sharrre .right{
75
+ position:absolute;
76
+ right:0px;
77
+ top:0px;
78
+ height:100%;
79
+ width:45px;
80
+ text-align:center;
81
+ line-height:22px;
82
+ color:#4b5d61;
83
+ background:#f1faf9;
84
+ background:-webkit-gradient(linear,left top,left bottom,color-stop(#f1faf9,0),color-stop(#bacfd2,1));
85
+ background:-webkit-linear-gradient(top, #f1faf9 0%, #bacfd2 100%);
86
+ background:-moz-linear-gradient(top, #f1faf9 0%, #bacfd2 100%);
87
+ background:-o-linear-gradient(top, #f1faf9 0%, #bacfd2 100%);
88
+ background:linear-gradient(top, #f1faf9 0%, #bacfd2 100%);
89
+ filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1faf9', endColorstr='#bacfd2',GradientType=0 );
90
+ }
91
+ .sharrre .box:hover{
92
+ padding-right:130px;
93
+ }
94
+ .sharrre .middle a:hover{
95
+ text-decoration:none;
96
+ }
97
+ .sharrre .box:hover .middle{
98
+ width:90px;
99
+ }
@@ -0,0 +1,48 @@
1
+ #example3{
2
+ float:left;
3
+ margin:63px 33% 0 33%;
4
+ }
5
+ #shareme .box{
6
+ float:left;
7
+ margin:5% 8% 0 8%;
8
+ width:100%;
9
+ }
10
+ #shareme .box a{
11
+ color:#404040;
12
+ text-shadow: 0 1px 1px rgba(167,167,167,.4);
13
+ }
14
+ #shareme .box a:hover{
15
+ text-decoration:none;
16
+ }
17
+ #shareme .count {
18
+ font-weight:bold;
19
+ font-size:50px;
20
+ float:left;
21
+ border-right:2px solid #57b8d1;
22
+ line-height:40px;
23
+ padding-right:10px
24
+ }
25
+ #shareme .share {
26
+ float:left;
27
+ margin-left:10px;
28
+ font-size:20px;
29
+ width:82px;
30
+ }
31
+ #shareme .buttons {
32
+ position: absolute;
33
+ width:294px;
34
+ background-color:#fff;
35
+ border: 1px solid rgba(0,0,0,.2);
36
+ padding:10px;
37
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1);
38
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.1);
39
+ box-shadow: 0 1px 2px rgba(0,0,0,.1);
40
+ }
41
+ #shareme .button {
42
+ float:left;
43
+ max-width:50px;
44
+ margin:0 10px 0 0;
45
+ }
46
+ #shareme .facebook {
47
+ margin:0 4px 0 0;
48
+ }
@@ -0,0 +1,15 @@
1
+ #example5{
2
+ float:left;
3
+ margin:68px 25% 0 25%;
4
+ }
5
+ .sharrre .button{
6
+ float:left;
7
+ width:60px;
8
+ }
9
+ /*
10
+ #twitter { float: left;
11
+ margin: 0 0;}
12
+ #googleplus { float: left;
13
+ margin: 0 0;}
14
+ #facebook {float: left;
15
+ margin: 0 0;} */