From 373d27d8ff41bb42396c2a34fafd4fb39093471a Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Thu, 26 Mar 2020 22:00:19 +0100 Subject: [PATCH] Add VK --- src/index.ts | 1 + src/style.scss | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index c242f61..00d95d0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,6 +18,7 @@ const NETWORKS: { [name: string]: UrlBuilder } = { pinterest: (d) => `https://pinterest.com/pin/create/button/?url=${d.url}&description=${d.title}${d.extra.media ? `&media=${d.extra.media}` : ''}`, telegram: (d) => `https://telegram.me/share/url?url=${d.url}${d.extra.text ? `&text=${d.extra.text}` : ''}`, twitter: (d) => `https://twitter.com/intent/tweet?url=${d.url}&text=${d.title}${d.extra.via ? `&via=${d.extra.via}` : ''}`, + vkontakte: (d) => `https://vk.com/share.php?url=${d.url}&title=${d.title}${d.extra.media ? `&image=${d.extra.media}` : ''}`, whatsapp: (d) => `whatsapp://send?text=${d.title}%0D%0A${d.url}${d.extra.text ? `%0D%0A%0D%0A${d.extra.text}` : ''}`, }; diff --git a/src/style.scss b/src/style.scss index e42b426..96274ba 100644 --- a/src/style.scss +++ b/src/style.scss @@ -106,6 +106,14 @@ $width: $button-size - 2*$padding-hor; } } + &.vkontakte { + background-color: #4680C2; + + &::before { + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M97.647 24.37c.741-2.33 0-4.024-3.283-4.024H83.455c-2.753 0-4.024 1.483-4.766 3.071 0 0-5.613 13.556-13.45 22.347-2.542 2.541-3.707 3.389-5.083 3.389-.742 0-1.695-.848-1.695-3.177V24.264c0-2.753-.847-4.024-3.177-4.024H38.127c-1.695 0-2.754 1.271-2.754 2.542 0 2.647 3.919 3.283 4.342 10.696v16.098c0 3.495-.635 4.131-2.012 4.131-3.707 0-12.709-13.662-18.11-29.231-1.059-3.071-2.118-4.236-4.872-4.236H3.707C.53 20.24 0 21.723 0 23.311c0 2.86 3.707 17.263 17.263 36.327 9.002 13.026 21.817 20.016 33.361 20.016 6.99 0 7.837-1.588 7.837-4.236v-9.85c0-3.177.635-3.706 2.86-3.706 1.588 0 4.448.847 10.908 7.095 7.414 7.414 8.684 10.803 12.815 10.803h10.908c3.178 0 4.66-1.589 3.813-4.66-.953-3.071-4.554-7.519-9.214-12.815-2.542-2.965-6.354-6.248-7.519-7.837-1.589-2.118-1.165-2.965 0-4.872-.106 0 13.238-18.851 14.615-25.206' fill='%23fff'/%3E%3C/svg%3E"); + } + } + &.whatsapp { background-color: #25D366;