sharing_tags 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -3
  3. data/Todo.md +7 -5
  4. data/app/assets/images/sharing_tags/icons/facebook.svg +8 -11
  5. data/app/assets/images/sharing_tags/icons/google.svg +3 -10
  6. data/app/assets/images/sharing_tags/icons/line.svg +4 -7
  7. data/app/assets/images/sharing_tags/icons/linkedin.svg +5 -10
  8. data/app/assets/images/sharing_tags/icons/odnoklassniki.svg +13 -9
  9. data/app/assets/images/sharing_tags/icons/twitter.svg +19 -12
  10. data/app/assets/images/sharing_tags/icons/vkontakte.svg +9 -7
  11. data/app/assets/javascripts/sharing_tags/icons.js.coffee.erb +15 -0
  12. data/app/assets/javascripts/sharing_tags/icons_loader.js.coffee.erb +6 -0
  13. data/app/assets/javascripts/sharing_tags/init.js.coffee.erb +10 -6
  14. data/app/assets/javascripts/sharing_tags/share/facebook.js.coffee +24 -21
  15. data/app/assets/javascripts/sharing_tags/share.js.coffee +10 -0
  16. data/app/assets/javascripts/sharing_tags.js +1 -2
  17. data/app/assets/stylesheets/sharing_tags/icons.css.sass +88 -6
  18. data/app/assets/stylesheets/sharing_tags/wave_animation.css.sass +10 -9
  19. data/app/assets/stylesheets/sharing_tags.css.sass +13 -5
  20. data/app/views/sharing_tags/button/_facebook.html.slim +1 -2
  21. data/app/views/sharing_tags/button/_google.html.slim +1 -2
  22. data/app/views/sharing_tags/button/_line.html.slim +1 -2
  23. data/app/views/sharing_tags/button/_linkedin.html.slim +1 -2
  24. data/app/views/sharing_tags/button/_odnoklassniki.html.slim +1 -2
  25. data/app/views/sharing_tags/button/_twitter.html.slim +1 -2
  26. data/app/views/sharing_tags/button/_vkontakte.html.slim +1 -2
  27. data/app/views/sharing_tags/buttons.html.slim +1 -1
  28. data/lib/generators/sharing_tags/install/install_generator.rb +5 -0
  29. data/lib/sharing_tags/action_view/button_helper.rb +10 -8
  30. data/lib/sharing_tags/asset_file.rb +13 -0
  31. data/lib/sharing_tags/configuration.rb +13 -0
  32. data/lib/sharing_tags/engine.rb +13 -6
  33. data/lib/sharing_tags/finds_asset_paths.rb +12 -0
  34. data/lib/sharing_tags/network.rb +1 -1
  35. data/lib/sharing_tags/version.rb +1 -1
  36. data/lib/sharing_tags.rb +3 -0
  37. data/spec/helpers/button_helper_spec.rb +14 -5
  38. data/spec/javascripts/sharing_tags/share/facebook_spec.coffee +2 -2
  39. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d3d74205d99ac0223a665f135dee84293f0d7b6
4
- data.tar.gz: 49f37b2d8d0f6228668b93ee9bf91e4cc2714afb
3
+ metadata.gz: d575f38fc2c99c50b2376cffcf4288ac2f7418f5
4
+ data.tar.gz: 63845f9e807dfcfa3ff174f751c309d4f8542b23
5
5
  SHA512:
6
- metadata.gz: c30b282e88b2a3560fd28457dcb800d4ce63bd967393b15281e3be280d2ebe625cb46b8defb00c8c86b62b552d18a747ea6aded7d9a870a11ab738e12b45530d
7
- data.tar.gz: 513274eca7a80355e48695f253125c143249a90f02dc3363b4378f8974691d4905d683a06ff4854809400922875d8ea472a7987275300a8313c5dd7af7162f64
6
+ metadata.gz: e62ae92452330b61c1b7b4119719588be8530c6dda46f89beb64cff083c5d63509f4a70b7c52c15bd3574851db10bb8e283c0b0cf182636385bb798dc5a9b239
7
+ data.tar.gz: bc38f8c676610699e3abc6692ebd6db6d316f476a9a15e271e182fda4f29b95800ab5f8ec57a589640ec8f08b4260f23e3df2ab9664cf771df26653779248275
data/README.md CHANGED
@@ -120,6 +120,38 @@ jQuery("body").on "sharing_tags.shared", ({network, context, target})->
120
120
  +create_wave_animation_on_sharing_buttons(4)
121
121
  '''
122
122
 
123
+
124
+ ## Recommendations
125
+ Facebook sharing images 1200x630 and add mimetype and size
126
+ Best way for sharing sharer provider, but after sharing you stay on the post page
127
+ + big images
128
+ - after sharing stay on the post page in FB browser
129
+ - can check sharing result in response
130
+
131
+ fb_ui sharing everywhere
132
+ + correct natively share in FB browser
133
+ + return to page where called sharing
134
+ + can check sharing result in responce
135
+ - small images in the posts
136
+ - have to create facebook application for app_id
137
+ - doesn't work for iOS Chrome browser
138
+
139
+ dialog
140
+ + can redirect to another page after sharing
141
+ + can check sharing result in responce
142
+ - small images in the posts
143
+
144
+ fb_ui_feed
145
+ + can change sharing info without changing meta tags
146
+ + big images
147
+ + can check sharing result in responce
148
+ - doesn't work in iOS FB browser
149
+ - long time for load external big image
150
+
151
+
152
+ Vkontakte sharing images 537x240
153
+
154
+
123
155
  ## Tools for testing
124
156
 
125
157
  Facebook Debugger (https://developers.facebook.com/tools/debug)
@@ -135,9 +167,6 @@ Google Structured Data Testing Tool (http://www.google.com/webmasters/tools/rich
135
167
  4. Push to the branch (`git push origin my-new-feature`)
136
168
  5. Create a new Pull Request
137
169
 
138
- ## References
139
- Icons made by [Jorge Calvo García](https://www.behance.net/gallery/FREE-Flat-Social-Icons-EPS/8786901)
140
-
141
170
 
142
171
  ## Copyright
143
172
  Copyright © 2015 Anatolii Kovalchuk. See LICENSE.txt for further details.
data/Todo.md CHANGED
@@ -2,13 +2,15 @@
2
2
 
3
3
  * Write specs views/js/requests
4
4
  * Add language variable
5
+ * Add recommendation about image size and length of text for development mode. (Twitter message lenght, fb_app id)
6
+ * Define network list
7
+ * Add auto link params. Context name -> utm_medium => (short_context_name || context_name), utm_source => (short_network_name || network_name)
8
+ * Add version to sharing tags: append ?version=1 to links and assets
9
+ * Add debug param
5
10
  * Init context running helper class on init railie (should work in console)
6
- * Run js and ruby specs by default rake task
7
11
  * Correct merge values in default context and defined
8
- * Define network list
9
12
  * Add to install task sample of view and require assets
10
- * Add recommendation about image size and length of text
11
- * Add version to sharing tags: append ?version=1 to links and assets
12
13
  * Update facebook info for fetching urls
13
14
  * Add twitter card settings
14
- * Add sharing through Vk js SDK
15
+ * Add sharing through Vk js SDK
16
+ * Generate sass styles only for choiced icons
@@ -1,12 +1,9 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg width="35px" height="35px" viewBox="0 0 35 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
- <title>Facebook</title>
4
- <desc>Facebook social icon</desc>
5
- <defs></defs>
6
- <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
7
- <g sketch:type="MSLayerGroup">
8
- <path d="M17.605,34.085 C26.999,34.085 34.614,26.471 34.614,17.077 C34.614,7.685 26.999,0.07 17.605,0.07 C8.212,0.07 0.598,7.685 0.598,17.077 C0.598,26.471 8.212,34.085 17.605,34.085" id="Fill-172" fill="#5071AA" sketch:type="MSShapeGroup"></path>
9
- <path d="M13.502,14.198 L15.261,14.198 L15.261,12.489 C15.261,11.735 15.28,10.573 15.827,9.853 C16.404,9.091 17.195,8.573 18.557,8.573 C20.775,8.573 21.709,8.889 21.709,8.889 L21.27,11.494 C21.27,11.494 20.537,11.283 19.853,11.283 C19.169,11.283 18.557,11.528 18.557,12.211 L18.557,14.198 L21.361,14.198 L21.165,16.742 L18.557,16.742 L18.557,25.581 L15.261,25.581 L15.261,16.742 L13.502,16.742 L13.502,14.198" id="Fill-173" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
10
- </g>
11
- </g>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77 76" version="1.1" width="100%" height="100%">
2
+ <g opacity="1">
3
+ <desc shapeID="1" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-37.2232,-37.0244,74.4463,74.0487)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.6712,38.5094)" pers-center="0,0" pers-size="0,0" pers-start="0,0" pers-end="0,0" locked="0" mesh="" flag=""/>
4
+ <path class="fb-sharing-tags-icon-fill sharing-tags-icon-fill" d="M38.6704 1.48506C59.2277 1.48506 75.8943 18.0614 75.8943 38.5094 75.8943 58.959 59.2277 75.5338 38.6704 75.5338 18.113 75.5338 1.44801 58.959 1.44801 38.5094 1.44801 18.0614 18.113 1.48506 38.6704 1.48506Z" style=""/>
5
+
6
+ <desc shapeID="2" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-9.85016,-21.2135,19.7003,42.4269)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.6712,38.5093)" pers-center="0,0" pers-size="0,0" pers-start="0,0" pers-end="0,0" locked="0" mesh="" flag=""/>
7
+ <path class="fb-sharing-tags-icon-in sharing-tags-icon-in" d="M33.1581 38.5352C33.2668 38.6709 33.2052 39.6154 33.2052 39.793L33.2117 59.7227 41.8988 59.7227C41.9491 54.4771 41.9004 49.0926 41.9004 43.8228 41.9004 43.7469 41.8826 38.7161 41.9069 38.6111 41.9232 38.5433 41.9248 38.5514 41.9426 38.5223 41.954 38.5239 47.4695 38.5675 47.661 38.5207L47.7584 38.4933 48.5213 31.2198 41.928 31.2182C41.9021 30.1445 41.9329 29.0402 41.9345 27.9617 41.9345 26.9785 41.9102 25.7643 42.4994 25.2235L48.4872 24.6245 48.4775 17.3284C47.3445 17.259 46.0005 17.322 44.8449 17.322 43.6405 17.322 42.4231 17.2961 41.2398 17.3752 38.9852 17.5238 37.1641 18.1922 35.8477 19.3078 33.9388 22.3512 33.2003 19.7373 33.1857 31.2214L28.821 31.2231 28.8291 38.5304 33.1581 38.5352Z" style=""/>
8
+ </g>
12
9
  </svg>
@@ -1,12 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg width="35px" height="35px" viewBox="0 0 35 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
- <title>Google+ Share</title>
4
- <desc>Google+ social icon</desc>
5
- <defs></defs>
6
- <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
7
- <g id="Google+" sketch:type="MSLayerGroup">
8
- <path d="M17.63,34.085 C27.024,34.085 34.638,26.47 34.638,17.077 C34.638,7.684 27.024,0.07 17.63,0.07 C8.237,0.07 0.622,7.684 0.622,17.077 C0.622,26.47 8.237,34.085 17.63,34.085" id="Fill-176" fill="#3E4140" sketch:type="MSShapeGroup"></path>
9
- <path d="M25.825,15.835 L23.774,15.835 L23.774,13.784 L22.124,13.784 L22.124,15.835 L20.074,15.835 L20.074,17.485 L22.124,17.485 L22.124,19.536 L23.774,19.536 L23.774,17.485 L25.825,17.485 L25.825,15.835 L25.825,15.835 Z M18.161,18.319 C17.685,17.982 16.775,17.162 16.775,16.68 C16.775,16.115 16.937,15.838 17.786,15.174 C18.657,14.492 19.274,13.535 19.274,12.423 C19.274,11.098 18.684,9.807 17.576,9.38 L19.246,9.38 L20.425,8.529 L15.157,8.529 C12.796,8.529 10.574,10.318 10.574,12.389 C10.574,14.507 12.184,16.217 14.586,16.217 C14.753,16.217 14.915,16.213 15.074,16.202 C14.918,16.5 14.806,16.837 14.806,17.185 C14.806,17.774 15.123,18.251 15.523,18.641 C15.221,18.641 14.928,18.65 14.611,18.65 C11.686,18.65 9.434,20.512 9.434,22.444 C9.434,24.346 11.902,25.536 14.827,25.536 C18.161,25.536 20.003,23.645 20.003,21.742 C20.003,20.216 19.553,19.303 18.161,18.319 L18.161,18.319 Z M15.348,15.679 C13.991,15.639 12.701,14.161 12.467,12.38 C12.232,10.597 13.143,9.234 14.5,9.274 C15.856,9.315 17.146,10.744 17.38,12.526 C17.614,14.308 16.705,15.72 15.348,15.679 L15.348,15.679 Z M14.816,24.695 C12.794,24.695 11.334,23.416 11.334,21.878 C11.334,20.371 13.146,19.117 15.167,19.139 C15.639,19.144 16.079,19.22 16.478,19.349 C17.575,20.113 18.362,20.543 18.584,21.413 C18.626,21.59 18.649,21.771 18.649,21.956 C18.649,23.494 17.659,24.695 14.816,24.695 L14.816,24.695 Z" id="Fill-177" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
10
- </g>
11
- </g>
2
+ <svg width="100%" height="100%" viewBox="0 0 35 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <path class="gl-sharing-tags-icon-fill sharing-tags-icon-fill" d="M17.63,34.085 C27.024,34.085 34.638,26.47 34.638,17.077 C34.638,7.684 27.024,0.07 17.63,0.07 C8.237,0.07 0.622,7.684 0.622,17.077 C0.622,26.47 8.237,34.085 17.63,34.085"></path>
4
+ <path class="gl-sharing-tags-icon-in sharing-tags-icon-in" d="M25.825,15.835 L23.774,15.835 L23.774,13.784 L22.124,13.784 L22.124,15.835 L20.074,15.835 L20.074,17.485 L22.124,17.485 L22.124,19.536 L23.774,19.536 L23.774,17.485 L25.825,17.485 L25.825,15.835 L25.825,15.835 Z M18.161,18.319 C17.685,17.982 16.775,17.162 16.775,16.68 C16.775,16.115 16.937,15.838 17.786,15.174 C18.657,14.492 19.274,13.535 19.274,12.423 C19.274,11.098 18.684,9.807 17.576,9.38 L19.246,9.38 L20.425,8.529 L15.157,8.529 C12.796,8.529 10.574,10.318 10.574,12.389 C10.574,14.507 12.184,16.217 14.586,16.217 C14.753,16.217 14.915,16.213 15.074,16.202 C14.918,16.5 14.806,16.837 14.806,17.185 C14.806,17.774 15.123,18.251 15.523,18.641 C15.221,18.641 14.928,18.65 14.611,18.65 C11.686,18.65 9.434,20.512 9.434,22.444 C9.434,24.346 11.902,25.536 14.827,25.536 C18.161,25.536 20.003,23.645 20.003,21.742 C20.003,20.216 19.553,19.303 18.161,18.319 L18.161,18.319 Z M15.348,15.679 C13.991,15.639 12.701,14.161 12.467,12.38 C12.232,10.597 13.143,9.234 14.5,9.274 C15.856,9.315 17.146,10.744 17.38,12.526 C17.614,14.308 16.705,15.72 15.348,15.679 L15.348,15.679 Z M14.816,24.695 C12.794,24.695 11.334,23.416 11.334,21.878 C11.334,20.371 13.146,19.117 15.167,19.139 C15.639,19.144 16.079,19.22 16.478,19.349 C17.575,20.113 18.362,20.543 18.584,21.413 C18.626,21.59 18.649,21.771 18.649,21.956 C18.649,23.494 17.659,24.695 14.816,24.695 L14.816,24.695 Z"></path>
12
5
  </svg>
@@ -1,17 +1,14 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg width="34px" height="34px" viewBox="0 0 34 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
- <title>Line Share</title>
4
- <desc>Line share social icon</desc>
5
- <defs></defs>
6
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
2
+ <svg width="100%" height="100%" viewBox="0 0 34 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
4
  <g id="sharing-line" sketch:type="MSLayerGroup" fill="#00C300">
8
- <g id="Text-Line" transform="translate(9.000000, 12.000000)" sketch:type="MSShapeGroup">
5
+ <g transform="translate(9.000000, 12.000000)">
9
6
  <path d="M0.971744792,0.726627604 C0.401888021,0.737890625 0.354361979,1.19277344 0.354361979,1.19277344 L0.356404968,2.4078099 L0.362955729,6.30377604 C0.362955729,6.30377604 0.456342387,6.58223194 0.561393229,6.66360677 C0.668082839,6.74625103 0.875390625,6.82936198 0.875390625,6.82936198 L4.0546875,6.83938802 C4.0546875,6.83938802 4.52233887,6.7355835 4.52484131,6.26477051 C4.52734375,5.79395752 4.03085937,5.68496094 4.03085937,5.68496094 L1.52288818,5.67376709 L1.51959229,1.34576416 C1.51959229,1.34576416 1.54160156,0.715364583 0.971744792,0.726627604 Z" id="L"></path>
10
7
  <path d="M4.69470215,1.24151611 C4.69470215,1.24151611 4.83319092,0.711669922 5.29388428,0.715148926 C5.75457764,0.71862793 5.88714646,1.22371826 5.87897135,1.24003906 C5.86157932,1.27476057 5.87518311,6.35131836 5.87518311,6.35131836 C5.87518311,6.35131836 5.78442383,6.86627197 5.28637695,6.86218262 C4.78833008,6.85809326 4.70031738,6.37780762 4.70031738,6.37780762 C4.70031738,6.37780762 4.69470215,1.24151611 4.69470215,1.24151611 Z" id="I"></path>
11
8
  <path d="M7.44927979,6.88946533 C6.99127197,6.91497803 6.83105469,6.42926025 6.83105469,6.42926025 L6.82220459,1.50201416 C6.82220459,1.50201416 7.00665283,0.895996094 7.52923584,0.768066406 C8.05181885,0.640136719 8.46630859,1.02386475 8.46630859,1.02386475 L10.9348145,5.23901367 L10.9231567,1.23077393 C10.9231567,1.23077393 11.0747681,0.702941895 11.5390015,0.730957031 C12.0032349,0.758972168 12.0757446,1.18756104 12.0757446,1.18756104 L12.0704346,6.07739258 C12.0704346,6.07739258 12.0039673,6.57208252 11.6652832,6.74090576 C11.3265991,6.909729 11.1990569,6.87597953 11.0098877,6.84259033 C10.8095712,6.8072336 10.4968262,6.53466797 10.4968262,6.53466797 L8.00262451,2.28527832 L8.00219727,6.39733887 C8.00219727,6.39733887 7.9072876,6.86395264 7.44927979,6.88946533 Z" id="N"></path>
12
9
  <path d="M14.0929565,1.86358643 L14.0742188,3.25 L16.572998,3.25280762 C16.572998,3.25280762 17.0330811,3.31646729 17.0174561,3.76977539 C17.0018311,4.2230835 16.6262817,4.30895996 16.6262817,4.30895996 L14.1148071,4.3079834 L14.0998535,5.71264648 L16.7276001,5.71807861 C16.7276001,5.71807861 17.1853027,5.83135986 17.1859741,6.25946045 C17.1866455,6.68756104 16.7555542,6.83752441 16.7555542,6.83752441 L13.6943359,6.84155273 C13.6943359,6.84155273 13.355835,6.81158447 13.1576538,6.61273193 C12.9594727,6.41387939 12.9058838,6.11120605 12.9058838,6.11120605 L12.9121094,1.48266602 C12.9121094,1.48266602 12.9414062,1.21789551 13.1646118,0.981018066 C13.3878174,0.744140625 13.8051147,0.738708496 13.8051147,0.738708496 C13.8051147,0.738708496 16.5845284,0.734094823 16.5891113,0.734130859 C16.5977452,0.734198749 17.1618652,0.742980957 17.1672363,1.27362061 C17.1726074,1.80426025 16.6489868,1.9052124 16.6442261,1.89501953 C16.6394653,1.88482666 14.0929565,1.86358643 14.0929565,1.86358643 Z" id="E"></path>
13
10
  </g>
14
- <path d="M17,34 C26.3888407,34 34,26.3888407 34,17 C34,7.61115925 26.3888407,0 17,0 C7.61115925,0 0,7.61115925 0,17 C0,26.3888407 7.61115925,34 17,34 Z M4.78515625,16.4609375 C4.70825195,13.2805176 4.76909988,15.716733 4.76909988,15.716733 C4.72942692,11.3010072 8.20003643,6.96556743 12.5311551,6.13604162 C12.5311551,6.13604162 14.0456543,5.58618164 17.041748,5.58618164 C20.0378418,5.58618164 22.4520881,6.34805988 22.4520881,6.34805988 C26.7618571,7.28655924 30.0744315,11.6246145 29.8488105,16.0270278 C29.8488105,16.0270278 29.8434131,16.2101945 29.8268107,16.426616 C29.8202569,16.5120474 29.8109801,16.6038351 29.7978516,16.6936849 C29.7514648,17.0111491 29.351454,18.042289 29.351454,18.042289 C27.8746196,22.2101491 23.2710485,26.7099998 19.2115724,28.4037936 C19.2115724,28.4037936 20.0380348,27.6500552 19.1790109,28.4317985 C18.319987,29.2135417 15.8644825,30.3853404 16.1595052,28.1432292 C16.4710286,25.7757161 16.0007324,25.713623 13.9179687,25.3359375 C11.8352051,24.958252 13.1216659,25.1937262 13.1216659,25.1937262 C8.77318618,24.4429413 4.97036676,20.2665723 4.78515625,16.4609375 C4.78515625,16.4609375 4.86206055,19.6413574 4.78515625,16.4609375 Z" id="Oval-1" sketch:type="MSShapeGroup"></path>
11
+ <path d="M17,34 C26.3888407,34 34,26.3888407 34,17 C34,7.61115925 26.3888407,0 17,0 C7.61115925,0 0,7.61115925 0,17 C0,26.3888407 7.61115925,34 17,34 Z M4.78515625,16.4609375 C4.70825195,13.2805176 4.76909988,15.716733 4.76909988,15.716733 C4.72942692,11.3010072 8.20003643,6.96556743 12.5311551,6.13604162 C12.5311551,6.13604162 14.0456543,5.58618164 17.041748,5.58618164 C20.0378418,5.58618164 22.4520881,6.34805988 22.4520881,6.34805988 C26.7618571,7.28655924 30.0744315,11.6246145 29.8488105,16.0270278 C29.8488105,16.0270278 29.8434131,16.2101945 29.8268107,16.426616 C29.8202569,16.5120474 29.8109801,16.6038351 29.7978516,16.6936849 C29.7514648,17.0111491 29.351454,18.042289 29.351454,18.042289 C27.8746196,22.2101491 23.2710485,26.7099998 19.2115724,28.4037936 C19.2115724,28.4037936 20.0380348,27.6500552 19.1790109,28.4317985 C18.319987,29.2135417 15.8644825,30.3853404 16.1595052,28.1432292 C16.4710286,25.7757161 16.0007324,25.713623 13.9179687,25.3359375 C11.8352051,24.958252 13.1216659,25.1937262 13.1216659,25.1937262 C8.77318618,24.4429413 4.97036676,20.2665723 4.78515625,16.4609375 C4.78515625,16.4609375 4.86206055,19.6413574 4.78515625,16.4609375 Z"></path>
15
12
  </g>
16
13
  </g>
17
14
  </svg>
@@ -1,12 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg width="35px" height="35px" viewBox="0 0 35 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
- <title>Linkedin Share</title>
4
- <desc>Linkedin share social icon</desc>
5
- <defs></defs>
6
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
7
- <g id="linkedin" sketch:type="MSLayerGroup">
8
- <path d="M17.557,34.109 C26.952,34.109 34.565,26.493 34.565,17.1 C34.565,7.708 26.952,0.093 17.557,0.093 C8.164,0.093 0.549,7.708 0.549,17.1 C0.549,26.493 8.164,34.109 17.557,34.109" id="Fill-193" fill="#247CB4" sketch:type="MSShapeGroup"></path>
9
- <path d="M26.061,24.214 L22.302,24.214 L22.302,18.724 C22.302,17.287 21.714,16.306 20.421,16.306 C19.432,16.306 18.882,16.968 18.626,17.606 C18.53,17.835 18.545,18.154 18.545,18.473 L18.545,24.214 L14.821,24.214 C14.821,24.214 14.869,14.489 14.821,13.605 L18.545,13.605 L18.545,15.27 C18.765,14.542 19.955,13.503 21.854,13.503 C24.21,13.503 26.061,15.029 26.061,18.315 L26.061,24.214 L26.061,24.214 Z M11.055,12.278 L11.031,12.278 C9.831,12.278 9.053,11.467 9.053,10.439 C9.053,9.391 9.854,8.597 11.078,8.597 C12.301,8.597 13.053,9.389 13.077,10.436 C13.077,11.464 12.301,12.278 11.055,12.278 L11.055,12.278 Z M9.482,13.605 L12.797,13.605 L12.797,24.214 L9.482,24.214 L9.482,13.605 Z" id="Fill-194" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
10
- </g>
11
- </g>
2
+ <svg width="100%" height="100%" viewBox="0 0 35 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <desc shapeID="1" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-37.2232,-37.0244,74.4463,74.0487)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.6712,38.5094)" pers-center="0,0" pers-size="0,0" pers-start="0,0" pers-end="0,0" locked="0" mesh="" flag=""/>
4
+ <path class="li-sharing-tags-icon-fill sharing-tags-icon-fill" d="M17.557,34.109 C26.952,34.109 34.565,26.493 34.565,17.1 C34.565,7.708 26.952,0.093 17.557,0.093 C8.164,0.093 0.549,7.708 0.549,17.1 C0.549,26.493 8.164,34.109 17.557,34.109"></path>
5
+
6
+ <path class="li-sharing-tags-icon-in sharing-tags-icon-in" d="M26.061,24.214 L22.302,24.214 L22.302,18.724 C22.302,17.287 21.714,16.306 20.421,16.306 C19.432,16.306 18.882,16.968 18.626,17.606 C18.53,17.835 18.545,18.154 18.545,18.473 L18.545,24.214 L14.821,24.214 C14.821,24.214 14.869,14.489 14.821,13.605 L18.545,13.605 L18.545,15.27 C18.765,14.542 19.955,13.503 21.854,13.503 C24.21,13.503 26.061,15.029 26.061,18.315 L26.061,24.214 L26.061,24.214 Z M11.055,12.278 L11.031,12.278 C9.831,12.278 9.053,11.467 9.053,10.439 C9.053,9.391 9.854,8.597 11.078,8.597 C12.301,8.597 13.053,9.389 13.077,10.436 C13.077,11.464 12.301,12.278 11.055,12.278 L11.055,12.278 Z M9.482,13.605 L12.797,13.605 L12.797,24.214 L9.482,24.214 L9.482,13.605 Z"></path>
12
7
  </svg>
@@ -1,11 +1,15 @@
1
- <?xml version="1.0"?>
2
- <svg width="35px" height="35px" viewBox="0 0 116 117" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>Odnoklassniki Share</title>
4
- <desc>Odnoklassniki share social icon</desc>
5
- <g name="Layer 1" opacity="1">
6
- <g >
7
- <desc shapeID="1" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-57.7161,-57.9851,115.432,115.97)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,57.9747,58.5361)" pers-center="0,0" pers-size="0,0" pers-start="0,0" pers-end="0,0" locked="0" mesh="" flag=""/>
8
- <path id="shapePath1" d="M57.9768,0.551071 C26.1,0.551071 0.258617,26.5124 0.258617,58.5372 C0.258617,90.562 26.1,116.521 57.9768,116.521 C89.8515,116.521 115.691,90.562 115.691,58.5372 C115.691,26.5124 89.8515,0.551071 57.9768,0.551071 M36.905,35.9014 C38.6963,24.0332 50.1119,18.1194 59.7808,19.7779 C71.1666,21.7314 77.3658,32.251 75.9894,41.9435 C72.2729,68.1955 32.9523,62.0509 36.905,35.9014 M76.9255,93.8705 C73.0749,97.8094 68.9648,94.1846 65.9694,91.2908 C63.3953,88.803 60.3063,85.6847 57.613,83.5667 C50.5863,91.0087 44.8785,99.9467 39.1069,95.0011 C32.1929,89.068 45.7699,80.3736 49.0822,75.2485 C45.6337,74.4748 39.8238,72.594 37.0922,70.5059 C34.3522,68.4071 33.848,63.5918 37.1582,61.2024 C41.1279,58.3342 43.7914,61.4952 48.4802,63.0126 C66.2353,68.7533 73.1047,52.6683 78.3593,62.0979 C82.8396,70.1404 67.5926,73.6904 65.7673,74.9322 C73.0962,81.9766 82.4865,88.1917 76.9255,93.8705 M55.9239,31.1973 C45.2486,31.9518 46.0358,47.4747 56.7791,47.3401 C67.3139,47.2118 67.1884,30.4022 55.9239,31.1973 Z" style="stroke:none;fill-rule:evenodd;fill:#ed812b;fill-opacity:1;"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 77 77" width="100%" height="100%">
2
+ <g opacity="1">
3
+ <g class="od-sharing-tags-icon-fill sharing-tags-icon-fill">
4
+ <desc shapeID="3" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-37.2232,-37.0244,74.4463,74.0487)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.0164,38.2439)" pers-center="0" pers-size="0" pers-start="0" pers-end="0" locked="0" mesh="" flag=""/>
5
+ <path d="M38.02 1.22C17.46 1.22 0.79 17.8 0.79 38.24 0.79 58.69 17.46 75.27 38.02 75.27 58.57 75.27 75.24 58.69 75.24 38.24 75.24 17.8 58.57 1.22 38.02 1.22Z" style=""/>
6
+ </g>
7
+ <g class="od-sharing-tags-icon-in sharing-tags-icon-in">
8
+ <desc shapeID="1" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-14.2935,-11.9282,28.587,23.8563)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.0161,50.509)" pers-center="0" pers-size="0" pers-start="0" pers-end="0" locked="0" mesh="" flag=""/>
9
+ <path d="M50.86 60.81C48.37 63.32 45.72 61.01 43.79 59.16 42.13 57.57 40.14 55.58 38.4 54.23 33.87 58.98 30.19 64.69 26.47 61.53 22.01 57.74 30.76 52.19 32.9 48.92 30.67 48.42 26.93 47.22 25.17 45.89 23.4 44.55 23.07 41.47 25.21 39.95 27.77 38.12 29.49 40.13 32.51 41.1 43.96 44.77 48.39 34.5 51.78 40.52 54.67 45.65 44.84 47.92 43.66 48.71 48.39 53.21 54.44 57.18 50.86 60.81Z" class="s0"/>
10
+
11
+ <desc shapeID="2" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-12.7541,-12.5579,25.5082,25.1157)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.0168,25.8778)" pers-center="0" pers-size="0" pers-start="0" pers-end="0" locked="0" mesh="" flag=""/>
12
+ <path d="M40.19 13.49C33.96 12.44 26.6 16.21 25.44 23.79 22.89 40.49 48.25 44.41 50.65 27.65 51.54 21.46 47.54 14.74 40.19 13.49M38.25 31.09C31.32 31.18 30.81 21.27 37.7 20.79 44.96 20.28 45.04 31.01 38.25 31.09Z" />
9
13
  </g>
10
14
  </g>
11
- </svg>
15
+ </svg>
@@ -1,12 +1,19 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg width="35px" height="35px" viewBox="0 0 35 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
- <title>Twitter Share</title>
4
- <desc>Twitter share social icon</desc>
5
- <defs></defs>
6
- <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
7
- <g sketch:type="MSLayerGroup">
8
- <path d="M17.558,34.085 C26.951,34.085 34.565,26.471 34.565,17.077 C34.565,7.685 26.951,0.07 17.558,0.07 C8.164,0.07 0.549,7.685 0.549,17.077 C0.549,26.471 8.164,34.085 17.558,34.085" id="Fill-168" fill="#68C6E1" sketch:type="MSShapeGroup"></path>
9
- <path d="M26.09,12.622 C25.464,12.9 24.79,13.088 24.083,13.172 C24.805,12.74 25.359,12.055 25.62,11.239 C24.944,11.639 24.197,11.93 23.399,12.086 C22.763,11.407 21.854,10.983 20.848,10.983 C18.919,10.983 17.354,12.548 17.354,14.478 C17.354,14.752 17.384,15.018 17.444,15.274 C14.539,15.128 11.964,13.738 10.239,11.621 C9.938,12.139 9.766,12.74 9.766,13.38 C9.766,14.592 10.383,15.662 11.321,16.289 C10.749,16.272 10.209,16.113 9.737,15.853 L9.737,15.896 C9.737,17.59 10.942,19.003 12.542,19.323 C12.249,19.405 11.94,19.446 11.621,19.446 C11.396,19.446 11.176,19.425 10.963,19.384 C11.408,20.772 12.698,21.783 14.228,21.81 C13.032,22.748 11.524,23.307 9.887,23.307 C9.605,23.307 9.326,23.291 9.053,23.259 C10.6,24.249 12.438,24.828 14.411,24.828 C20.841,24.828 24.356,19.503 24.356,14.884 C24.356,14.732 24.353,14.58 24.347,14.431 C25.03,13.938 25.623,13.323 26.09,12.622" id="Fill-169" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
10
- </g>
11
- </g>
12
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
3
+ viewBox="2 -1 74 79" enable-background="new 0 0 77 77" xml:space="preserve" width="100%" height="100%">
4
+ <path class="tw-sharing-tags-icon-fill sharing-tags-icon-fill" fill="none" stroke-miterlimit="10" d="M38.9,0.3C18.2,0.3,1.4,17.4,1.4,38.5s16.8,38.2,37.5,38.2
5
+ s37.5-17.1,37.5-38.2S59.6,0.3,38.9,0.3z"/>
6
+ <g>
7
+ <path class="tw-sharing-tags-icon-in sharing-tags-icon-in" d="M19.5,52.9c0.3,0,0.7,0.1,1,0.1c0.4,0,0.7,0,1,0c1,0,2-0.1,2.9-0.3c0.9-0.1,1.9-0.4,2.8-0.8
8
+ c0.9-0.3,1.7-0.7,2.5-1.2c0.8-0.5,1.6-0.9,2.4-1.6c-0.9,0-1.9-0.1-2.7-0.5c-0.9-0.3-1.6-0.8-2.4-1.2c-0.7-0.5-1.3-1.2-1.9-1.9
9
+ s-0.9-1.5-1.2-2.4c0.3,0,0.5,0.1,0.8,0.1c0.3,0,0.5,0,0.8,0c0.4,0,0.8,0,1.2-0.1c0.4,0,0.8-0.1,1.2-0.3c-0.9-0.3-1.9-0.5-2.8-1
10
+ c-0.8-0.5-1.6-1.2-2.3-1.9c-0.7-0.8-1-1.6-1.5-2.5c-0.4-0.9-0.5-1.9-0.5-2.9l0,0l0,0c0.5,0.3,1.2,0.5,1.9,0.8
11
+ c0.7,0.1,1.3,0.3,2,0.3c-1.2-0.8-2.1-1.7-2.8-3c-0.7-1.2-1-2.7-1-4.1c0-0.8,0.1-1.5,0.3-2.3c0.3-0.8,0.5-1.5,0.8-2
12
+ c1,1.3,2.3,2.5,3.6,3.6c1.3,1,2.8,2,4.3,2.8c1.5,0.8,3,1.3,4.8,1.9c1.7,0.5,3.4,0.8,5.2,0.8c0-0.3-0.1-0.7-0.1-0.9c0-0.3,0-0.7,0-1
13
+ c0-1.2,0.3-2.3,0.7-3.3c0.4-1,1-2,1.9-2.8s1.7-1.5,2.8-1.9c1-0.4,2.1-0.7,3.3-0.7s2.4,0.3,3.4,0.8s2,1.2,2.8,2
14
+ c0.9-0.1,2-0.5,2.9-0.8c0.9-0.4,1.9-0.8,2.7-1.3c-0.3,0.9-0.8,1.9-1.5,2.7c-0.7,0.8-1.5,1.5-2.4,2c0.9-0.1,1.7-0.3,2.5-0.5
15
+ c0.8-0.3,1.6-0.5,2.4-0.8c-0.5,0.8-1.2,1.6-2,2.4c-0.7,0.8-1.5,1.5-2.4,2.1c0,0.1,0,0.4,0,0.5c0,0.1,0,0.4,0,0.5
16
+ c0,2.8-0.5,5.7-1.6,8.6c-1,2.9-2.7,5.6-4.8,8c-2.1,2.4-4.7,4.3-7.7,5.7c-3,1.5-6.5,2.3-10.5,2.3c-1.2,0-2.4-0.1-3.6-0.3
17
+ c-1.2-0.1-2.4-0.4-3.4-0.8c-1-0.3-2.1-0.8-3.2-1.2C21.4,54.2,20.4,53.6,19.5,52.9z"/>
18
+ </g>
19
+ </svg>
@@ -1,10 +1,12 @@
1
- <?xml version="1.0"?>
2
- <svg width="35px" height="35px" viewBox="0 0 116 117" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <desc iVinci="yes" version="4.6" gridStep="20" showGrid="no" snapToGrid="no" codePlatform="0"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 76 77" width="100%" height="100%">
4
2
  <g id="Layer1" name="Layer 1" opacity="1">
5
- <g id="Shape1">
6
- <desc shapeID="1" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-57.4257,-58.156,114.851,116.312)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,58.335,58.5361)" pers-center="0,0" pers-size="0,0" pers-start="0,0" pers-end="0,0" locked="0" mesh="" flag=""/>
7
- <path id="shapePath1" d="M58.3361,0.380089 C26.6188,0.380089 0.909306,26.4184 0.909306,58.5372 C0.909306,90.656 26.6188,116.692 58.3361,116.692 C90.0469,116.692 115.761,90.656 115.761,58.5372 C115.761,26.4184 90.0469,0.380089 58.3361,0.380089 M86.4687,64.4702 C91.2978,68.9371 94.6655,72.5769 96.5716,75.3852 C97.463,76.7894 97.7481,78.0355 97.429,79.1212 C97.112,80.2048 96.3802,80.7476 95.2378,80.7476 L82.6564,81.3226 C80.8757,81.4508 78.7164,80.3651 76.1742,78.0675 C73.632,75.77 71.9173,73.8528 71.0259,72.3204 C70.5175,71.4292 69.5963,70.9162 68.2625,70.788 C66.9286,70.664 66.0691,71.3009 65.6883,72.7051 L65.3075,77.6849 C65.1799,78.7044 64.7991,79.4717 64.1651,79.9825 C63.5269,80.4933 62.9887,80.7797 62.544,80.846 C62.0973,80.9079 61.3676,81.0041 60.3507,81.1324 C57.0469,81.2606 54.1557,81.1003 51.6773,80.6515 C49.1989,80.2048 46.9418,79.2815 44.9101,77.8773 C42.8763,76.471 41.2552,75.195 40.0469,74.0452 C38.8407,72.8953 37.0941,71.0445 34.8071,68.4904 C28.5803,59.5545 23.9404,51.8283 20.8897,45.3182 C19.7452,42.7642 19.1113,40.5927 18.9815,38.806 C19.4921,38.2952 20.4451,37.9767 21.8428,37.8485 C23.2426,37.7202 25.2743,37.6882 27.942,37.7523 C30.6119,37.8164 32.1989,37.8485 32.7074,37.8485 C33.9796,37.7202 34.9965,38.4234 35.7602,39.9558 C38.9364,47.1028 42.0509,52.6576 45.0994,56.6158 C47.1332,58.5308 48.4692,58.2123 49.1032,55.6583 C49.3585,55.6583 49.4861,52.5315 49.4861,46.2757 C49.6116,42.3154 48.0225,39.8276 44.7208,38.806 C45.4824,36.7627 48.1501,35.7411 52.7261,35.7411 C53.8707,35.7411 55.2684,35.8052 56.9213,35.9313 C58.5722,36.0596 59.4614,36.1237 59.587,36.1237 C63.4014,36.1237 65.3075,37.654 65.3075,40.721 C65.3075,41.1035 65.2437,42.0311 65.1182,43.4973 C64.9905,44.9656 64.8948,46.3697 64.831,47.7119 C64.7672,49.052 64.7352,50.4562 64.7352,51.9245 C64.7352,53.3928 64.9267,54.6367 65.3075,55.6604 C65.6883,56.6799 66.1968,57.319 66.8328,57.5754 C67.5306,57.0625 68.2008,56.5837 68.8347,56.1392 C69.4708,55.6904 70.1388,54.9573 70.8366,53.9357 C71.5365,52.9141 72.0747,52.1468 72.4577,51.6381 C72.8385,51.1252 73.4086,50.1698 74.1723,48.7635 C74.9361,47.3593 75.3807,46.4659 75.5062,46.0834 C75.6339,45.7008 76.0785,44.7112 76.8401,43.1147 C77.6038,41.5182 77.9846,40.721 77.9846,40.721 L78.2697,40.146 C78.7781,38.9962 79.193,38.3272 79.51,38.1349 C79.8269,37.9446 80.6226,37.8485 81.8926,37.8485 L93.7124,37.8485 C95.1101,37.8485 95.9355,37.8805 96.1908,37.9446 C96.444,38.0088 96.8269,38.2952 97.3332,38.806 C98.2246,39.9558 97.429,42.4436 94.9506,46.2757 C92.4743,50.1057 90.0916,53.2966 87.8025,55.8528 C84.6263,59.4263 84.1817,62.2988 86.4687,64.4702 Z" style="stroke:none;fill-rule:evenodd;fill:#6b82a7;fill-opacity:1;"/>
3
+ <g class="vk-sharing-tags-icon-fill sharing-tags-icon-fill">
4
+ <desc shapeID="1" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-37.0349,-37.1342,74.0697,74.2683)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.2381,38.2899)" pers-center="0" pers-size="0" pers-start="0" pers-end="0" locked="0" mesh="" flag=""/>
5
+ <path d="M38.24 1.16C17.78 1.16 1.2 17.78 1.2 38.29 1.2 58.8 17.78 75.42 38.24 75.42 58.69 75.42 75.27 58.8 75.27 38.29 75.27 17.78 58.69 1.16 38.24 1.16Z" style=""/>
6
+ </g>
7
+ <g class="vk-sharing-tags-icon-in sharing-tags-icon-in">
8
+ <desc shapeID="2" type="0" basicInfo-basicType="0" basicInfo-roundedRectRadius="12" basicInfo-polygonSides="6" basicInfo-starPoints="5" bounding="rect(-25.3788,-13.9679,50.7576,27.9358)" text="" font-familyName="" font-pixelSize="20" font-bold="0" font-underline="0" font-alignment="1" strokeStyle="0" markerStart="0" markerEnd="0" shadowEnabled="0" shadowOffsetX="0" shadowOffsetY="2" shadowBlur="4" shadowOpacity="160" blurEnabled="0" blurRadius="4" transform="matrix(1,0,0,1,38.238,37.7028)" pers-center="0" pers-size="0" pers-start="0" pers-end="0" locked="0" mesh="" flag=""/>
9
+ <path d="M56.38 41.34C59.5 44.08 61.67 46.31 62.9 48.03 63.47 48.89 63.66 49.65 63.45 50.31 63.25 50.98 62.77 51.31 62.04 51.31L53.92 51.66C52.78 51.74 51.38 51.08 49.74 49.67 48.1 48.26 47 47.09 46.42 46.15 46.1 45.6 45.5 45.29 44.64 45.21 43.78 45.13 43.23 45.52 42.98 46.38L42.74 49.43C42.65 50.06 42.41 50.53 42 50.84 41.59 51.16 41.24 51.33 40.95 51.37 40.67 51.41 40.19 51.47 39.54 51.55 37.41 51.63 35.54 51.53 33.94 51.25 32.35 50.98 30.89 50.41 29.58 49.55 28.27 48.69 27.22 47.91 26.45 47.21 25.67 46.5 24.54 45.37 23.06 43.8 19.05 38.33 16.06 33.59 14.09 29.6 13.35 28.04 12.94 26.71 12.86 25.61 13.19 25.3 13.8 25.1 14.7 25.02 15.61 24.95 16.92 24.93 18.64 24.97 20.36 25.01 21.38 25.02 21.71 25.02 22.53 24.95 23.19 25.38 23.68 26.32 25.73 30.7 27.74 34.1 29.7 36.53 31.01 37.7 31.87 37.5 32.29 35.94 32.45 35.94 32.53 34.02 32.53 30.19 32.61 27.76 31.59 26.24 29.46 25.61 29.95 24.36 31.67 23.73 34.62 23.73 35.36 23.73 36.26 23.77 37.33 23.85 38.39 23.93 38.96 23.97 39.05 23.97 41.51 23.97 42.74 24.91 42.74 26.79 42.74 27.02 42.69 27.59 42.61 28.49 42.53 29.39 42.47 30.25 42.43 31.07 42.39 31.89 42.37 32.75 42.37 33.65 42.37 34.55 42.49 35.31 42.74 35.94 42.98 36.57 43.31 36.96 43.72 37.11 44.17 36.8 44.6 36.51 45.01 36.23 45.42 35.96 45.85 35.51 46.3 34.88 46.75 34.26 47.1 33.79 47.34 33.48 47.59 33.16 47.96 32.57 48.45 31.71 48.94 30.85 49.23 30.31 49.31 30.07 49.39 29.84 49.68 29.23 50.17 28.25 50.66 27.27 50.91 26.79 50.91 26.79L51.09 26.43C51.42 25.73 51.69 25.32 51.89 25.2 52.1 25.08 52.61 25.02 53.43 25.02L61.05 25.02C61.96 25.02 62.49 25.05 62.65 25.08 62.82 25.12 63.06 25.3 63.39 25.61 63.96 26.32 63.45 27.84 61.85 30.19 60.26 32.54 58.72 34.49 57.24 36.06 55.19 38.25 54.91 40.01 56.38 41.34Z" />
8
10
  </g>
9
11
  </g>
10
- </svg>
12
+ </svg>
@@ -0,0 +1,15 @@
1
+ update_icons = (icons_json)->
2
+ sharing_tags = $("@sharing_tags_share")
3
+
4
+ $.each sharing_tags, (_, sharing_link)->
5
+ link = $(sharing_link)
6
+ network = link.data('network')
7
+ link.html icon if icon = icons_json[network]
8
+
9
+
10
+ icons_json = {}
11
+ <% SharingTags::Network.lists.each do |network| %>
12
+ icons_json['<%= network %>'] = '<%= SharingTags::AssetFile.named("sharing_tags/icons/#{network}.svg") %>';
13
+ <% end %>
14
+
15
+ update_icons(icons_json)
@@ -0,0 +1,6 @@
1
+ script = document.createElement("script")
2
+ script.async = true
3
+ script.src = "<%= asset_url("sharing_tags/icons.js") %>"
4
+
5
+ (document.head || document.documentElement).appendChild(script)
6
+
@@ -1,11 +1,15 @@
1
1
  <% fb = SharingTags.config.current_context[:facebook] %>
2
2
 
3
3
  <% if fb && app_id = fb.attributes[:app_id] %>
4
+ try
5
+ @fbAsyncInit = ->
6
+ FB.init(
7
+ appId: '<%= app_id %>',
8
+ version: 'v2.3'
9
+ )
10
+
11
+ @SharingTags.FacebookShare.init()
12
+ catch error
13
+ console?.error("SharingTags.FacebookShare.init error: #{error}")
4
14
 
5
- @fbAsyncInit = ->
6
- FB.init(
7
- appId: '<%= app_id %>',
8
- version: 'v2.3'
9
- )
10
- @SharingTags.FacebookShare.init()
11
15
  <% end %>
@@ -38,7 +38,7 @@ class @SharingTags.FacebookShare extends @SharingTags.Share
38
38
 
39
39
  FB?.ui(
40
40
  method: 'share',
41
- href: encodeURIComponent(@url),
41
+ href: @url,
42
42
  (response)=>
43
43
  @callback.after_sharing(response)
44
44
  # if response && !response.error_code
@@ -57,29 +57,32 @@ class @SharingTags.FacebookShare extends @SharingTags.Share
57
57
  @_assert_vars 'url'
58
58
  FB.ui(
59
59
  method: 'stream.share',
60
- u: encodeURIComponent(@url)
60
+ u: @url
61
61
  (response) ->
62
62
  console?.log response
63
63
  )
64
64
 
65
- # # @note: iphone facebook browser - doesn't show page after sharing
66
- # _fb_ui_feed = ->
67
- # FB.ui(
68
- # method: 'feed',
69
- # name: "Name"
70
- # description: "Description"
71
- # link: @url,
72
- # caption: "Sample caption",
73
- # actions: {name: 'sample name', link: 'sharing link'},
74
- # (response)=>
75
- # @_after_callback(response)
76
- # )
65
+ # @note: iphone facebook browser - doesn't show page after sharing
66
+ _fb_ui_feed = ->
67
+ FB.ui(
68
+ method: 'feed',
69
+ name: "Name"
70
+ description: "Description"
71
+ link: @url,
72
+ caption: "Sample caption",
73
+ actions: {name: 'sample name', link: 'sharing link'},
74
+ (response)=>
75
+ @_after_callback(response)
76
+ )
77
77
 
78
78
  detect_provider: ->
79
- if @_user_agent().match('CriOS')
80
- "sharer"
81
- else if @app_id
82
- if @return_url then "dialog"
83
- else "fb_ui"
84
- else
85
- "sharer"
79
+ provider =
80
+ if @_user_agent().match('CriOS')
81
+ "sharer"
82
+ else if @app_id
83
+ if @return_url then "dialog"
84
+ else "fb_ui"
85
+ else
86
+ "sharer"
87
+ @constructor._debug("Facebook#detect_provider", provider)
88
+ provider
@@ -2,6 +2,8 @@
2
2
 
3
3
  class @SharingTags
4
4
 
5
+ @debug: false
6
+
5
7
  @share: (network, attributes)->
6
8
  SharingTags.Share[network]?(attributes)
7
9
 
@@ -20,6 +22,7 @@ class @SharingTags
20
22
  )
21
23
 
22
24
  @facebook: ({url, app_id, return_url, provider}) ->
25
+ @_debug("Facebook sharing", {url, app_id, return_url, provider})
23
26
  (new SharingTags.FacebookShare(arguments[0])).share()
24
27
 
25
28
  @twitter: ({url, title}) ->
@@ -76,12 +79,18 @@ class @SharingTags
76
79
  social_share.open_popup(popup_url, popup_params)
77
80
  social_share
78
81
 
82
+ @_debug: (args...)->
83
+ console?.debug(args...) if SharingTags.debug
84
+
79
85
  constructor: ({@network, @url, @title, @description})->
80
86
  # @url = encodeURIComponent(url)
81
87
 
82
88
  @_assert_vars 'url'
83
89
  @callback = new SharingTags.Share.Callback(@)
84
90
 
91
+ @constructor._debug("Init sharing #{@network}", {@url, @title, @description})
92
+
93
+
85
94
  open_popup: (api_url, params)->
86
95
  share_url = if params then "#{api_url}?#{$.param(params)}" else api_url
87
96
  share_window = window.open share_url, 'Sharing', 'width=740,height=440'
@@ -109,3 +118,4 @@ class @SharingTags
109
118
 
110
119
  _user_agent: ->
111
120
  window.navigator?.userAgent
121
+
@@ -5,6 +5,5 @@
5
5
  //= require ./sharing_tags/share/callback
6
6
  //= require ./sharing_tags/links
7
7
  //= require ./sharing_tags/init
8
-
9
-
8
+ //= require ./sharing_tags/icons_loader
10
9
 
@@ -1,6 +1,88 @@
1
- //facebook.svg
2
- //google.svg
3
- //linkedin.svg
4
- //odnoklassniki.svg
5
- //twitter.svg
6
- //vkontakte.svg
1
+ // svg icon styles
2
+
3
+ @mixin sharing-tags-icon-color($network, $color, $hover_color: saturate($color, 20), $hover_fill: none)
4
+ .sharing_tags-buttons__icon
5
+ .#{$network}-sharing-tags-icon-in
6
+ fill: $color
7
+
8
+ .#{$network}-sharing-tags-icon-fill
9
+ fill: none
10
+ stroke: $color
11
+
12
+ &:hover
13
+ .#{$network}-sharing-tags-icon-in
14
+ fill: $hover_color
15
+
16
+ .#{$network}-sharing-tags-icon-fill
17
+ stroke: $hover_color
18
+ fill: $hover_fill
19
+
20
+ .sharing-tags-icon-in
21
+ fill-rule: evenodd
22
+ fill-opacity: 1
23
+ fill-rule: evenodd
24
+
25
+ .sharing-tags-icon-fill
26
+ stroke-linecap: butt
27
+ stroke-linejoin: miter
28
+ stroke-miterlimit: 2
29
+ stroke-width: 2
30
+ stroke-opacity: 1
31
+
32
+ // white
33
+ //.sharing-tags-icon-fill
34
+ // fill: none
35
+ // stroke: #fff
36
+ //
37
+ //.sharing-tags-icon-in
38
+ // fill: #fff
39
+
40
+
41
+
42
+
43
+ // Colour icons
44
+ +sharing-tags-icon-color(fb, #5071AA)
45
+
46
+ +sharing-tags-icon-color(od, #ED812B)
47
+
48
+ +sharing-tags-icon-color(vk, #6B82A7)
49
+
50
+ // Twitter
51
+ +sharing-tags-icon-color(tw, #68C6E1)
52
+
53
+ // Google+
54
+ +sharing-tags-icon-color(gl, #dd4b39)
55
+
56
+ // LinkedIn
57
+ +sharing-tags-icon-color(li, #247CB4)
58
+
59
+ // Line
60
+ +sharing-tags-icon-color(ln, #00C300)
61
+
62
+
63
+
64
+
65
+
66
+ .fb-sharing-tags-icon-in
67
+ .fb-sharing-tags-icon-fill
68
+
69
+ .od-sharing-tags-icon-fill
70
+ .od-sharing-tags-icon-in
71
+
72
+ .vk-sharing-tags-icon-fill
73
+ .vk-sharing-tags-icon-in
74
+
75
+ .tw-sharing-tags-icon-in
76
+ .tw-sharing-tags-icon-fill
77
+
78
+ .li-sharing-tags-icon-fill
79
+ stroke-width: 1
80
+
81
+ .gl-sharing-tags-icon-fill
82
+ stroke-width: 1
83
+
84
+ // linkedin
85
+ // line
86
+ // google
87
+
88
+
@@ -1,27 +1,27 @@
1
- @mixin create_keyframes_animation($name, $left_percent, $center_percent, $right_precent)
1
+ @mixin create_keyframes_animation($name, $left_percent, $center_percent, $right_precent, $scale)
2
2
  +keyframes($name)
3
3
  0%
4
4
  transform: scale(1)
5
5
  #{$left_percent}%
6
6
  transform: scale(1)
7
7
  #{$center_percent}%
8
- transform: scale(1.4)
8
+ transform: scale($scale)
9
9
  #{$right_precent}%
10
10
  transform: scale(1)
11
11
  100%
12
12
  transform: scale(1)
13
13
 
14
14
  @mixin keyframes($name)
15
- @keyframes #{$name}
15
+ @keyframes "#{$name}"
16
16
  @content
17
17
 
18
- @mixin add_animation_on_sharing_button($index, $speed)
19
- .sharing_tags-buttons__item
18
+ @mixin add_animation_on_sharing_button($animation_name, $index, $speed)
19
+ & .sharing_tags-buttons__item
20
20
  &:nth-child(#{$index})
21
21
  a
22
- animation: animate_sharing_buttons_#{$index} #{$speed}s infinite
22
+ animation: $animation_name #{$speed}s infinite
23
23
 
24
- @mixin create_wave_animation_on_sharing_buttons($count_of_buttons, $speed:2)
24
+ @mixin create_wave_animation_on_sharing_buttons($count_of_buttons, $speed:2, $scale: 1.4)
25
25
  $step: 100 / $count_of_buttons
26
26
  $half_step: $step / 2
27
27
  @for $i from 1 through $count_of_buttons
@@ -29,5 +29,6 @@
29
29
  $center: $right - $half_step
30
30
  $left: $center - $half_step
31
31
 
32
- +create_keyframes_animation('animate_sharing_buttons_#{$i}', $left, $center, $right)
33
- +add_animation_on_sharing_button($i, $speed)
32
+ $animation_name: '#{&}-animate__button#{$i}'
33
+ +create_keyframes_animation($animation_name, $left, $center, $right, $scale)
34
+ +add_animation_on_sharing_button($animation_name, $i, $speed)
@@ -1,20 +1,28 @@
1
+ @import "sharing_tags/icons"
2
+
1
3
  .sharing_tags-buttons
2
4
  list-style-type: none
3
5
  padding: 0px
4
6
  margin: 0px
7
+ display: inline-block
5
8
 
6
9
  &__item
7
10
  float: left
11
+ margin-right: 10px
8
12
 
9
- img
10
- display: inline-block
13
+ &:last-child
14
+ margin-right: 0
11
15
 
12
16
  a
17
+ cursor: pointer
13
18
  display: inline-block
14
19
  vertical-align: middle
15
20
  text-align: center
16
21
  font-size: 0
17
- width: auto
18
22
 
19
- &:hover
20
- opacity: 0.8
23
+ .sharing_tags-buttons__icon
24
+ display: inline-block
25
+ width: 50px
26
+ height: 50px
27
+
28
+
@@ -1,2 +1 @@
1
- = link_to_facebook_share do
2
- = image_tag 'sharing_tags/icons/facebook.svg'
1
+ = link_to_facebook_share
@@ -1,2 +1 @@
1
- = link_to_google_share do
2
- = image_tag 'sharing_tags/icons/google.svg'
1
+ = link_to_google_share
@@ -1,2 +1 @@
1
- = link_to_line_share do
2
- = image_tag 'sharing_tags/icons/line.svg'
1
+ = link_to_line_share
@@ -1,2 +1 @@
1
- = link_to_linkedin_share do
2
- = image_tag 'sharing_tags/icons/linkedin.svg'
1
+ = link_to_linkedin_share
@@ -1,2 +1 @@
1
- = link_to_odnoklassniki_share do
2
- = image_tag 'sharing_tags/icons/odnoklassniki.svg'
1
+ = link_to_odnoklassniki_share
@@ -1,2 +1 @@
1
- = link_to_twitter_share do
2
- = image_tag 'sharing_tags/icons/twitter.svg'
1
+ = link_to_twitter_share
@@ -1,2 +1 @@
1
- = link_to_vkontakte_share do
2
- = image_tag 'sharing_tags/icons/vkontakte.svg'
1
+ = link_to_vkontakte_share
@@ -1,3 +1,3 @@
1
- ul.sharing_tags-buttons
1
+ ul.sharing_tags-buttons class="sharing_tags-buttons__#{context.name} #{options[:class]}"
2
2
  - networks.each do |network|
3
3
  li.sharing_tags-buttons__item= render "sharing_tags/button/#{network}"
@@ -33,8 +33,13 @@ module SharingTags
33
33
 
34
34
  def add_styles
35
35
  source_file = "app/assets/stylesheets/application.css"
36
+
36
37
  match_string = "sharing_tags"
38
+ insert_into_file_if source_file, "#{match_string}\n", before: "*/" do
39
+ "*= require #{match_string}\n "
40
+ end
37
41
 
42
+ match_string = "sharing_tags/icons"
38
43
  insert_into_file_if source_file, match_string, before: "*/" do
39
44
  "*= require #{match_string}\n "
40
45
  end
@@ -7,10 +7,12 @@ module SharingTags
7
7
  # switching context
8
8
  if options[:context].present?
9
9
  SharingTags.config.switch_context(*options[:context]) do
10
- render template: "sharing_tags/buttons.html.slim", locals: {networks: networks, options: options}
10
+ context = SharingTags.config.current_context
11
+ render template: "sharing_tags/buttons.html.slim", locals: {networks: networks, options: options, context: context}
11
12
  end
12
13
  else
13
- render template: "sharing_tags/buttons.html.slim", locals: {networks: networks, options: options}
14
+ context = SharingTags.config.current_context
15
+ render template: "sharing_tags/buttons.html.slim", locals: {networks: networks, options: options, context: context}
14
16
  end
15
17
  end
16
18
 
@@ -51,6 +53,8 @@ module SharingTags
51
53
  data_attrs = params.get(*(data_params + [:network, :share_url]))
52
54
  data_attrs[:context] = SharingTags.config.current_context.name
53
55
 
56
+ classes = "sharing_tags-#{network}__icon sharing_tags-buttons__icon"
57
+
54
58
  if block_given?
55
59
  name_or_options = {} if !name_or_options || name_or_options.is_a?(String)
56
60
  data_attrs.merge!(name_or_options.delete(:data)) if name_or_options[:data]
@@ -61,20 +65,18 @@ module SharingTags
61
65
  name_or_options[:role] = "sharing_tags_share"
62
66
  end
63
67
 
68
+ name_or_options[:class] ||= ""
69
+ name_or_options[:class] << classes
70
+
64
71
  name_or_options.merge!(data: data_attrs, target: "_blank")
65
72
 
66
73
  link_to params.page_url, name_or_options, &block
67
74
  else
68
- name_or_options = default_name(network) if name_or_options.nil?
69
75
 
70
- link_to name_or_options, params.page_url, data: data_attrs, role: "sharing_tags_share", target: "_blank", &block
76
+ link_to "", params.page_url, data: data_attrs, role: "sharing_tags_share", class: classes, target: "_blank", &block
71
77
  end
72
78
  end
73
79
  # rubocop:enable Metrics/CyclomaticComplexity
74
-
75
- def default_name(network)
76
- image_tag "sharing_tags/icons/#{network}.svg"
77
- end
78
80
  end
79
81
  end
80
82
  end
@@ -0,0 +1,13 @@
1
+ module SharingTags
2
+ class AssetFile
3
+ class FileNotFound < IOError; end
4
+ UNREADABLE_PATH = ''
5
+
6
+ def self.named(filename)
7
+ asset_path = FindsAssetPaths.by_filename(filename)
8
+ File.read(asset_path || UNREADABLE_PATH)
9
+ rescue Errno::ENOENT => e
10
+ raise FileNotFound, "Asset not found: #{asset_path}: #{e}"
11
+ end
12
+ end
13
+ end
@@ -4,6 +4,10 @@ module SharingTags
4
4
 
5
5
  attr_accessor :running_context
6
6
  attr_reader :default_context
7
+ attr_reader :asset_finder
8
+
9
+ class Error < Exception
10
+ end
7
11
 
8
12
  def initialize
9
13
  clear!
@@ -62,6 +66,15 @@ module SharingTags
62
66
  @current_context = nil
63
67
  end
64
68
 
69
+ def asset_finder=(finder)
70
+ if finder.respond_to?(:find_asset)
71
+ @asset_finder = finder
72
+ else
73
+ fail Error, "Asset Finder should implement the #find_asset method"
74
+ end
75
+ asset_finder
76
+ end
77
+
65
78
  private
66
79
 
67
80
  def fetch_params
@@ -2,16 +2,23 @@ module SharingTags
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace SharingTags
4
4
 
5
+ config.assets.precompile += %w( sharing_tags/icons.js )
6
+
5
7
  if Rails.env.development?
6
8
  config.to_prepare do
7
- require_dependency Rails.root.join('config', 'initializers', 'sharing_tags.rb').to_s
9
+ init_config = Rails.root.join('config', 'initializers', 'sharing_tags.rb').to_s
10
+ require_dependency init_config if File.exist?(init_config)
8
11
  end
12
+ end
9
13
 
10
- config.after_initialize do
11
- # optional, without it will call `to_prepend` only when a file changes,
12
- # not on every request
13
- Rails.application.config.reload_classes_only_on_change = false
14
- end
14
+ # optional, without it will call `to_prepend` only when a file changes,
15
+ # not on every request
16
+ config.after_initialize do |app|
17
+ app.config.reload_classes_only_on_change = false if Rails.env.development?
18
+
19
+ # In default Rails apps, this will be a fully operational
20
+ # Sprockets::Environment instance
21
+ SharingTags.config.asset_finder = app.instance_variable_get(:@assets)
15
22
  end
16
23
  end
17
24
  end
@@ -0,0 +1,12 @@
1
+ module SharingTags
2
+ class FindsAssetPaths
3
+ def self.by_filename(filename)
4
+ asset = configured_asset_finder.find_asset(filename)
5
+ asset && asset.pathname
6
+ end
7
+
8
+ def self.configured_asset_finder
9
+ SharingTags.config.asset_finder
10
+ end
11
+ end
12
+ end
@@ -28,7 +28,7 @@ module SharingTags
28
28
  end
29
29
  end
30
30
 
31
- NETWORKS = %i( facebook google twitter vkontakte odnoklassniki line linkedin )
31
+ NETWORKS = %i( facebook google twitter vkontakte odnoklassniki linkedin )
32
32
 
33
33
  ATTRIBUTES =
34
34
  %i( share_url title description page_url share_url_params link_params
@@ -1,3 +1,3 @@
1
1
  module SharingTags
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
data/lib/sharing_tags.rb CHANGED
@@ -8,6 +8,9 @@ module SharingTags
8
8
  autoload :Network, 'sharing_tags/network'
9
9
  autoload :Context, 'sharing_tags/context'
10
10
 
11
+ autoload :AssetFile, 'sharing_tags/asset_file'
12
+ autoload :FindsAssetPaths, 'sharing_tags/finds_asset_paths'
13
+
11
14
  module ActionView
12
15
  autoload :MetaHelper, 'sharing_tags/action_view/meta_helper'
13
16
  autoload :ButtonHelper, 'sharing_tags/action_view/button_helper'
@@ -18,7 +18,7 @@ RSpec.describe SharingTags::ActionView::ButtonHelper, type: :helper do
18
18
  it "generate default text share link" do
19
19
  is_expected.to have_tag "a", with: {href: "http://a.b", role: "sharing_tags_share"}
20
20
  is_expected.to have_tag "a", with: {"data-share-url" => "http://c.d"}
21
- is_expected.to have_tag "img", with: {src: "/assets/sharing_tags/icons/facebook.svg"}
21
+ is_expected.to have_tag "a", with: {class: "sharing_tags-facebook__icon sharing_tags-buttons__icon"}
22
22
 
23
23
  is_expected.to have_tag("a", without: {
24
24
  "data-share-url" => "http://c.d",
@@ -97,7 +97,7 @@ RSpec.describe SharingTags::ActionView::ButtonHelper, type: :helper do
97
97
  "data-description" => "od desc",
98
98
  "data-network" => "odnoklassniki"
99
99
  })
100
- is_expected.to have_tag "img", with: {src: "/assets/sharing_tags/icons/odnoklassniki.svg"}
100
+ is_expected.to have_tag "a", with: {class: "sharing_tags-odnoklassniki__icon sharing_tags-buttons__icon"}
101
101
  is_expected.to have_tag("a", without: {
102
102
  "data-image" => "http://img.png"
103
103
  })
@@ -147,8 +147,8 @@ RSpec.describe SharingTags::ActionView::ButtonHelper, type: :helper do
147
147
  "data-description" => "tw desc",
148
148
  "data-network" => "twitter"
149
149
  })
150
- is_expected.to have_tag("a", without: {"data-image" => "http://img.png"})
151
- expect(helper.link_to_twitter_share).to have_tag "img", with: {src: "/assets/sharing_tags/icons/twitter.svg"}
150
+ is_expected.to have_tag "a", without: {"data-image" => "http://img.png"}
151
+ is_expected.to have_tag "a", with: {class: "sharing_tags-twitter__icon sharing_tags-buttons__icon"}
152
152
  end
153
153
 
154
154
  it "generate default text sharing link for block" do
@@ -183,7 +183,7 @@ RSpec.describe SharingTags::ActionView::ButtonHelper, type: :helper do
183
183
  "data-title" => "gg title",
184
184
  "data-description" => "gg desc"
185
185
  })
186
- is_expected.to have_tag "img", with: {src: "/assets/sharing_tags/icons/google.svg"}
186
+ is_expected.to have_tag "a", with: {class: "sharing_tags-google__icon sharing_tags-buttons__icon"}
187
187
  end
188
188
 
189
189
  it "generate default text sharing link for block" do
@@ -198,11 +198,20 @@ RSpec.describe SharingTags::ActionView::ButtonHelper, type: :helper do
198
198
  description "Desc"
199
199
  page_url "http://link.share"
200
200
  image "http://img.png"
201
+ context :custom do
202
+
203
+ end
201
204
  end
202
205
  end
203
206
 
204
207
  it "generate links with default networks" do
205
208
  expect(helper.sharing_tags_buttons).to have_tag "a"
209
+ expect(helper.sharing_tags_buttons).to have_tag "ul", with: {class: "sharing_tags-buttons sharing_tags-buttons__default"}
210
+ # have all network links
211
+ end
212
+
213
+ it "generate links with default networks and custom context" do
214
+ expect(helper.sharing_tags_buttons context: :custom).to have_tag "ul", with: {class: "sharing_tags-buttons sharing_tags-buttons__custom"}
206
215
  # have all network links
207
216
  end
208
217
 
@@ -180,7 +180,7 @@ describe "SharingTags.FacebookShare", ->
180
180
  @share._fb_ui()
181
181
  expect(FB.ui).toHaveBeenCalled()
182
182
  expect(FB.ui).toHaveBeenCalledWith(
183
- jasmine.objectContaining(href: encodeURIComponent(@fb.url), method: 'share'),
183
+ jasmine.objectContaining(href: @fb.url, method: 'share'),
184
184
  jasmine.any(Function)
185
185
  )
186
186
 
@@ -210,7 +210,7 @@ describe "SharingTags.FacebookShare", ->
210
210
  @share._stream_share()
211
211
  expect(FB.ui).toHaveBeenCalled()
212
212
  expect(FB.ui).toHaveBeenCalledWith(
213
- jasmine.objectContaining(u: encodeURIComponent(@fb.url), method: 'stream.share'),
213
+ jasmine.objectContaining(u: @fb.url, method: 'stream.share'),
214
214
  jasmine.any(Function)
215
215
  )
216
216
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sharing_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoliy Kovalchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-08 00:00:00.000000000 Z
11
+ date: 2015-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -331,6 +331,8 @@ files:
331
331
  - app/assets/images/sharing_tags/icons/twitter.svg
332
332
  - app/assets/images/sharing_tags/icons/vkontakte.svg
333
333
  - app/assets/javascripts/sharing_tags.js
334
+ - app/assets/javascripts/sharing_tags/icons.js.coffee.erb
335
+ - app/assets/javascripts/sharing_tags/icons_loader.js.coffee.erb
334
336
  - app/assets/javascripts/sharing_tags/init.js.coffee.erb
335
337
  - app/assets/javascripts/sharing_tags/links.js.coffee
336
338
  - app/assets/javascripts/sharing_tags/share.js.coffee
@@ -361,10 +363,12 @@ files:
361
363
  - lib/sharing_tags/action_view/asset_helper.rb
362
364
  - lib/sharing_tags/action_view/button_helper.rb
363
365
  - lib/sharing_tags/action_view/meta_helper.rb
366
+ - lib/sharing_tags/asset_file.rb
364
367
  - lib/sharing_tags/config.rb
365
368
  - lib/sharing_tags/configuration.rb
366
369
  - lib/sharing_tags/context.rb
367
370
  - lib/sharing_tags/engine.rb
371
+ - lib/sharing_tags/finds_asset_paths.rb
368
372
  - lib/sharing_tags/network.rb
369
373
  - lib/sharing_tags/network/facebook.rb
370
374
  - lib/sharing_tags/railtie.rb