Browse Source

Added new share button: Evernot, Facebook, LinkedIn

dependabot/npm_and_yarn/lodash-4.17.19
Alexandrshy 6 years ago
parent
commit
8c37e85070
  1. 129
      src/App.vue
  2. 10
      src/components/BloggerButton.vue
  3. 6
      src/components/DiggButton.vue
  4. 68
      src/components/EvernoteButton.vue
  5. 68
      src/components/FacebookButton.vue
  6. 68
      src/components/LinkedInButton.vue
  7. 10
      src/components/LiveJournalButton.vue
  8. 8
      src/components/RenrenButton.vue
  9. 8
      src/components/TwitterButton.vue
  10. 8
      src/components/VkontakteButton.vue
  11. 8
      src/components/WeiboButton.vue
  12. 21
      src/style/bloggerButton.css
  13. 3
      src/style/diggButton.css
  14. 42
      src/style/evernoteButton.css
  15. 42
      src/style/facebookButton.css
  16. 42
      src/style/linkedInButton.css
  17. 3
      src/style/livejournalButton.css
  18. 1
      src/style/renrenButton.css
  19. 1
      src/style/twitterButton.css
  20. 1
      src/style/vkontakteButton.css
  21. 3
      src/style/weiboButton.css

129
src/App.vue

@ -1,5 +1,6 @@
<template>
<div class="share-buttons">
<div class="share-buttons-group">
<twitter-button></twitter-button>
<twitter-button v-bind:isBlank="false" shareText="Twiiter share good work" btnText></twitter-button>
<twitter-button v-bind:hasIcon="false"></twitter-button>
@ -17,7 +18,8 @@
<twitter-button class="share-button--circle share-button--outline"></twitter-button>
<twitter-button class="share-button--circle share-button--outline" btnText></twitter-button>
<twitter-button class="share-button--circle share-button--outline" v-bind:hasIcon="false"></twitter-button>
<br>
</div>
<div class="share-buttons-group">
<liveJournal-button></liveJournal-button>
<liveJournal-button v-bind:isBlank="false" shareText="Twiiter share good work" btnText></liveJournal-button>
<liveJournal-button v-bind:hasIcon="false"></liveJournal-button>
@ -35,7 +37,8 @@
<liveJournal-button class="share-button--circle share-button--outline"></liveJournal-button>
<liveJournal-button class="share-button--circle share-button--outline" btnText></liveJournal-button>
<liveJournal-button class="share-button--circle share-button--outline" v-bind:hasIcon="false"></liveJournal-button>
<br>
</div>
<div class="share-buttons-group">
<digg-button></digg-button>
<digg-button v-bind:isBlank="false" shareText="Twiiter share good work" btnText></digg-button>
<digg-button v-bind:hasIcon="false"></digg-button>
@ -53,7 +56,8 @@
<digg-button class="share-button--circle share-button--outline"></digg-button>
<digg-button class="share-button--circle share-button--outline" btnText></digg-button>
<digg-button class="share-button--circle share-button--outline" v-bind:hasIcon="false"></digg-button>
<br>
</div>
<div class="share-buttons-group">
<renren-button></renren-button>
<renren-button v-bind:isBlank="false" shareText="Twiiter share good work" btnText></renren-button>
<renren-button v-bind:hasIcon="false"></renren-button>
@ -71,7 +75,8 @@
<renren-button class="share-button--circle share-button--outline"></renren-button>
<renren-button class="share-button--circle share-button--outline" btnText></renren-button>
<renren-button class="share-button--circle share-button--outline" v-bind:hasIcon="false"></renren-button>
<br>
</div>
<div class="share-buttons-group">
<blogger-button></blogger-button>
<blogger-button v-bind:isBlank="false" shareText="Twiiter share good work" btnText></blogger-button>
<blogger-button v-bind:hasIcon="false"></blogger-button>
@ -89,7 +94,8 @@
<blogger-button class="share-button--circle share-button--outline"></blogger-button>
<blogger-button class="share-button--circle share-button--outline" btnText></blogger-button>
<blogger-button class="share-button--circle share-button--outline" v-bind:hasIcon="false"></blogger-button>
<br>
</div>
<div class="share-buttons-group">
<weibo-button></weibo-button>
<weibo-button v-bind:isBlank="false" shareText="Twiiter share good work" btnText></weibo-button>
<weibo-button v-bind:hasIcon="false"></weibo-button>
@ -107,8 +113,43 @@
<weibo-button class="share-button--circle share-button--outline"></weibo-button>
<weibo-button class="share-button--circle share-button--outline" btnText></weibo-button>
<weibo-button class="share-button--circle share-button--outline" v-bind:hasIcon="false"></weibo-button>
<br>
</div>
<div class="share-buttons-group">
<evernote-button shareTitle="Comment"></evernote-button>
<evernote-button
v-bind:isBlank="false"
shareText="Twiiter share good work"
shareTitle="Comment"
btnText
></evernote-button>
<evernote-button v-bind:hasIcon="false" shareTitle="Comment"></evernote-button>
<evernote-button class="share-button--circle" shareTitle="Comment"></evernote-button>
<evernote-button class="share-button--circle" shareTitle="Comment" btnText></evernote-button>
<evernote-button class="share-button--circle" shareTitle="Comment" v-bind:hasIcon="false"></evernote-button>
<evernote-button class="share-button--outline" shareTitle="Comment"></evernote-button>
<evernote-button
class="share-button--outline"
v-bind:isBlank="false"
shareText="Twiiter share good work"
shareTitle="Comment"
btnText
></evernote-button>
<evernote-button class="share-button--outline" shareTitle="Comment" v-bind:hasIcon="false"></evernote-button>
<evernote-button class="share-button--circle share-button--outline" shareTitle="Comment"></evernote-button>
<evernote-button
class="share-button--circle share-button--outline"
shareTitle="Comment"
btnText
></evernote-button>
<evernote-button
class="share-button--circle share-button--outline"
shareTitle="Comment"
v-bind:hasIcon="false"
></evernote-button>
</div>
<div class="share-buttons-group">
<vkontakte-button shareTitle="Comment"></vkontakte-button>
<vkontakte-button
v-bind:isBlank="false"
@ -140,7 +181,73 @@
shareTitle="Comment"
v-bind:hasIcon="false"
></vkontakte-button>
<br>
</div>
<div class="share-buttons-group">
<facebook-button shareTitle="Comment"></facebook-button>
<facebook-button
v-bind:isBlank="false"
shareText="Twiiter share good work"
shareTitle="Comment"
btnText
></facebook-button>
<facebook-button v-bind:hasIcon="false" shareTitle="Comment"></facebook-button>
<facebook-button class="share-button--circle" shareTitle="Comment"></facebook-button>
<facebook-button class="share-button--circle" shareTitle="Comment" btnText></facebook-button>
<facebook-button class="share-button--circle" shareTitle="Comment" v-bind:hasIcon="false"></facebook-button>
<facebook-button class="share-button--outline" shareTitle="Comment"></facebook-button>
<facebook-button
class="share-button--outline"
v-bind:isBlank="false"
shareText="Twiiter share good work"
shareTitle="Comment"
btnText
></facebook-button>
<facebook-button class="share-button--outline" shareTitle="Comment" v-bind:hasIcon="false"></facebook-button>
<facebook-button class="share-button--circle share-button--outline" shareTitle="Comment"></facebook-button>
<facebook-button
class="share-button--circle share-button--outline"
shareTitle="Comment"
btnText
></facebook-button>
<facebook-button
class="share-button--circle share-button--outline"
shareTitle="Comment"
v-bind:hasIcon="false"
></facebook-button>
</div>
<div class="share-buttons-group">
<linkedIn-button shareTitle="Comment"></linkedIn-button>
<linkedIn-button
v-bind:isBlank="false"
shareText="Twiiter share good work"
shareTitle="Comment"
btnText
></linkedIn-button>
<linkedIn-button v-bind:hasIcon="false" shareTitle="Comment"></linkedIn-button>
<linkedIn-button class="share-button--circle" shareTitle="Comment"></linkedIn-button>
<linkedIn-button class="share-button--circle" shareTitle="Comment" btnText></linkedIn-button>
<linkedIn-button class="share-button--circle" shareTitle="Comment" v-bind:hasIcon="false"></linkedIn-button>
<linkedIn-button class="share-button--outline" shareTitle="Comment"></linkedIn-button>
<linkedIn-button
class="share-button--outline"
v-bind:isBlank="false"
shareText="Twiiter share good work"
shareTitle="Comment"
btnText
></linkedIn-button>
<linkedIn-button class="share-button--outline" shareTitle="Comment" v-bind:hasIcon="false"></linkedIn-button>
<linkedIn-button class="share-button--circle share-button--outline" shareTitle="Comment"></linkedIn-button>
<linkedIn-button
class="share-button--circle share-button--outline"
shareTitle="Comment"
btnText
></linkedIn-button>
<linkedIn-button
class="share-button--circle share-button--outline"
shareTitle="Comment"
v-bind:hasIcon="false"
></linkedIn-button>
</div>
</div>
</template>
@ -151,7 +258,10 @@ import BloggerButton from "./components/BloggerButton";
import DiggButton from "./components/DiggButton";
import RenrenButton from "./components/RenrenButton";
import WeiboButton from "./components/WeiboButton";
import EvernoteButton from "./components/EvernoteButton";
import VkontakteButton from "./components/VkontakteButton";
import FacebookButton from "./components/FacebookButton";
import LinkedInButton from "./components/LinkedInButton";
export default {
name: "app-share-buttons",
@ -162,7 +272,10 @@ export default {
DiggButton,
RenrenButton,
WeiboButton,
VkontakteButton
EvernoteButton,
VkontakteButton,
FacebookButton,
LinkedInButton
}
};
</script>

10
src/components/BloggerButton.vue

@ -5,7 +5,7 @@
:class="className"
:shareUrl="shareUrl"
:shareTitle="shareTitle"
:shareText="shareText"
:shareDescription="shareDescription"
:sharePic="sharePic"
:btnText="btnText"
:windowWidth="windowWidth"
@ -16,7 +16,7 @@
>
<icon iconName="Blogger" class="share-button__icon" v-if="hasIcon === true">
<path
d="M18.09 14.696c-1.512.664-2.726 1.885-3.381 3.399l4.27.883-.886-4.282h-.003zM2.475 8.317L0 5.85C1.125 3.237 3.216 1.14 5.823 0h.006l2.469 2.463c1.368-.591 2.876-.921 4.463-.921C18.967 1.542 24 6.569 24 12.771 24 18.973 18.967 24 12.761 24 6.551 24 1.52 18.976 1.52 12.771c0-1.591.355-3.081.952-4.451l9.143 9.114c1.125-2.613 3.218-4.71 5.823-5.85l-9.135-9.12h-.008c-2.606 1.14-4.695 3.24-5.823 5.85l.003.003z"
d="M21.976 24H2.026C.9 24 0 23.1 0 21.976V2.026C0 .9.9 0 2.025 0H22.05C23.1 0 24 .9 24 2.025v19.95C24 23.1 23.1 24 21.976 24zM12 3.975H9c-2.775 0-5.025 2.25-5.025 5.025v6c0 2.774 2.25 5.024 5.025 5.024h6c2.774 0 5.024-2.25 5.024-5.024v-3.975c0-.6-.45-1.05-1.05-1.05H18c-.524 0-.976-.45-.976-.976 0-2.776-2.25-5.026-5.024-5.026zm3.074 12H9c-.525 0-.975-.45-.975-.975s.45-.976.975-.976h6.074c.526 0 .977.45.977.976s-.45.976-.975.976zm-2.55-7.95c.527 0 .976.45.976.975s-.45.975-.975.975h-3.6c-.525 0-.976-.45-.976-.975s.45-.975.975-.975h3.6z"
/>
</icon>
<span class="share-button__text" v-if="btnText">{{btnText}}</span>
@ -38,8 +38,8 @@ export default {
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String },
shareText: { type: String, default: getDocumentTitle },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Blogger" },
windowWidth: { type: Number },
@ -54,7 +54,7 @@ export default {
const url = `https://www.blogger.com/blog-this.g?u=${
this.$props.shareUrl
}&n=${encodeURIComponent(this.$props.shareTitle)}&t=${encodeURIComponent(
this.$props.shareText
this.$props.shareDescription
)}`;
return this.$props.isBlank

6
src/components/DiggButton.vue

@ -5,7 +5,7 @@
:class="className"
:shareUrl="shareUrl"
:shareTitle="shareTitle"
:shareText="shareText"
:shareDescription="shareDescription"
:sharePic="sharePic"
:btnText="btnText"
:windowWidth="windowWidth"
@ -38,8 +38,8 @@ export default {
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String },
shareText: { type: String, default: getDocumentTitle },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Digg" },
windowWidth: { type: Number },

68
src/components/EvernoteButton.vue

@ -0,0 +1,68 @@
<template>
<button
class="share-button share-button--evernote"
type="button"
:class="className"
:shareUrl="shareUrl"
:shareDescription="shareDescription"
:shareTitle="shareTitle"
:btnText="btnText"
:windowWidth="windowWidth"
:windowHeight="windowHeight"
:hasIcon="hasIcon"
:isBlank="isBlank"
@click="openShareWindow"
>
<icon iconName="Evernote" class="share-button__icon" v-if="hasIcon === true">
<path
d="M7.692 5.445c0 .239-.02.637-.256.895-.257.24-.652.259-.888.259H4.022c-.73 0-1.165 0-1.46.04-.159.02-.356.1-.455.14-.04.019-.04 0-.02-.02L7.85.848c.02-.02.04-.02.02.02-.04.099-.118.298-.138.457-.04.298-.04.736-.04 1.472v2.647zm5.348 17.869c-.67-.438-1.026-1.015-1.164-1.373a2.924 2.924 0 0 1-.217-1.095 3.007 3.007 0 0 1 3-3.004c.493 0 .888.398.888.895a.88.88 0 0 1-.454.776c-.099.06-.237.1-.336.12-.098.02-.473.06-.65.218-.198.16-.356.418-.356.697 0 .298.118.577.316.776.355.358.829.557 1.342.557a2.436 2.436 0 0 0 2.427-2.447c0-1.214-.809-2.289-1.875-2.766-.158-.08-.414-.14-.651-.2a8.04 8.04 0 0 0-.592-.099c-.829-.1-2.901-.756-3.04-2.606 0 0-.611 2.785-1.835 3.541-.118.06-.276.12-.454.16-.177.04-.374.06-.434.06-1.993.119-4.105-.518-5.565-2.03 0 0-.987-.816-1.5-3.104-.118-.558-.355-1.553-.493-2.488-.06-.338-.08-.597-.099-.836 0-.975.592-1.631 1.342-1.73h4.026c.69 0 1.086-.18 1.342-.419.336-.318.415-.776.415-1.313v-4.08-.118C8.52.669 9.173.052 10.139.052h.474c.197 0 .434.02.651.04.158.02.296.06.533.12 1.204.298 1.46 1.532 1.46 1.532s2.27.398 3.415.597c1.085.199 3.77.378 4.282 3.104 1.204 6.487.474 12.775.415 12.775-.849 6.129-5.901 5.83-5.901 5.83a4.1 4.1 0 0 1-2.428-.736zm4.54-13.034c-.652-.06-1.204.2-1.402.697-.04.1-.079.219-.059.278.02.06.06.08.099.1.237.12.631.179 1.204.239.572.06.967.1 1.223.06.04 0 .08-.02.119-.08.04-.06.02-.18.02-.279-.06-.537-.553-.935-1.204-1.015z"
/>
</icon>
<span class="share-button__text" v-if="btnText">{{btnText}}</span>
</button>
</template>
<script>
import Icon from "./icon/Icon.vue";
import {
getDocumentHref,
getDocumentTitle,
eventEmit,
createWindow
} from "../helpers";
export default {
name: "EvernoteShareButton",
components: { Icon },
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Evernote" },
windowWidth: { type: Number },
windowHeight: { type: Number },
hasIcon: { type: Boolean, default: true },
isBlank: { type: Boolean, default: true }
},
methods: {
openShareWindow: function() {
eventEmit(this, { name: "Evernote" });
const configWindow = createWindow();
const url = `https://www.evernote.com/clip.action?url=${encodeURIComponent(
this.$props.shareUrl
)}&title=${encodeURIComponent(this.$props.shareDescription)}`;
return this.$props.isBlank
? window.open(url, "__blank")
: window.open(url, "Share this", configWindow);
}
}
};
</script>
<style>
@import "../style/index.css";
@import "../style/evernoteButton.css";
</style>

68
src/components/FacebookButton.vue

@ -0,0 +1,68 @@
<template>
<button
class="share-button share-button--facebook"
type="button"
:class="className"
:shareUrl="shareUrl"
:shareDescription="shareDescription"
:shareTitle="shareTitle"
:btnText="btnText"
:windowWidth="windowWidth"
:windowHeight="windowHeight"
:hasIcon="hasIcon"
:isBlank="isBlank"
@click="openShareWindow"
>
<icon iconName="Facebook" class="share-button__icon" v-if="hasIcon === true">
<path
d="M22.676 0H1.324C.593 0 0 .593 0 1.324v21.352C0 23.408.593 24 1.324 24h11.494v-9.294H9.689v-3.621h3.129V8.41c0-3.099 1.894-4.785 4.659-4.785 1.325 0 2.464.097 2.796.141v3.24h-1.921c-1.5 0-1.792.721-1.792 1.771v2.311h3.584l-.465 3.63H16.56V24h6.115c.733 0 1.325-.592 1.325-1.324V1.324C24 .593 23.408 0 22.676 0"
/>
</icon>
<span class="share-button__text" v-if="btnText">{{btnText}}</span>
</button>
</template>
<script>
import Icon from "./icon/Icon.vue";
import {
getDocumentHref,
getDocumentTitle,
eventEmit,
createWindow
} from "../helpers";
export default {
name: "FacebookShareButton",
components: { Icon },
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Facebook" },
windowWidth: { type: Number },
windowHeight: { type: Number },
hasIcon: { type: Boolean, default: true },
isBlank: { type: Boolean, default: true }
},
methods: {
openShareWindow: function() {
eventEmit(this, { name: "Facebook" });
const configWindow = createWindow();
const url = `https://www.facebook.com/sharer/sharer.php?u=${
this.$props.shareUrl
}`;
return this.$props.isBlank
? window.open(url, "__blank")
: window.open(url, "Share this", configWindow);
}
}
};
</script>
<style>
@import "../style/index.css";
@import "../style/facebookButton.css";
</style>

68
src/components/LinkedInButton.vue

@ -0,0 +1,68 @@
<template>
<button
class="share-button share-button--linkedIn"
type="button"
:class="className"
:shareUrl="shareUrl"
:shareDescription="shareDescription"
:shareTitle="shareTitle"
:btnText="btnText"
:windowWidth="windowWidth"
:windowHeight="windowHeight"
:hasIcon="hasIcon"
:isBlank="isBlank"
@click="openShareWindow"
>
<icon iconName="LinkedIn" class="share-button__icon" v-if="hasIcon === true">
<path
d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
/>
</icon>
<span class="share-button__text" v-if="btnText">{{btnText}}</span>
</button>
</template>
<script>
import Icon from "./icon/Icon.vue";
import {
getDocumentHref,
getDocumentTitle,
eventEmit,
createWindow
} from "../helpers";
export default {
name: "LinkedInShareButton",
components: { Icon },
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "LinkedIn" },
windowWidth: { type: Number },
windowHeight: { type: Number },
hasIcon: { type: Boolean, default: true },
isBlank: { type: Boolean, default: true }
},
methods: {
openShareWindow: function() {
eventEmit(this, { name: "LinkedIn" });
const configWindow = createWindow();
const url = `https://www.linkedin.com/shareArticle?url=${encodeURIComponent(
this.$props.shareUrl
)}`;
return this.$props.isBlank
? window.open(url, "__blank")
: window.open(url, "Share this", configWindow);
}
}
};
</script>
<style>
@import "../style/index.css";
@import "../style/linkedInButton.css";
</style>

10
src/components/LiveJournalButton.vue

@ -5,7 +5,7 @@
:class="className"
:shareUrl="shareUrl"
:shareTitle="shareTitle"
:shareText="shareText"
:shareDescription="shareDescription"
:sharePic="sharePic"
:btnText="btnText"
:windowWidth="windowWidth"
@ -38,8 +38,8 @@ export default {
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String },
shareText: { type: String, default: getDocumentTitle },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "LiveJournal" },
windowWidth: { type: Number },
@ -52,8 +52,8 @@ export default {
eventEmit(this, { name: "LiveJournal" });
const configWindow = createWindow();
const url = `https://livejournal.com/update.bml?event=${encodeURIComponent(
this.$props.shareUrl
)}&subject=${encodeURIComponent(this.$props.shareText)}`;
this.$props.shareDescription
)}&subject=${encodeURIComponent(this.$props.shareUrl)}`;
return this.$props.isBlank
? window.open(url, "__blank")

8
src/components/RenrenButton.vue

@ -5,7 +5,7 @@
:class="className"
:shareUrl="shareUrl"
:shareTitle="shareTitle"
:shareText="shareText"
:shareDescription="shareDescription"
:sharePic="sharePic"
:btnText="btnText"
:windowWidth="windowWidth"
@ -41,8 +41,8 @@ export default {
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String },
shareText: { type: String, default: getDocumentTitle },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Renren" },
windowWidth: { type: Number },
@ -56,7 +56,7 @@ export default {
const configWindow = createWindow();
const url = `http://share.renren.com/share/buttonshare.do?link=${encodeURIComponent(
this.$props.shareUrl
)}&title=${encodeURIComponent(this.$props.shareText)}`;
)}&title=${encodeURIComponent(this.$props.shareTitle)}`;
return this.$props.isBlank
? window.open(url, "__blank")

8
src/components/TwitterButton.vue

@ -5,7 +5,7 @@
:class="className"
:shareUrl="shareUrl"
:shareTitle="shareTitle"
:shareText="shareText"
:shareDescription="shareDescription"
:sharePic="sharePic"
:btnText="btnText"
:windowWidth="windowWidth"
@ -38,8 +38,8 @@ export default {
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String },
shareText: { type: String, default: getDocumentTitle },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Twitter" },
windowWidth: { type: Number },
@ -53,7 +53,7 @@ export default {
const configWindow = createWindow();
const url = `https://twitter.com/share?url=${encodeURIComponent(
this.$props.shareUrl
)}&text=${encodeURIComponent(this.$props.shareText)}`;
)}&text=${encodeURIComponent(this.$props.shareDescription)}`;
return this.$props.isBlank
? window.open(url, "__blank")

8
src/components/VkontakteButton.vue

@ -4,7 +4,7 @@
type="button"
:class="className"
:shareUrl="shareUrl"
:shareText="shareText"
:shareDescription="shareDescription"
:shareTitle="shareTitle"
:btnText="btnText"
:windowWidth="windowWidth"
@ -37,8 +37,8 @@ export default {
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String },
shareText: { type: String, default: getDocumentTitle },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Vkontakte" },
windowWidth: { type: Number },
@ -55,7 +55,7 @@ export default {
)}&title=${encodeURIComponent(
this.$props.shareTitle
)}&comment=${encodeURIComponent(
this.$props.shareText
this.$props.shareDescription
)}&image=${encodeURIComponent(this.$props.sharePic)}&noparse=true`;
return this.$props.isBlank

8
src/components/WeiboButton.vue

@ -5,7 +5,7 @@
:class="className"
:shareUrl="shareUrl"
:shareTitle="shareTitle"
:shareText="shareText"
:shareDescription="shareDescription"
:sharePic="sharePic"
:btnText="btnText"
:windowWidth="windowWidth"
@ -38,8 +38,8 @@ export default {
props: {
className: { type: String },
shareUrl: { type: String, default: getDocumentHref },
shareTitle: { type: String },
shareText: { type: String, default: getDocumentTitle },
shareTitle: { type: String, default: "" },
shareDescription: { type: String, default: getDocumentTitle },
sharePic: { type: String, default: "" },
btnText: { type: String, default: "Weibo" },
windowWidth: { type: Number },
@ -54,7 +54,7 @@ export default {
const url = `http://service.weibo.com/share/share.php?url=${encodeURIComponent(
this.$props.shareUrl
)}&title=${encodeURIComponent(
this.$props.shareText
this.$props.shareTitle
)}&pic=${encodeURIComponent(this.$props.sharePic)}`;
return this.$props.isBlank

21
src/style/bloggerButton.css

@ -1,43 +1,42 @@
/* blogger */
/* Blogger */
.share-button--blogger {
background-color: hsla(195, 100%, 46%, 1);
background-color: hsla(14, 100%, 57%, 1);
}
.share-button--blogger:focus {
box-shadow: 0 0 0 3px hsla(195, 94%, 71%, 0.4);
box-shadow: 0 0 0 3px hsla(14, 94%, 82%, 0.4);
}
.share-button--blogger:hover {
background-color: hsla(195, 100%, 46%, 0.9);
background-color: hsla(14, 100%, 57%, 0.9);
}
.share-button--blogger .share-button__icon path {
fill: #fff;
}
/* Circle */
.share-button--blogger.share-button--outline {
background-color: transparent;
border-color: hsl(195, 100%, 46%, 1);
border-color: hsl(14, 100%, 57%, 1);
}
.share-button--blogger.share-button--outline:hover {
background-color: transparent;
border-color: hsla(195, 100%, 46%, 0.9);
border-color: hsla(14, 100%, 57%, 0.9);
}
.share-button--blogger.share-button--outline .share-button__text {
color: hsla(195, 100%, 46%, 1);
color: hsla(14, 100%, 57%, 1);
}
.share-button--blogger.share-button--outline:hover .share-button__text {
color: hsla(195, 100%, 46%, 0.9);
color: hsla(14, 100%, 57%, 0.9);
}
.share-button--blogger.share-button--outline .share-button__icon path {
fill: hsla(195, 100%, 46%, 1);
fill: hsla(14, 100%, 57%, 1);
}
.share-button--blogger.share-button--outline:hover .share-button__icon path {
fill: hsla(195, 100%, 46%, 0.9);
fill: hsla(14, 100%, 57%, 0.9);
}

3
src/style/diggButton.css

@ -1,4 +1,4 @@
/* digg */
/* Digg */
.share-button--digg {
background-color: hsla(0, 0%, 0%, 1);
}
@ -15,7 +15,6 @@
fill: #fff;
}
/* Circle */
.share-button--digg.share-button--outline {
background-color: transparent;
border-color: hsl(0, 0%, 0%, 1);

42
src/style/evernoteButton.css

@ -0,0 +1,42 @@
/* Evernote */
.share-button--evernote {
background-color: hsla(136, 100%, 33%, 1);
}
.share-button--evernote:focus {
box-shadow: 0 0 0 3px hsla(136, 94%, 58%, 0.4);
}
.share-button--evernote:hover {
background-color: hsla(136, 100%, 33%, 0.9);
}
.share-button--evernote .share-button__icon path {
fill: #fff;
}
.share-button--evernote.share-button--outline {
background-color: transparent;
border-color: hsl(136, 100%, 33%, 1);
}
.share-button--evernote.share-button--outline:hover {
background-color: transparent;
border-color: hsla(136, 100%, 33%, 0.9);
}
.share-button--evernote.share-button--outline .share-button__text {
color: hsla(136, 100%, 33%, 1);
}
.share-button--evernote.share-button--outline:hover .share-button__text {
color: hsla(136, 100%, 33%, 0.9);
}
.share-button--evernote.share-button--outline .share-button__icon path {
fill: hsla(136, 100%, 33%, 1);
}
.share-button--evernote.share-button--outline:hover .share-button__icon path {
fill: hsla(136, 100%, 33%, 0.9);
}

42
src/style/facebookButton.css

@ -0,0 +1,42 @@
/* Facebook */
.share-button--facebook {
background-color: hsla(221, 44%, 41%, 1);
}
.share-button--facebook:focus {
box-shadow: 0 0 0 3px hsla(221, 38%, 66%, 0.4);
}
.share-button--facebook:hover {
background-color: hsla(221, 44%, 41%, 0.9);
}
.share-button--facebook .share-button__icon path {
fill: #fff;
}
.share-button--facebook.share-button--outline {
background-color: transparent;
border-color: hsl(221, 44%, 41%, 1);
}
.share-button--facebook.share-button--outline:hover {
background-color: transparent;
border-color: hsla(221, 44%, 41%, 0.9);
}
.share-button--facebook.share-button--outline .share-button__text {
color: hsla(221, 44%, 41%, 1);
}
.share-button--facebook.share-button--outline:hover .share-button__text {
color: hsla(221, 44%, 41%, 0.9);
}
.share-button--facebook.share-button--outline .share-button__icon path {
fill: hsla(221, 44%, 41%, 1);
}
.share-button--facebook.share-button--outline:hover .share-button__icon path {
fill: hsla(221, 44%, 41%, 0.9);
}

42
src/style/linkedInButton.css

@ -0,0 +1,42 @@
/* LinkedIn */
.share-button--linkedIn {
background-color: hsla(201, 100%, 35%, 1);
}
.share-button--linkedIn:focus {
box-shadow: 0 0 0 3px hsla(201, 94%, 60%, 0.4);
}
.share-button--linkedIn:hover {
background-color: hsla(201, 100%, 35%, 0.9);
}
.share-button--linkedIn .share-button__icon path {
fill: #fff;
}
.share-button--linkedIn.share-button--outline {
background-color: transparent;
border-color: hsl(201, 100%, 35%, 1);
}
.share-button--linkedIn.share-button--outline:hover {
background-color: transparent;
border-color: hsla(201, 100%, 35%, 0.9);
}
.share-button--linkedIn.share-button--outline .share-button__text {
color: hsla(201, 100%, 35%, 1);
}
.share-button--linkedIn.share-button--outline:hover .share-button__text {
color: hsla(201, 100%, 35%, 0.9);
}
.share-button--linkedIn.share-button--outline .share-button__icon path {
fill: hsla(201, 100%, 35%, 1);
}
.share-button--linkedIn.share-button--outline:hover .share-button__icon path {
fill: hsla(201, 100%, 35%, 0.9);
}

3
src/style/livejournalButton.css

@ -1,4 +1,4 @@
/* livejournal */
/* Livejournal */
.share-button--livejournal {
background-color: hsla(195, 100%, 46%, 1);
}
@ -15,7 +15,6 @@
fill: #fff;
}
/* Circle */
.share-button--livejournal.share-button--outline {
background-color: transparent;
border-color: hsl(195, 100%, 46%, 1);

1
src/style/renrenButton.css

@ -15,7 +15,6 @@
fill: #fff;
}
/* Circle */
.share-button--renren.share-button--outline {
background-color: transparent;
border-color: hsl(207, 71%, 45%, 1);

1
src/style/twitterButton.css

@ -15,7 +15,6 @@
fill: #fff;
}
/* Circle */
.share-button--twitter.share-button--outline {
background-color: transparent;
border-color: hsla(203, 89%, 53%, 1);

1
src/style/vkontakteButton.css

@ -15,7 +15,6 @@
fill: #fff;
}
/* Circle */
.share-button--vk.share-button--outline {
background-color: transparent;
border-color: hsla(212, 28%, 52%, 1);

3
src/style/weiboButton.css

@ -1,4 +1,4 @@
/* weibo */
/* Weibo */
.share-button--weibo {
background-color: hsl(353, 83%, 49%);
}
@ -15,7 +15,6 @@
fill: #fff;
}
/* Circle */
.share-button--weibo.share-button--outline {
background-color: transparent;
border-color: hsl(353, 83%, 49%, 1);

Loading…
Cancel
Save