From c4ba60e2898e111553ba7821ca81982bb0fda926 Mon Sep 17 00:00:00 2001 From: fechin Date: Thu, 5 Jan 2023 15:24:42 +0800 Subject: [PATCH] Added line share button --- source/assets/icon/line.svg | 1 + themes/coo/layout/_partial/share.ejs | 7 ++++--- themes/coo/scripts/share.js | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 source/assets/icon/line.svg diff --git a/source/assets/icon/line.svg b/source/assets/icon/line.svg new file mode 100644 index 0000000..9698dab --- /dev/null +++ b/source/assets/icon/line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/coo/layout/_partial/share.ejs b/themes/coo/layout/_partial/share.ejs index b148b6c..e2e152b 100644 --- a/themes/coo/layout/_partial/share.ejs +++ b/themes/coo/layout/_partial/share.ejs @@ -1,7 +1,8 @@
" target="_blank"><%-icon('facebook')%> " target="_blank"><%-icon('twitter')%> - " target="_blank"> - " target="_blank"> - " target="_blank"> + " target="_blank"><%-icon('reddit')%> + " target="_blank"><%-icon('pinterest')%> + " target="_blank"><%-icon('linkedin')%> + " target="_blank"><%-icon('line')%>
\ No newline at end of file diff --git a/themes/coo/scripts/share.js b/themes/coo/scripts/share.js index 97cf383..d04a3a2 100644 --- a/themes/coo/scripts/share.js +++ b/themes/coo/scripts/share.js @@ -24,6 +24,9 @@ hexo.extend.helper.register("share_link", function (type) { case "mail": link = `mailto:?subject=${title}&body=\n${description}\n\n${url}`; break; + case "line": + link = `https://social-plugins.line.me/lineit/share?url=${url}`; + break; } return encodeURL(link); }); \ No newline at end of file