Skip to content

Commit

Permalink
Added class for 'WhatsApp'
Browse files Browse the repository at this point in the history
  • Loading branch information
greeflas committed Nov 7, 2016
1 parent eda42a5 commit 1b1cced
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ It supports from the box
* Pinterest
* Telegram
* Viber
* WhatsApp
* Gmail

Installation
Expand Down
21 changes: 17 additions & 4 deletions assets/css/social-icons.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@font-face {
font-family: 'social-icons';
src:
url('../fonts/social-icons.ttf?mj1sgv') format('truetype'),
url('../fonts/social-icons.woff?mj1sgv') format('woff'),
url('../fonts/social-icons.svg?mj1sgv#social-icons') format('svg');
url('../fonts/social-icons.ttf?p3676z') format('truetype'),
url('../fonts/social-icons.woff?p3676z') format('woff'),
url('../fonts/social-icons.svg?p3676z#social-icons') format('svg');
font-weight: normal;
font-style: normal;
}

i {
i, .icomoon-liga {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'social-icons' !important;
speak: none;
Expand All @@ -18,6 +18,16 @@ i {
text-transform: none;
line-height: 1;

/* Enable Ligatures ================ */
letter-spacing: 0;
-webkit-font-feature-settings: "liga";
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
-ms-font-feature-settings: "liga" 1;
font-feature-settings: "liga";
-webkit-font-variant-ligatures: discretionary-ligatures;
font-variant-ligatures: discretionary-ligatures;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand All @@ -26,6 +36,9 @@ i {
.si-viber:before {
content: "\e900";
}
.si-whatsapp:before {
content: "\ea93";
}
.si-mail:before {
content: "\f0e0";
}
Expand Down
29 changes: 28 additions & 1 deletion assets/fonts/selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,33 @@
"setId": 5,
"iconIdx": 0
},
{
"icon": {
"paths": [
"M873 148.8c-95.8-96-223.2-148.8-359-148.8-279.6 0-507.2 227.6-507.2 507.4 0 89.4 23.4 176.8 67.8 253.6l-72 263 269-70.6c74.2 40.4 157.6 61.8 242.4 61.8h0.2c0 0 0 0 0 0 279.6 0 507.4-227.6 507.4-507.4 0-135.6-52.8-263-148.6-359zM514.2 929.6v0c-75.8 0-150-20.4-214.8-58.8l-15.4-9.2-159.6 41.8 42.6-155.6-10-16c-42.4-67-64.6-144.6-64.6-224.4 0-232.6 189.2-421.8 422-421.8 112.6 0 218.6 44 298.2 123.6 79.6 79.8 123.4 185.6 123.4 298.4-0.2 232.8-189.4 422-421.8 422zM745.4 613.6c-12.6-6.4-75-37-86.6-41.2s-20-6.4-28.6 6.4c-8.4 12.6-32.8 41.2-40.2 49.8-7.4 8.4-14.8 9.6-27.4 3.2s-53.6-19.8-102-63c-37.6-33.6-63.2-75.2-70.6-87.8s-0.8-19.6 5.6-25.8c5.8-5.6 12.6-14.8 19-22.2s8.4-12.6 12.6-21.2c4.2-8.4 2.2-15.8-1-22.2s-28.6-68.8-39-94.2c-10.2-24.8-20.8-21.4-28.6-21.8-7.4-0.4-15.8-0.4-24.2-0.4s-22.2 3.2-33.8 15.8c-11.6 12.6-44.4 43.4-44.4 105.8s45.4 122.6 51.8 131.2c6.4 8.4 89.4 136.6 216.6 191.4 30.2 13 53.8 20.8 72.2 26.8 30.4 9.6 58 8.2 79.8 5 24.4-3.6 75-30.6 85.6-60.2s10.6-55 7.4-60.2c-3-5.6-11.4-8.8-24.2-15.2z"
],
"attrs": [],
"isMulticolor": false,
"isMulticolor2": false,
"tags": [
"whatsapp"
],
"defaultCode": 60051,
"grid": 16
},
"attrs": [],
"properties": {
"name": "whatsapp",
"ligatures": "whatsapp, brand13",
"id": 403,
"order": 17,
"prevSize": 32,
"code": 60051
},
"setIdx": 2,
"setId": 3,
"iconIdx": 403
},
{
"icon": {
"paths": [
Expand Down Expand Up @@ -278,7 +305,7 @@
"prefix": "si-",
"metadata": {
"fontFamily": "social-icons",
"majorVersion": 5,
"majorVersion": 6,
"minorVersion": 0,
"fontURL": "https://github.com/black-lamp/yii2-socialshare",
"description": "Social networks icons for SocialShare widget"
Expand Down
4 changes: 4 additions & 0 deletions assets/fonts/social-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fonts/social-icons.ttf
Binary file not shown.
Binary file modified assets/fonts/social-icons.woff
Binary file not shown.
26 changes: 26 additions & 0 deletions classes/mobile/WhatsApp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
namespace bl\socialShare\classes\mobile;

use yii\helpers\Html;

use bl\socialShare\base\SocialNetwork;

/**
* @author Vladimir Kuprienko <vldmr.kuprienko@gmail.com>
*/
class WhatsApp extends SocialNetwork
{
/**
* @inheritdoc
*/
public function getLink($url, $title, $description, $image, $component)
{
$this->_route = "whatsapp://send?text=$url";

if($component->defaultIcons) {
$this->label = Html::tag('i', '', ['class' => 'si-whatsapp']);
}

return $this->initLink($component);
}
}

0 comments on commit 1b1cced

Please sign in to comment.