diff --git a/_config.yml b/_config.yml
index 99f64ab..b040148 100755
--- a/_config.yml
+++ b/_config.yml
@@ -87,11 +87,11 @@ footer:
- icon: ''
url: /atom.xml
- icon: ''
- url: https://github.com/xaoxuu
+ url: /
- icon: ''
- url: https://music.163.com/#/user/home?id=63035382
+ url: /
- icon: ''
- url: /comments/
+ url: /
license: '[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)'
source: #'[GitHub](https://github.com/xaoxuu/hexo-theme-stellar)'
diff --git a/languages/en.yml b/languages/en.yml
index 2d3cdf8..b836186 100755
--- a/languages/en.yml
+++ b/languages/en.yml
@@ -49,6 +49,9 @@ page:
filter: "%s's %s has %s articles"
wiki: "%s has %s %s in total"
+message:
+ copied: Copied!
+
symbol:
comma: ", "
period: ". "
diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml
index 54a51e5..3153045 100755
--- a/languages/zh-CN.yml
+++ b/languages/zh-CN.yml
@@ -49,6 +49,9 @@ page:
filter: '%s的%s共有%s篇文章'
wiki: '%s共有%s个%s'
+message:
+ copied: 复制成功
+
symbol:
comma: ","
period: "。"
diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml
index fb068d2..995b077 100755
--- a/languages/zh-TW.yml
+++ b/languages/zh-TW.yml
@@ -49,6 +49,9 @@ page:
filter: '%s的%s共有%s篇文章'
wiki: '%s共有%s个%s'
+message:
+ copied: 複製成功
+
symbol:
comma: ","
period: "。"
diff --git a/layout/_partial/main/article/references.ejs b/layout/_partial/main/article/references.ejs
index 389ffe5..153270c 100644
--- a/layout/_partial/main/article/references.ejs
+++ b/layout/_partial/main/article/references.ejs
@@ -13,7 +13,12 @@ function layoutDiv() {
el += '
';
page.references.forEach((item, i) => {
el += '- ';
- el += '';
+ el += '';
+ } else {
+ el += ' rel="noopener noreferrer">';
+ }
el += item.title || item.url;
el += '';
el += '
';
@@ -44,9 +49,12 @@ function layoutDiv() {
el += '';
theme.article.share.forEach((item, i) => {
if (['wechat', 'weibo', 'email', 'link'].includes(item)) {
- el += '
';
if (item == 'wechat') {
diff --git a/layout/_partial/sidebar/index.ejs b/layout/_partial/sidebar/index.ejs
index fde920a..948cb2b 100755
--- a/layout/_partial/sidebar/index.ejs
+++ b/layout/_partial/sidebar/index.ejs
@@ -14,7 +14,14 @@ function layoutFooterDiv() {
var el = '';
diff --git a/source/css/_plugins/common/toast.styl b/source/css/_plugins/common/toast.styl
new file mode 100644
index 0000000..30ee552
--- /dev/null
+++ b/source/css/_plugins/common/toast.styl
@@ -0,0 +1,15 @@
+div.toast
+ max-width: 60%
+ padding: 2rem 3rem
+ line-height: 1.5
+ color: var(--text-p1)
+ font-weight: 500
+ text-align: center
+ border-radius: $border-card
+ background: var(--card)
+ position: fixed
+ top: 50%
+ left: 50%
+ transform: translate(-50%, -50%)
+ z-index: 9
+ box-shadow: $boxshadow-float
diff --git a/source/js/main.js b/source/js/main.js
index a44f094..eb89930 100644
--- a/source/js/main.js
+++ b/source/js/main.js
@@ -127,22 +127,39 @@ const util = {
}
},
- copy_link: () => {
- const el = document.getElementById("copy-link");
+ copy: (id, msg) => {
+ const el = document.getElementById(id);
if (el) {
el.select();
document.execCommand("Copy");
+ hud.toast(msg);
}
},
- toggle_qrcode: () => {
- const el = document.getElementById("qrcode-wechat");
+ toggle: (id) => {
+ const el = document.getElementById(id);
if (el) {
el.classList.toggle("display");
}
},
}
+const hud = {
+ toast: (msg, duration) => {
+ duration=isNaN(duration)?2000:duration;
+ var el = document.createElement('div');
+ el.classList.add('toast');
+ el.innerHTML = msg;
+ document.body.appendChild(el);
+ setTimeout(function() {
+ var d = 0.5;
+ el.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
+ el.style.opacity = '0';
+ setTimeout(function() { document.body.removeChild(el) }, d * 1000);
+ }, duration);
+ },
+
+}
// defines