Skip to content

Commit

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

Installation
Expand Down
10 changes: 7 additions & 3 deletions assets/css/social-icons.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@font-face {
font-family: 'social-icons';
src:
url('../fonts/social-icons.ttf?6gmr10') format('truetype'),
url('../fonts/social-icons.woff?6gmr10') format('woff'),
url('../fonts/social-icons.svg?6gmr10#social-icons') format('svg');
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');
font-weight: normal;
font-style: normal;
}
Expand All @@ -23,6 +23,9 @@ i {
-moz-osx-font-smoothing: grayscale;
}

.si-viber:before {
content: "\e900";
}
.si-mail:before {
content: "\f0e0";
}
Expand All @@ -47,3 +50,4 @@ i {
.si-vk:before {
content: "\f189";
}

59 changes: 49 additions & 10 deletions assets/fonts/selection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
{
"IcoMoonType": "selection",
"icons": [
{
"icon": {
"paths": [
"M875.949 429.708c1.231-144.371-121.732-276.722-274.101-295.023-3.031-0.359-6.332-0.906-9.827-1.485-7.543-1.25-15.344-2.535-23.215-2.535-31.229 0-39.577 21.936-41.774 35.020-2.137 12.72-0.099 23.403 6.049 31.763 10.342 14.063 28.538 16.559 43.154 18.559 4.284 0.592 8.326 1.142 11.709 1.902 136.898 30.59 182.994 78.683 205.522 214.417 0.55 3.317 0.798 7.403 1.062 11.738 0.983 16.225 3.031 49.982 39.322 49.982h0.003c3.021 0 6.268-0.261 9.648-0.776 33.795-5.136 32.736-35.993 32.227-50.818-0.143-4.176-0.28-8.125 0.073-10.752 0.095-0.661 0.143-1.326 0.146-1.991z",
"M559.947 81.691c4.055 0.293 7.893 0.572 11.089 1.062 224.8 34.571 328.182 141.080 356.832 367.638 0.487 3.851 0.563 8.548 0.642 13.522 0.286 17.701 0.875 54.523 40.419 55.286l1.228 0.013c12.402 0 22.267-3.74 29.324-11.124 12.31-12.876 11.452-32.005 10.758-47.377-0.169-3.772-0.331-7.324-0.289-10.434 2.859-231.71-197.712-441.824-429.215-449.638-0.96-0.032-1.876 0.019-2.802 0.149-0.455 0.067-1.297 0.149-2.741 0.149-2.309 0-5.149-0.2-8.16-0.404-3.641-0.248-7.769-0.534-11.954-0.534-36.867 0-43.876 26.204-44.773 41.825-2.067 36.101 32.857 38.642 49.642 39.866z",
"M917.021 743.205c-4.78-3.651-9.722-7.429-14.349-11.156-24.544-19.752-50.656-37.958-75.91-55.566-5.241-3.651-10.482-7.305-15.703-10.968-32.348-22.722-61.43-33.763-88.907-33.763-37.007 0-69.273 20.448-95.903 60.769-11.798 17.875-26.112 26.567-43.752 26.567-10.431 0-22.283-2.977-35.223-8.85-104.413-47.349-178.971-119.945-221.607-215.771-20.61-46.315-13.929-76.59 22.344-101.23 20.598-13.98 58.937-40.006 56.221-89.845-3.075-56.597-127.952-226.889-180.567-246.231-22.277-8.192-45.682-8.268-69.692-0.191-60.486 20.334-103.891 56.043-125.535 103.262-20.916 45.625-19.971 99.198 2.732 154.926 65.631 161.124 157.906 301.603 274.27 417.528 113.899 113.48 253.892 206.435 416.084 276.273 14.619 6.29 29.954 9.722 41.151 12.224 3.816 0.859 7.111 1.59 9.512 2.248 1.32 0.359 2.681 0.553 4.045 0.566l1.282 0.006c0.003 0 0 0 0.006 0 76.285 0 167.882-69.708 196.013-149.18 24.646-69.587-20.353-103.984-56.511-131.619z",
"M593.688 265.744c-13.061 0.331-40.241 1.005-49.778 28.688-4.462 12.937-3.927 24.169 1.59 33.385 8.097 13.522 23.609 17.666 37.719 19.939 51.171 8.211 77.452 36.508 82.709 89.043 2.442 24.496 18.938 41.602 40.117 41.602h0.003c1.565 0 3.164-0.092 4.757-0.286 25.473-3.031 37.821-21.746 36.705-55.62 0.407-35.353-18.095-75.49-49.562-107.46-31.575-32.068-69.638-50.128-104.26-49.292z"
],
"attrs": [
{},
{},
{},
{}
],
"isMulticolor": false,
"isMulticolor2": false,
"grid": 0,
"tags": [
"viber"
]
},
"attrs": [
{},
{},
{},
{}
],
"properties": {
"order": 16,
"id": 0,
"name": "viber",
"prevSize": 32,
"code": 59648
},
"setIdx": 0,
"setId": 5,
"iconIdx": 0
},
{
"icon": {
"paths": [
Expand All @@ -11,7 +49,8 @@
"isMulticolor": false,
"isMulticolor2": false,
"tags": [
"envelope"
"mail",
"gmail"
],
"defaultCode": 61664,
"grid": 14
Expand All @@ -24,7 +63,7 @@
"prevSize": 28,
"code": 61664
},
"setIdx": 0,
"setIdx": 3,
"setId": 2,
"iconIdx": 199
},
Expand Down Expand Up @@ -52,7 +91,7 @@
"prevSize": 28,
"code": 61912
},
"setIdx": 1,
"setIdx": 4,
"setId": 1,
"iconIdx": 0
},
Expand Down Expand Up @@ -80,7 +119,7 @@
"prevSize": 28,
"code": 62001
},
"setIdx": 1,
"setIdx": 4,
"setId": 1,
"iconIdx": 1
},
Expand Down Expand Up @@ -108,7 +147,7 @@
"prevSize": 28,
"code": 61593
},
"setIdx": 1,
"setIdx": 4,
"setId": 1,
"iconIdx": 2
},
Expand Down Expand Up @@ -136,7 +175,7 @@
"prevSize": 28,
"code": 61594
},
"setIdx": 1,
"setIdx": 4,
"setId": 1,
"iconIdx": 3
},
Expand Down Expand Up @@ -164,7 +203,7 @@
"prevSize": 28,
"code": 61653
},
"setIdx": 1,
"setIdx": 4,
"setId": 1,
"iconIdx": 4
},
Expand Down Expand Up @@ -192,7 +231,7 @@
"prevSize": 28,
"code": 61665
},
"setIdx": 1,
"setIdx": 4,
"setId": 1,
"iconIdx": 5
},
Expand Down Expand Up @@ -220,7 +259,7 @@
"prevSize": 28,
"code": 61833
},
"setIdx": 1,
"setIdx": 4,
"setId": 1,
"iconIdx": 6
}
Expand All @@ -239,7 +278,7 @@
"prefix": "si-",
"metadata": {
"fontFamily": "social-icons",
"majorVersion": 4,
"majorVersion": 5,
"minorVersion": 0,
"fontURL": "https://github.com/black-lamp/yii2-socialshare",
"description": "Social networks icons for SocialShare widget"
Expand Down
1 change: 1 addition & 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.
5 changes: 3 additions & 2 deletions classes/Gmail.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<?php
namespace bl\socialShare\classes;

use bl\socialShare\base\SocialNetwork;
use yii\helpers\Html;

use bl\socialShare\base\SocialNetwork;

/**
* @author Vladimir Kuprienko <[email protected]>
*
* @property string $_route
* @property string $label
* @property array $attributes
*
* @property array $bodyPattern
* @property string $bodyPattern
*/
class Gmail extends SocialNetwork
{
Expand Down
33 changes: 33 additions & 0 deletions classes/mobile/Viber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
namespace bl\socialShare\classes\mobile;

use yii\helpers\Html;

use bl\socialShare\base\SocialNetwork;

/**
* Class for Viber
* This link work only with mobile devices
*
* @author Vladimir Kuprienko <[email protected]>
*
* @property string $_route
* @property string $label
* @property array $attributes
*/
class Viber extends SocialNetwork
{
/**
* @inheritdoc
*/
public function getLink($url, $title, $description, $image, $component)
{
$this->_route = "viber://forward?text=$url";

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

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

0 comments on commit eda42a5

Please sign in to comment.