sharing_tags 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d575f38fc2c99c50b2376cffcf4288ac2f7418f5
4
- data.tar.gz: 63845f9e807dfcfa3ff174f751c309d4f8542b23
3
+ metadata.gz: 9a7912ad5e988091db82327d34f8e102cf8e71cf
4
+ data.tar.gz: 673a87ca47d5063faba0f6f02bb7568b96d2891e
5
5
  SHA512:
6
- metadata.gz: e62ae92452330b61c1b7b4119719588be8530c6dda46f89beb64cff083c5d63509f4a70b7c52c15bd3574851db10bb8e283c0b0cf182636385bb798dc5a9b239
7
- data.tar.gz: bc38f8c676610699e3abc6692ebd6db6d316f476a9a15e271e182fda4f29b95800ab5f8ec57a589640ec8f08b4260f23e3df2ab9664cf771df26653779248275
6
+ metadata.gz: b2fdff0f4a8a5522be58ba5e97da9da97dd228ee18d15d6602362209ef3ec0e02668fa33b6ea53a4db3c8d30bbccad1588b1355300948755edb6e344846e51e9
7
+ data.tar.gz: a2a92dc3a6addd2629742096c9277b76eef610a37a3133bbe6db5ff36245c67380a7f37f5a29b1f77654df4f634c7f6b5737ccf6b9296aa9018c0b214868ef19
data/README.md CHANGED
@@ -29,7 +29,7 @@ This gem is a Rails 4+ compatible engine and now automatically includes all the
29
29
  For the simplest way of using this gem, add this helper method to head in your views:
30
30
  ```haml
31
31
  # generate meta tags for different social networks
32
- = render_sharing_tags
32
+ = sharing_meta_tags
33
33
 
34
34
  # render sharing buttons for networks
35
35
  = sharing_tags_buttons :facebook, :twitter, context: :user
@@ -1,9 +1 @@
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>
9
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77 77"><path class="fb-sharing-tags-icon-fill sharing-tags-icon-fill" d="M38.67 1.485c20.558 0 37.224 16.576 37.224 37.024 0 20.45-16.666 37.024-37.224 37.024-20.557 0-37.222-16.575-37.222-37.025S18.113 1.484 38.67 1.484z"/><path class="fb-sharing-tags-icon-in sharing-tags-icon-in" d="M33.158 38.535c.11.136.047 1.08.047 1.258l.007 19.93H41.9c.05-5.246 0-10.63 0-15.9 0-.076-.017-5.107.007-5.212.016-.067.018-.06.036-.088.01.002 5.526.046 5.718 0l.098-.03.763-7.272-6.592-.002c-.026-1.073.005-2.178.007-3.256 0-.983-.025-2.198.564-2.738l5.987-.6-.01-7.296c-1.133-.07-2.476-.006-3.632-.006-1.204 0-2.422-.026-3.605.053-2.255.15-4.076.817-5.392 1.933-1.91 3.043-2.648.43-2.662 11.913l-4.365.003.01 7.307 4.328.005z"/></svg>
@@ -1,5 +1 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
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>
5
- </svg>
1
+ <svg viewBox="0 -1 35 36" xmlns="http://www.w3.org/2000/svg"><path class="gl-sharing-tags-icon-fill sharing-tags-icon-fill" d="M17.63 34.085c9.394 0 17.008-7.615 17.008-17.008C34.638 7.684 27.024.07 17.63.07 8.237.07.622 7.684.622 17.077S8.237 34.085 17.63 34.085"/><path class="gl-sharing-tags-icon-in sharing-tags-icon-in" d="M25.825 15.835h-2.05v-2.05h-1.65v2.05h-2.05v1.65h2.05v2.05h1.65v-2.05h2.05v-1.65zM18.16 18.32c-.475-.338-1.385-1.158-1.385-1.64 0-.565.162-.842 1.01-1.506.872-.682 1.49-1.64 1.49-2.75 0-1.326-.59-2.617-1.7-3.044h1.67l1.18-.85h-5.268c-2.36 0-4.583 1.788-4.583 3.86 0 2.117 1.61 3.827 4.012 3.827.167 0 .33-.004.488-.015-.156.298-.268.635-.268.983 0 .59.317 1.066.717 1.456-.302 0-.595.01-.912.01-2.923 0-5.175 1.863-5.175 3.795 0 1.902 2.468 3.092 5.393 3.092 3.334 0 5.176-1.89 5.176-3.794 0-1.526-.45-2.44-1.842-3.423zm-2.812-2.64c-1.357-.04-2.647-1.52-2.88-3.3-.236-1.783.675-3.146 2.032-3.106 1.356.04 2.646 1.47 2.88 3.252.234 1.782-.675 3.194-2.032 3.153zm-.532 9.015c-2.022 0-3.482-1.28-3.482-2.817 0-1.507 1.812-2.76 3.833-2.74.472.006.912.082 1.31.21 1.098.765 1.885 1.195 2.107 2.065.042.177.065.358.065.543 0 1.538-.99 2.74-3.835 2.74z"/></svg>
@@ -1,14 +1 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
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">
4
- <g id="sharing-line" sketch:type="MSLayerGroup" fill="#00C300">
5
- <g transform="translate(9.000000, 12.000000)">
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>
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>
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>
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>
10
- </g>
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>
12
- </g>
13
- </g>
14
- </svg>
1
+ <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg"><g fill="#00C300" fill-rule="evenodd"><path d="M9.972 12.727c-.57.01-.618.466-.618.466l.002 1.215.007 3.896s.093.278.198.36c.108.082.315.165.315.165l3.18.01s.467-.104.47-.575c.002-.47-.494-.58-.494-.58l-2.507-.01-.003-4.33s.022-.63-.548-.618zM13.695 13.242s.138-.53.6-.527c.46.004.592.51.584.525-.018.035-.005 5.11-.005 5.11s-.09.516-.59.512c-.497-.004-.585-.484-.585-.484l-.005-5.136zM16.45 18.89c-.46.025-.62-.46-.62-.46l-.008-4.928s.185-.606.707-.734.936.256.936.256l2.47 4.215-.013-4.01s.152-.527.616-.5c.463.03.536.458.536.458l-.006 4.89s-.066.494-.405.663c-.338.17-.466.136-.655.103-.2-.036-.513-.308-.513-.308l-2.494-4.25v4.112s-.096.467-.554.492zM23.093 13.864l-.02 1.386 2.5.003s.46.063.444.517c-.015.453-.39.54-.39.54l-2.512-.002-.015 1.405 2.628.005s.457.113.458.54c0 .43-.43.58-.43.58l-3.062.004s-.338-.03-.536-.23c-.2-.198-.252-.5-.252-.5l.006-4.63s.03-.264.253-.5c.223-.238.64-.243.64-.243l2.784-.006c.008 0 .572.01.577.54.006.53-.518.63-.523.62-.005-.01-2.55-.03-2.55-.03z"/><path d="M17 34c9.39 0 17-7.61 17-17S26.39 0 17 0 0 7.61 0 17s7.61 17 17 17zM4.785 16.46c-.077-3.18-.016-.743-.016-.743-.04-4.416 3.43-8.75 7.76-9.58 0 0 1.516-.55 4.512-.55 2.996 0 5.41.76 5.41.76 4.31.94 7.622 5.278 7.397 9.68 0 0-.007.183-.023.4-.007.085-.016.177-.03.267-.046.317-.446 1.348-.446 1.348-1.475 4.168-6.08 8.668-10.138 10.362 0 0 .826-.754-.033.028-.86.782-3.316 1.953-3.02-.29.31-2.366-.16-2.428-2.242-2.806-2.083-.378-.796-.142-.796-.142-4.35-.75-8.152-4.927-8.337-8.733 0 0 .077 3.18 0 0z"/></g></svg>
@@ -1,7 +1 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
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>
7
- </svg>
1
+ <svg viewBox="0 -1 35 36" xmlns="http://www.w3.org/2000/svg"><path class="li-sharing-tags-icon-fill sharing-tags-icon-fill" d="M17.557 34.11c9.395 0 17.008-7.617 17.008-17.01 0-9.392-7.613-17.007-17.008-17.007C8.164.093.55 7.708.55 17.1c0 9.393 7.614 17.01 17.007 17.01"/><path class="li-sharing-tags-icon-in sharing-tags-icon-in" d="M26.06 24.214h-3.758v-5.49c0-1.437-.588-2.418-1.88-2.418-.99 0-1.54.662-1.796 1.3-.096.23-.08.548-.08.867v5.74H14.82s.05-9.724 0-10.608h3.725v1.665c.22-.728 1.41-1.767 3.31-1.767 2.355 0 4.206 1.526 4.206 4.812v5.9zM11.056 12.278h-.024c-1.2 0-1.977-.81-1.977-1.84 0-1.047.8-1.84 2.025-1.84 1.223 0 1.975.79 2 1.838 0 1.028-.777 1.842-2.023 1.842zm-1.573 1.327h3.315v10.61H9.482v-10.61z"/></svg>
@@ -1,15 +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" />
13
- </g>
14
- </g>
15
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77 77"><g class="od-sharing-tags-icon-fill sharing-tags-icon-fill"><path d="M38.02 1.22C17.46 1.22.79 17.8.79 38.24c0 20.45 16.67 37.03 37.23 37.03 20.55 0 37.22-16.58 37.22-37.03 0-20.44-16.67-37.02-37.22-37.02z"/></g><g class="od-sharing-tags-icon-in sharing-tags-icon-in"><path d="M50.86 60.81c-2.49 2.51-5.14.2-7.07-1.65-1.66-1.59-3.65-3.58-5.39-4.93-4.53 4.75-8.21 10.46-11.93 7.3-4.46-3.79 4.29-9.34 6.43-12.61-2.23-.5-5.97-1.7-7.73-3.03-1.77-1.34-2.1-4.42.04-5.94 2.56-1.83 4.28.18 7.3 1.15 11.45 3.67 15.88-6.6 19.27-.58 2.89 5.13-6.94 7.4-8.12 8.19 4.73 4.5 10.78 8.47 7.2 12.1z" class="s0"/><path d="M40.19 13.49c-6.23-1.05-13.59 2.72-14.75 10.3-2.55 16.7 22.81 20.62 25.21 3.86.89-6.19-3.11-12.91-10.46-14.16m-1.94 17.6c-6.93.09-7.44-9.82-.55-10.3 7.26-.51 7.34 10.22.55 10.3z"/></g></svg>
@@ -1,19 +1 @@
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
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -1 77 79"><path class="tw-sharing-tags-icon-fill sharing-tags-icon-fill" fill="none" d="M38.9.3C18.2.3 1.4 17.4 1.4 38.5s16.8 38.2 37.5 38.2 37.5-17.1 37.5-38.2S59.6.3 38.9.3z"/><path class="tw-sharing-tags-icon-in sharing-tags-icon-in" d="M19.5 52.9c.3 0 .7.1 1 .1h1c1 0 2-.1 2.9-.3.9-.1 1.9-.4 2.8-.8.9-.3 1.7-.7 2.5-1.2s1.6-.9 2.4-1.6c-.9 0-1.9-.1-2.7-.5-.9-.3-1.6-.8-2.4-1.2-.7-.5-1.3-1.2-1.9-1.9s-.9-1.5-1.2-2.4c.3 0 .5.1.8.1h.8c.4 0 .8 0 1.2-.1.4 0 .8-.1 1.2-.3-.9-.3-1.9-.5-2.8-1-.8-.5-1.6-1.2-2.3-1.9-.7-.8-1-1.6-1.5-2.5-.4-.9-.5-1.9-.5-2.9.5.3 1.2.5 1.9.8.7.1 1.3.3 2 .3-1.2-.8-2.1-1.7-2.8-3-.7-1.2-1-2.7-1-4.1 0-.8.1-1.5.3-2.3.3-.8.5-1.5.8-2 1 1.3 2.3 2.5 3.6 3.6 1.3 1 2.8 2 4.3 2.8 1.5.8 3 1.3 4.8 1.9 1.7.5 3.4.8 5.2.8 0-.3-.1-.7-.1-.9v-1c0-1.2.3-2.3.7-3.3.4-1 1-2 1.9-2.8s1.7-1.5 2.8-1.9c1-.4 2.1-.7 3.3-.7s2.4.3 3.4.8 2 1.2 2.8 2c.9-.1 2-.5 2.9-.8.9-.4 1.9-.8 2.7-1.3-.3.9-.8 1.9-1.5 2.7-.7.8-1.5 1.5-2.4 2 .9-.1 1.7-.3 2.5-.5.8-.3 1.6-.5 2.4-.8-.5.8-1.2 1.6-2 2.4-.7.8-1.5 1.5-2.4 2.1v1c0 2.8-.5 5.7-1.6 8.6-1 2.9-2.7 5.6-4.8 8-2.1 2.4-4.7 4.3-7.7 5.7-3 1.5-6.5 2.3-10.5 2.3-1.2 0-2.4-.1-3.6-.3-1.2-.1-2.4-.4-3.4-.8-1-.3-2.1-.8-3.2-1.2-.7-.4-1.7-1-2.6-1.7z"/></svg>
@@ -1,12 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 76 77" width="100%" height="100%">
2
- <g id="Layer1" name="Layer 1" 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" />
10
- </g>
11
- </g>
12
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 77"><g class="vk-sharing-tags-icon-fill sharing-tags-icon-fill"><path d="M38.24 1.16C17.78 1.16 1.2 17.78 1.2 38.29s16.58 37.13 37.04 37.13c20.45 0 37.03-16.62 37.03-37.13S58.69 1.16 38.24 1.16z"/></g><g class="vk-sharing-tags-icon-in sharing-tags-icon-in"><path d="M56.38 41.34c3.12 2.74 5.29 4.97 6.52 6.69.57.86.76 1.62.55 2.28-.2.67-.68 1-1.41 1l-8.12.35c-1.14.08-2.54-.58-4.18-1.99-1.64-1.41-2.74-2.58-3.32-3.52-.32-.55-.92-.86-1.78-.94-.86-.08-1.41.31-1.66 1.17l-.24 3.05c-.09.63-.33 1.1-.74 1.41-.41.32-.76.49-1.05.53-.28.04-.76.1-1.41.18-2.13.08-4-.02-5.6-.3-1.59-.27-3.05-.84-4.36-1.7-1.31-.86-2.36-1.64-3.13-2.34-.78-.71-1.91-1.84-3.39-3.41-4.01-5.47-7-10.21-8.97-14.2-.74-1.56-1.15-2.89-1.23-3.99.33-.31.94-.51 1.84-.59.91-.07 2.22-.09 3.94-.05 1.72.04 2.74.05 3.07.05.82-.07 1.48.36 1.97 1.3 2.05 4.38 4.06 7.78 6.02 10.21 1.31 1.17 2.17.97 2.59-.59.16 0 .24-1.92.24-5.75.08-2.43-.94-3.95-3.07-4.58.49-1.25 2.21-1.88 5.16-1.88.74 0 1.64.04 2.71.12 1.06.08 1.63.12 1.72.12 2.46 0 3.69.94 3.69 2.82 0 .23-.05.8-.13 1.7-.08.9-.14 1.76-.18 2.58-.04.82-.06 1.68-.06 2.58 0 .9.12 1.66.37 2.29.24.63.57 1.02.98 1.17.45-.31.88-.6 1.29-.88.41-.27.84-.72 1.29-1.35.45-.62.8-1.09 1.04-1.4.25-.32.62-.91 1.11-1.77.49-.86.78-1.4.86-1.64.08-.23.37-.84.86-1.82.49-.98.74-1.46.74-1.46l.18-.36c.33-.7.6-1.11.8-1.23.21-.12.72-.18 1.54-.18h7.62c.91 0 1.44.03 1.6.06.17.04.41.22.74.53.57.71.06 2.23-1.54 4.58-1.59 2.35-3.13 4.3-4.61 5.87-2.05 2.19-2.33 3.95-.86 5.28z"/></g></svg>
@@ -5,6 +5,8 @@ try
5
5
  @fbAsyncInit = ->
6
6
  FB.init(
7
7
  appId: '<%= app_id %>',
8
+ status : false,
9
+ # or v2.0, v2.1, v2.0
8
10
  version: 'v2.3'
9
11
  )
10
12
 
@@ -4,7 +4,7 @@ $(document).on 'click', "@sharing_tags_share", (event) ->
4
4
  self = $(@)
5
5
  network = self.data('network')
6
6
  context = self.data('context')
7
- jQuery?("body").trigger(type: "sharing_tags.click_action", network: network, context: context, target: self)
7
+ jQuery?(window).trigger(type: "sharing_tags.click_action", network: network, context: context, target: self)
8
8
 
9
9
  SharingTags.share(
10
10
  network,
@@ -15,6 +15,7 @@ $(document).on 'click', "@sharing_tags_share", (event) ->
15
15
  image: self.data 'image'
16
16
  app_id: self.data 'app-id'
17
17
  provider: self.data 'provider'
18
+ caption: self.data 'caption'
18
19
 
19
20
  message: self.data 'description' # @note deprecated
20
21
  )
@@ -7,7 +7,7 @@ class @SharingTags.FacebookShare extends @SharingTags.Share
7
7
  return_url: null
8
8
  provider: null
9
9
 
10
- constructor: ({@app_id, @return_url, @provider})->
10
+ constructor: ({@app_id, @caption, @return_url, @provider})->
11
11
  @provider = @detect_provider() if !@provider || @provider == "auto"
12
12
 
13
13
  # todo: throw error for invalid provider
@@ -15,13 +15,22 @@ class @SharingTags.FacebookShare extends @SharingTags.Share
15
15
 
16
16
  super
17
17
 
18
+ # facebook locales support (https://www.facebook.com/translations/FacebookLocales.xml)
19
+ #
18
20
  @init: (locale="en_US")->
21
+
22
+ # todo: for debug mode load debug sdk
23
+ # js.src = "//connect.facebook.net/en_US/sdk/debug.js";
19
24
  if not FB?
20
- jQuery.ajax(
21
- url: "//connect.facebook.net/#{locale}/all.js"
22
- dataType: "script"
23
- cache: true
24
- )
25
+ sdk_url = locale + (if @debug then "/sdk/debug.js" else "/all.js")
26
+
27
+ `(function(d, s, id){
28
+ var js, fjs = d.getElementsByTagName(s)[0];
29
+ if (d.getElementById(id)) {return;}
30
+ js = d.createElement(s); js.id = id;
31
+ js.src = "http://connect.facebook.net/" + sdk_url;
32
+ fjs.parentNode.insertBefore(js, fjs);
33
+ }(document, 'script', 'facebook-jssdk'));`
25
34
 
26
35
  share: (provider = @provider)->
27
36
  @callback.before_sharing(provider)
@@ -32,6 +41,7 @@ class @SharingTags.FacebookShare extends @SharingTags.Share
32
41
  @_assert_vars "url"
33
42
  @open_popup("http://www.facebook.com/sharer.php", u: @url)
34
43
 
44
+ # https://developers.facebook.com/docs/javascript/reference/FB.ui
35
45
  _fb_ui: =>
36
46
  @_assert_vars "url", "app_id"
37
47
  return @constructor.init().done(@_fb_ui) if not FB?
@@ -57,22 +67,29 @@ class @SharingTags.FacebookShare extends @SharingTags.Share
57
67
  @_assert_vars 'url'
58
68
  FB.ui(
59
69
  method: 'stream.share',
60
- u: @url
70
+ u: @url
61
71
  (response) ->
62
- console?.log response
72
+ @callback.after_sharing(response)
63
73
  )
64
74
 
65
75
  # @note: iphone facebook browser - doesn't show page after sharing
66
- _fb_ui_feed = ->
76
+ # @note: android browser - Ok
77
+ # return post_id
78
+ # https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.3
79
+ _fb_ui_feed: =>
80
+ return @constructor.init().done(@_fb_ui_feed) if not FB?
67
81
  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'},
82
+ method: 'feed'
83
+ link: @url
84
+ name: @caption # The name of the link attachment.
85
+ title: @title
86
+ caption: @caption
87
+ description: @description
88
+ picture: @image
89
+ # actions: {name: 'Jetradar Tokyo', link: 'http://www.jetradar.co.th/promo/tokyo'},
90
+ # redirect_uri
74
91
  (response)=>
75
- @_after_callback(response)
92
+ @callback.after_sharing(response)
76
93
  )
77
94
 
78
95
  detect_provider: ->
@@ -81,7 +98,7 @@ class @SharingTags.FacebookShare extends @SharingTags.Share
81
98
  "sharer"
82
99
  else if @app_id
83
100
  if @return_url then "dialog"
84
- else "fb_ui"
101
+ else "fb_ui_feed"
85
102
  else
86
103
  "sharer"
87
104
  @constructor._debug("Facebook#detect_provider", provider)
@@ -82,9 +82,7 @@ class @SharingTags
82
82
  @_debug: (args...)->
83
83
  console?.debug(args...) if SharingTags.debug
84
84
 
85
- constructor: ({@network, @url, @title, @description})->
86
- # @url = encodeURIComponent(url)
87
-
85
+ constructor: ({@network, @url, @title, @description, @image})->
88
86
  @_assert_vars 'url'
89
87
  @callback = new SharingTags.Share.Callback(@)
90
88
 
@@ -1,6 +1,6 @@
1
1
  // svg icon styles
2
2
 
3
- @mixin sharing-tags-icon-color($network, $color, $hover_color: saturate($color, 20), $hover_fill: none)
3
+ @mixin sharing-tags-icon-color($network, $color, $hover_in: #FFFFFF, $hover_fill: $color)
4
4
  .sharing_tags-buttons__icon
5
5
  .#{$network}-sharing-tags-icon-in
6
6
  fill: $color
@@ -11,10 +11,10 @@
11
11
 
12
12
  &:hover
13
13
  .#{$network}-sharing-tags-icon-in
14
- fill: $hover_color
14
+ fill: $hover_in
15
15
 
16
16
  .#{$network}-sharing-tags-icon-fill
17
- stroke: $hover_color
17
+ stroke: $hover_fill
18
18
  fill: $hover_fill
19
19
 
20
20
  .sharing-tags-icon-in
@@ -48,7 +48,7 @@ module SharingTags
48
48
  def add_layout
49
49
  ## slim
50
50
  source_file = "app/views/layouts/application.html.slim"
51
- render_meta_tags = "render_sharing_tags"
51
+ render_meta_tags = "sharing_meta_tags"
52
52
  buttons_tags = "sharing_tags_buttons"
53
53
 
54
54
  insert_into_file_if(source_file, render_meta_tags, before: "body") do
@@ -17,7 +17,7 @@ module SharingTags
17
17
  end
18
18
 
19
19
  def link_to_facebook_share(name_or_options = nil, &block)
20
- share_to name_or_options, :facebook, [:app_id, :provider], &block
20
+ share_to name_or_options, :facebook, [:app_id, :provider, :title, :description, :caption, :image], &block
21
21
  end
22
22
 
23
23
  def link_to_vkontakte_share(name_or_options = nil, &block)
@@ -7,7 +7,8 @@ module SharingTags
7
7
 
8
8
  def render_sharing_tags
9
9
  render template: "sharing_tags/meta_tags.html.slim"
10
- end
10
+ end
11
+ alias_method :sharing_meta_tags, :render_sharing_tags
11
12
  end
12
13
  end
13
14
  end
@@ -12,6 +12,10 @@ module SharingTags
12
12
  def app_id(app_id = nil, &block)
13
13
  attributes[:app_id] = store_value(app_id, &block)
14
14
  end
15
+
16
+ def caption(message = nil, &block)
17
+ attributes[:caption] = store_value(message, &block)
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -1,3 +1,3 @@
1
1
  module SharingTags
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -5,7 +5,7 @@
5
5
  <%= stylesheet_link_tag 'application', media: 'all' %>
6
6
  <%= javascript_include_tag 'application' %>
7
7
  <%= csrf_meta_tags %>
8
- <%= render_sharing_tags %>
8
+ <%= sharing_meta_tags %>
9
9
  </head>
10
10
  <body>
11
11
 
@@ -101,8 +101,8 @@ describe SharingTags::Generators::InstallGenerator, type: :generator do
101
101
  run_generator
102
102
  end
103
103
 
104
- it "expect added render_sharing_tags " do
105
- generator_command = '= render_sharing_tags'
104
+ it "expect added sharing_meta_tags " do
105
+ generator_command = '= sharing_meta_tags'
106
106
  is_expected.to contain(generator_command)
107
107
  end
108
108
 
@@ -130,7 +130,7 @@ describe SharingTags::Generators::InstallGenerator, type: :generator do
130
130
  let(:file_path) { "app/views/layouts/application.html.erb" }
131
131
 
132
132
  it "expect added render_sharing_tags " do
133
- generator_command = '<%= render_sharing_tags %>'
133
+ generator_command = '<%= sharing_meta_tags %>'
134
134
  is_expected.to contain(generator_command)
135
135
  end
136
136
 
@@ -5,7 +5,7 @@ RSpec.describe SharingTags::ActionView::MetaHelper, type: :helper do
5
5
  pending
6
6
  end
7
7
 
8
- describe "#render_sharing_tags" do
8
+ describe "#sharing_meta_tags" do
9
9
  before do
10
10
  SharingTags.configure do
11
11
  title "Sharing title"
@@ -16,20 +16,20 @@ RSpec.describe SharingTags::ActionView::MetaHelper, type: :helper do
16
16
  end
17
17
 
18
18
  it "generate open graph meta tags" do
19
- expect(helper.render_sharing_tags).to have_tag "meta", with: {property: "og:title", content: "Sharing title"}
20
- expect(helper.render_sharing_tags).to have_tag "meta", with: {property: "og:description", content: "Sharing description"}
21
- expect(helper.render_sharing_tags).to have_tag "meta", with: {property: "og:image", content: "http://img.png"}
19
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {property: "og:title", content: "Sharing title"}
20
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {property: "og:description", content: "Sharing description"}
21
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {property: "og:image", content: "http://img.png"}
22
22
  end
23
23
 
24
24
  it "generate schema meta tags" do
25
- expect(helper.render_sharing_tags).to have_tag "meta", with: {itemprop: "name", content: "Sharing title"}
26
- expect(helper.render_sharing_tags).to have_tag "meta", with: {itemprop: "description", content: "Sharing description"}
27
- expect(helper.render_sharing_tags).to have_tag "meta", with: {itemprop: "image", content: "http://img.png"}
25
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {itemprop: "name", content: "Sharing title"}
26
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {itemprop: "description", content: "Sharing description"}
27
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {itemprop: "image", content: "http://img.png"}
28
28
  end
29
29
 
30
30
  it "generate twitter card meta tags" do
31
- expect(helper.render_sharing_tags).to have_tag "meta", with: {name: "twitter:title", content: "Sharing title"}
32
- expect(helper.render_sharing_tags).to have_tag "meta", with: {name: "twitter:description", content: "Sharing description"}
31
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {name: "twitter:title", content: "Sharing title"}
32
+ expect(helper.sharing_meta_tags).to have_tag "meta", with: {name: "twitter:description", content: "Sharing description"}
33
33
  end
34
34
  end
35
35
  end
@@ -37,6 +37,15 @@
37
37
  "sharer": {
38
38
  "url": "http://fb_ui.url",
39
39
  "provider": "sharer"
40
- }
40
+ },
41
41
 
42
+ "fb_ui_feed": {
43
+ "url": "http://ui.feed/share.url",
44
+ "provider": "fb_ui_feed",
45
+ "caption": "Caption",
46
+ "title": "Title full",
47
+ "description": "Description",
48
+ "image": "http://image.url",
49
+ "app_id": "123"
50
+ }
42
51
  }
@@ -214,6 +214,24 @@ describe "SharingTags.FacebookShare", ->
214
214
  jasmine.any(Function)
215
215
  )
216
216
 
217
+ describe "#_fb_ui_feed", ->
218
+ beforeEach ->
219
+ @fb = @fb_fixture.fb_ui_feed
220
+ @share = new subject(@fb)
221
+ window.FB = jasmine.createSpyObj "FB", ['ui', 'init']
222
+
223
+ it "expect call FB.ui method with params", ->
224
+ @share._fb_ui_feed()
225
+ expect(FB.ui).toHaveBeenCalled()
226
+ expect(FB.ui).toHaveBeenCalledWith(
227
+ jasmine.objectContaining(
228
+ link: @fb.url, method: 'feed', title: @fb.title,
229
+ description: @fb.description, caption: @fb.caption,
230
+ picture: @fb.image
231
+ ),
232
+ jasmine.any(Function)
233
+ )
234
+
217
235
  describe "#detect_provider", ->
218
236
 
219
237
  it "expect call detect provider for auto provider", ->
@@ -165,6 +165,7 @@ describe SharingTags::Configuration do
165
165
  facebook do
166
166
  app_id "APP ID"
167
167
  provider "sharer"
168
+ caption "Caption"
168
169
  end
169
170
  end
170
171
  end
@@ -172,6 +173,7 @@ describe SharingTags::Configuration do
172
173
  it "expect get app id" do
173
174
  expect(subject.facebook.app_id).to be == "APP ID"
174
175
  expect(subject.facebook.provider).to be == "sharer"
176
+ expect(subject.facebook.caption).to be == "Caption"
175
177
  end
176
178
 
177
179
  end
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.12
4
+ version: 0.0.13
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-20 00:00:00.000000000 Z
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails