1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-24 14:52:54 +02:00

docs: add share buttons

This commit is contained in:
BcRikko
2019-02-23 17:28:05 +09:00
parent 17846a9719
commit 29fddfb9be
3 changed files with 44 additions and 7 deletions

View File

@@ -541,6 +541,20 @@ new Vue({
});
},
methods: {
share(media) {
const url = (() => {
switch (media) {
case 'twitter':
return 'http://twitter.com/share?text=NES.css%EF%BD%9CNES-style%20CSS%20Framework%20%40bc_rikko&url=https://nostalgic-css.github.io/NES.css/';
case 'facebook':
return 'http://www.facebook.com/sharer.php?u=https://nostalgic-css.github.io/NES.css/&t=NES.css%EF%BD%9CNES-style%20CSS%20Framework';
case 'linkedin':
return 'https://www.linkedin.com/shareArticle?url=https%3A//nostalgic-css.github.io/NES.css/&title=NES.css%EF%BD%9CNES-style%20CSS%20Framework';
}
})();
window.open(url, '');
},
copy(event, id) {
this.showCopiedBalloon(event.pageY, event.pageX);