diff --git a/README.md b/README.md index dc0a1df..0dbc77e 100644 --- a/README.md +++ b/README.md @@ -16,19 +16,19 @@ Beautiful button design **already included**. Just choose one, add attribute to ### Full Documentation -* [https://koddr.github.io/vue-goodshare/](https://koddr.github.io/vue-goodshare/) +- [https://koddr.github.io/vue-goodshare/](https://koddr.github.io/vue-goodshare/) ### Requirements -* Vue.js >= 2.4.0 -* vue-style-loader >= 3.0.0 -* css-loader >= 0.28.0 -* sass-loader >= 6.0.0 -* node-sass >= 4.6.0 +- Vue.js >= 2.5.x +- vue-style-loader >= 3.1.x +- css-loader >= 0.28.x +- sass-loader >= 6.0.x +- node-sass >= 4.9.x ### Install component -``` bash +```bash $ npm install vue-goodshare --save ``` @@ -40,36 +40,36 @@ Init `vue-goodshare` component after [Vue.js](https://github.com/vuejs/vue) in y Includes **only needed** social networks and/or mobile messengers. -``` js +```js // ./src/js/script.js -import Vue from 'vue' +import Vue from "vue"; // Import vue-goodshare single elements -import VueGoodshareFacebook from 'vue-goodshare/src/providers/Facebook.vue' +import VueGoodshareFacebook from "vue-goodshare/src/providers/Facebook.vue"; const app = new Vue({ - el: '#app', + el: "#app", components: { VueGoodshareFacebook } -}) +}); ``` Add components to HTML template (with attributes): -``` html +```html
- - +
``` @@ -81,25 +81,25 @@ And result is: > Facebook, Twitter, LinkedIn, Google Plus, Tumblr, Pinterest, Reddit -``` js +```js // ./src/js/script.js -import Vue from 'vue' +import Vue from "vue"; // Import vue-goodshare bundle -import VueGoodshare from 'vue-goodshare' +import VueGoodshare from "vue-goodshare"; const app = new Vue({ - el: '#app', + el: "#app", components: { VueGoodshare } -}) +}); ``` Add component to HTML template (without attributes): -``` html +```html
@@ -115,21 +115,21 @@ And result is: ### Live demo & Testing on localhost -* Clone repository from GitHub: +- Clone repository from GitHub: -``` bash +```bash $ git clone https://github.com/koddr/vue-goodshare.git ``` -* Go to `examples` folder: +- Go to `examples` folder: -``` bash +```bash $ cd vue-goodshare/examples ``` -* Start simple Python 3.4+ HTTP server (only macOS and Linux): +- Start simple Python 3.4+ HTTP server (only macOS and Linux): -``` bash +```bash $ python3 -m http.server 4000 --bind localhost ``` @@ -138,14 +138,16 @@ $ python3 -m http.server 4000 --bind localhost Development and maintenance engaged by [Vic Shóstak](https://github.com/koddr) (aka Koddr). If you want to say «thank you» and/or ask me about `vue-goodshare` — [create new issue](https://github.com/koddr/vue-goodshare/issues/new). -___ +--- + > ### Your assistance will help make project even better! > -> * [Donate with PayPal](https://www.paypal.me/koddr/9.99usd) -> * [Donate with Yandex.Money](https://money.yandex.ru/to/41001601525977/599) +> - [Donate with PayPal](https://www.paypal.me/koddr/9.99usd) +> - [Donate with Yandex.Money](https://money.yandex.ru/to/41001601525977/599) > > #### Thanks for supporting! -___ + +--- ### License diff --git a/package-lock.json b/package-lock.json index 0feb022..a710ecf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,6 +46,12 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "ansistyles": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", + "integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=", + "dev": true + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -827,14 +833,6 @@ "glob": "~7.1.1", "lodash": "~4.17.10", "minimatch": "~3.0.2" - }, - "dependencies": { - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - } } }, "graceful-fs": { @@ -1361,18 +1359,18 @@ } }, "mime-db": { - "version": "1.35.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", "dev": true }, "mime-types": { - "version": "2.1.19", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", - "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", + "version": "2.1.20", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", "dev": true, "requires": { - "mime-db": "~1.35.0" + "mime-db": "~1.36.0" } }, "minimatch": { @@ -1418,9 +1416,9 @@ } }, "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", "dev": true }, "neo-async": { @@ -1458,9 +1456,9 @@ } }, "node-sass": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.2.tgz", - "integrity": "sha512-LdxoJLZutx0aQXHtWIYwJKMj+9pTjneTcLWJgzf2XbGu0q5pRNqW5QvFCEdm3mc5rJOdru/mzln5d0EZLacf6g==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.3.tgz", + "integrity": "sha512-XzXyGjO+84wxyH7fV6IwBOTrEBe2f0a6SBze9QWWYR/cL74AcQUks2AsqcCZenl/Fp/JVbuEaLpgrLtocwBUww==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -1476,7 +1474,7 @@ "meow": "^3.7.0", "mkdirp": "^0.5.1", "nan": "^2.10.0", - "node-gyp": "^3.3.1", + "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "2.87.0", "sass-graph": "^2.2.4", @@ -4594,12 +4592,6 @@ "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", "dev": true }, - "ansistyles": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", - "integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=", - "dev": true - }, "archy": { "version": "1.0.0", "bundled": true, @@ -5260,12 +5252,6 @@ } } }, - "path-is-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz", - "integrity": "sha1-mNjx0DC/BL167uShulSF1AMY/Yk=", - "dev": true - }, "read": { "version": "1.0.7", "bundled": true, @@ -6228,6 +6214,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz", + "integrity": "sha1-mNjx0DC/BL167uShulSF1AMY/Yk=", + "dev": true + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -7102,9 +7094,9 @@ } }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", "dev": true }, "set-blocking": { @@ -7215,9 +7207,9 @@ } }, "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", + "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", "dev": true, "requires": { "readable-stream": "^2.0.1" @@ -7333,27 +7325,12 @@ "dev": true }, "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", + "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", "dev": true, "requires": { - "glob": "^6.0.4" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } + "glob": "^7.1.2" } }, "tunnel-agent": { diff --git a/package.json b/package.json index 5cdfd54..069a12f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-goodshare", - "version": "0.9.4", + "version": "1.0.0", "description": "Vue.js component for social share. A simple way to share a link on the pages of your website in the most popular (and not so) social networks.", "main": "src/VueGoodshare.vue", "scripts": { @@ -18,14 +18,16 @@ "devDependencies": { "css-loader": "^0.28.11", "gitbook-cli": "^2.3.2", - "node-sass": "^4.9.2", + "node-sass": "^4.9.3", "sass-loader": "^6.0.7", "vue-style-loader": "^3.1.2" }, "keywords": [ "social share buttons", + "vue share social", "share buttons", "social share", + "vue share", "share" ], "author": "Vic Shóstak (https://webartisans.org)", diff --git a/src/VueGoodshare.vue b/src/VueGoodshare.vue index 2f5816c..e2485d9 100644 --- a/src/VueGoodshare.vue +++ b/src/VueGoodshare.vue @@ -1,75 +1,75 @@ diff --git a/src/helpers/description.js b/src/helpers/description.js index 1e6a70e..fbf93f5 100644 --- a/src/helpers/description.js +++ b/src/helpers/description.js @@ -1,7 +1,7 @@ /** * @return {String} description meta content */ - export function metaDescription() { - const meta = document.querySelector('meta[name="description"]') - return meta ? meta.content : '' +export function metaDescription() { + const meta = document.querySelector('meta[name="description"]'); + return meta ? meta.content : ""; } diff --git a/src/helpers/href.js b/src/helpers/href.js index 099f47c..cd4d06c 100644 --- a/src/helpers/href.js +++ b/src/helpers/href.js @@ -1,16 +1,13 @@ -/** - * @return {String} document location href without hash - */ -export function documentHrefWithoutHash() { - return document.location.href.replace( - document.location.hash, - '' - ); -} - -/** - * @return {String} document location - */ -export function documentHref() { - return document.location.href; -} +/** + * @return {String} document location href without hash + */ +export function documentHrefWithoutHash() { + return document.location.href.replace(document.location.hash, ""); +} + +/** + * @return {String} document location + */ +export function documentHref() { + return document.location.href; +} diff --git a/src/helpers/icon.js b/src/helpers/icon.js index b5ea97a..e0f975a 100644 --- a/src/helpers/icon.js +++ b/src/helpers/icon.js @@ -1,7 +1,8 @@ /** * @return {String} apple-touch-icon link source */ - export function linkAppleTouchIcon() { - const link = document.querySelector('link[rel="apple-touch-icon"]') - return link ? link.src : '' + +export function linkAppleTouchIcon() { + const link = document.querySelector('link[rel="apple-touch-icon"]'); + return link ? link.src : ""; } diff --git a/src/helpers/title.js b/src/helpers/title.js index 64169e5..21875f3 100644 --- a/src/helpers/title.js +++ b/src/helpers/title.js @@ -1,6 +1,7 @@ /** * @return {String} document title */ - export function documentTitle() { + +export function documentTitle() { return document.title; } diff --git a/src/providers/Facebook.vue b/src/providers/Facebook.vue index 2cdec42..8df91cc 100644 --- a/src/providers/Facebook.vue +++ b/src/providers/Facebook.vue @@ -1,241 +1,281 @@ - - - - - + + + + + diff --git a/src/providers/GooglePlus.vue b/src/providers/GooglePlus.vue index 0cf9bff..9db713e 100644 --- a/src/providers/GooglePlus.vue +++ b/src/providers/GooglePlus.vue @@ -14,150 +14,186 @@ diff --git a/src/providers/Line.vue b/src/providers/Line.vue index 07fa328..983231a 100644 --- a/src/providers/Line.vue +++ b/src/providers/Line.vue @@ -14,150 +14,184 @@ diff --git a/src/providers/LinkedIn.vue b/src/providers/LinkedIn.vue index caf633f..c34bd8d 100644 --- a/src/providers/LinkedIn.vue +++ b/src/providers/LinkedIn.vue @@ -15,242 +15,284 @@ {{ title_social }} {{ counter_linkedin }} diff --git a/src/providers/LiveJournal.vue b/src/providers/LiveJournal.vue index 56bdd07..a3b54e8 100644 --- a/src/providers/LiveJournal.vue +++ b/src/providers/LiveJournal.vue @@ -15,156 +15,193 @@ diff --git a/src/providers/MoiMir.vue b/src/providers/MoiMir.vue index c37eee4..c0aeaaf 100644 --- a/src/providers/MoiMir.vue +++ b/src/providers/MoiMir.vue @@ -16,247 +16,288 @@ {{ title_social }} {{ counter_moimir }} diff --git a/src/providers/Odnoklassniki.vue b/src/providers/Odnoklassniki.vue index 7926435..28719fa 100644 --- a/src/providers/Odnoklassniki.vue +++ b/src/providers/Odnoklassniki.vue @@ -1,261 +1,299 @@ - - - - - + + + + + diff --git a/src/providers/Pinterest.vue b/src/providers/Pinterest.vue index e64728d..de9d12e 100644 --- a/src/providers/Pinterest.vue +++ b/src/providers/Pinterest.vue @@ -20,235 +20,277 @@ diff --git a/src/providers/Reddit.vue b/src/providers/Reddit.vue index aa8ba85..8d47cc0 100644 --- a/src/providers/Reddit.vue +++ b/src/providers/Reddit.vue @@ -20,238 +20,278 @@ diff --git a/src/providers/Telegram.vue b/src/providers/Telegram.vue index 9eba58a..063ee60 100644 --- a/src/providers/Telegram.vue +++ b/src/providers/Telegram.vue @@ -1,163 +1,199 @@ - - - - - + + + + + diff --git a/src/providers/Tumblr.vue b/src/providers/Tumblr.vue index ba0a870..c8e16a3 100644 --- a/src/providers/Tumblr.vue +++ b/src/providers/Tumblr.vue @@ -21,236 +21,278 @@ diff --git a/src/providers/Twitter.vue b/src/providers/Twitter.vue index e819263..b91c41d 100644 --- a/src/providers/Twitter.vue +++ b/src/providers/Twitter.vue @@ -15,156 +15,193 @@ diff --git a/src/providers/Viber.vue b/src/providers/Viber.vue index 8d76689..e943c5b 100644 --- a/src/providers/Viber.vue +++ b/src/providers/Viber.vue @@ -14,150 +14,184 @@ diff --git a/src/providers/Vkontakte.vue b/src/providers/Vkontakte.vue index 5658122..4b121c6 100644 --- a/src/providers/Vkontakte.vue +++ b/src/providers/Vkontakte.vue @@ -1,277 +1,322 @@ - - - - - + + + + + diff --git a/src/providers/WhatsApp.vue b/src/providers/WhatsApp.vue index f630fe9..56ceb26 100644 --- a/src/providers/WhatsApp.vue +++ b/src/providers/WhatsApp.vue @@ -1,163 +1,197 @@ - - - - - + + + + +