Added line share button

This commit is contained in:
fechin committed 2023-01-05 15:24:42 +08:00
1 parent 7cd223bb4d
commit c4ba60e289
3 files changed
+8 -3

No files matched your search

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1672903354277" class="icon" viewBox="0 0 1107 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11220" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M551.3440625 32C264.509375 32 32 215.0290625 32 440.7875c0 209.7046875 200.7028125 382.425 459.1471875 405.9534375a31.60125001 31.60125001 0 0 1 21.105 13.7859375c11.4721875 18.8859375 3.320625 59.1271875-5.5875 104.2471875s39.5334375 21.7021875 50.25 16.4775c8.53125001-4.1390625 228.103125-127.91625001 358.820625-249.3009375 95.5903125-74.15625001 154.921875-177.20625001 154.921875-291.148125C1070.688125 215.0290625 838.16375001 32 551.3440625 32zM378.2290625 547.7721875a27.6984375 27.6984375 0 0 1-27.91875 27.44625H255.3659375c-16.760625 0-39.091875-5.791875-39.091875-32.9390625v-203.01562499a27.6825 27.6825 0 0 1 27.91875-27.44718751h5.5865625a27.6825 27.6825 0 0 1 27.91875 27.44625v175.5703125h72.59812499a27.6984375 27.6984375 0 0 1 27.93375001 27.44625v5.4928125z m78.264375-5.46093749a27.886875 27.886875 0 0 1-55.77468751 0V345.085625a27.886875 27.886875 0 0 1 55.77468751 0v197.22562499z m245.634375 0a30.8625 30.8625 0 0 1-27.91875 27.44624999 31.60125001 31.60125001 0 0 1-32.908125-15.7378125l-89.956875-126.16875v114.4284375a27.91875001 27.91875001 0 0 1-55.8215625 0V344.7396875a27.6665625 27.6665625 0 0 1 27.9028125-27.43125 35.315625 35.315625 0 0 1 31.6490625 20.0971875c8.655 12.7790625 91.27875001 127.9790625 91.27875 127.9790625V344.740625a27.9346875 27.9346875 0 0 1 55.8525 0v197.5396875z m167.5275-126.20062501a27.44624999 27.44624999 0 1 1 0 54.8925H797.05625001v43.8928125h72.59812499a27.44624999 27.44624999 0 1 1 0 54.8775H760.765625a24.8971875 24.8971875 0 0 1-25.1803125-24.676875V342.033125a24.8971875 24.8971875 0 0 1 25.18125-24.6928125h108.88875a27.44624999 27.44624999 0 1 1 0 54.8775H797.05625001v43.9078125h72.59812499z" fill="currentColor" p-id="11221"></path></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

+4 -3
View File
@@ -1,7 +1,8 @@
<div class="inline-flex text-slate-500 sm:ml-auto sm:mt-0 mt-2 justify-center sm:justify-start <%- extra %>">
<a class="mr-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("facebook") %>" target="_blank"><%-icon('facebook')%></a>
<a class="mx-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("twitter") %>" target="_blank"><%-icon('twitter')%></a>
<a class="mx-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("reddit") %>" target="_blank"><i class="icon text-xl icon-reddit"></i></a>
<a class="mx-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("pinterest") %>" target="_blank"><i class="icon text-xl icon-pinterest"></i></a>
<a class="ml-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("linkedin") %>" target="_blank"><i class="icon text-xl icon-linkedin"></i></a>
<a class="mx-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("reddit") %>" target="_blank"><%-icon('reddit')%></a>
<a class="mx-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("pinterest") %>" target="_blank"><%-icon('pinterest')%></a>
<a class="ml-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("linkedin") %>" target="_blank"><%-icon('linkedin')%></a>
<a class="ml-3 fadeIn hover:text-slate-700 dark:hover:text-slate-300" href="<%- share_link("line") %>" target="_blank"><%-icon('line')%></a>
</div>
+3
View File
@@ -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);
});