From 3ef2918a741d827aa55fcc7e47c7b155b1102a16 Mon Sep 17 00:00:00 2001
From: Ming Di Leom <2809763-curben@users.noreply.gitlab.com>
Date: Tue, 30 Nov 2021 08:18:07 +0000
Subject: [PATCH] fix(page): replace section svg with sign
- https://en.wikipedia.org/wiki/Section_sign
---
themes/chameleon/scripts/heading-link.js | 3 +--
themes/chameleon/source/css/_source.css | 8 ++------
themes/chameleon/source/css/chameleon.css | 8 ++------
3 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/themes/chameleon/scripts/heading-link.js b/themes/chameleon/scripts/heading-link.js
index 2fb8982..7e71823 100644
--- a/themes/chameleon/scripts/heading-link.js
+++ b/themes/chameleon/scripts/heading-link.js
@@ -6,7 +6,6 @@
*/
const { slugize, stripHTML } = require('hexo-util')
-const svg = ''
const anchorId = (str, transformOption) => {
return slugize(str.trim(), { transform: transformOption })
@@ -27,6 +26,6 @@ hexo.extend.filter.register('marked:renderer', function (renderer) {
}
// add headerlink
- return `${text} `
+ return `${text} `
}
})
diff --git a/themes/chameleon/source/css/_source.css b/themes/chameleon/source/css/_source.css
index 4d33076..fbc6868 100644
--- a/themes/chameleon/source/css/_source.css
+++ b/themes/chameleon/source/css/_source.css
@@ -734,6 +734,8 @@ svg#share:hover {
unhide (via JS) if Web Share API is supported */
.article-title a#btnshare {
display: none;
+ height: 1em;
+ width: 1em;
}
.article-title a#btnshare img {
@@ -746,12 +748,6 @@ unhide (via JS) if Web Share API is supported */
.article .article-entry a.headerlink,
.article-title a#btnshare {
margin-left: 0.5em;
- height: 1em;
- width: 1em;
-}
-
-.article .article-entry a.headerlink {
- display: inline-block;
}
@media (max-width: 768px) {
diff --git a/themes/chameleon/source/css/chameleon.css b/themes/chameleon/source/css/chameleon.css
index 40df2fc..da0a560 100644
--- a/themes/chameleon/source/css/chameleon.css
+++ b/themes/chameleon/source/css/chameleon.css
@@ -1054,6 +1054,8 @@ svg#share:hover {
unhide (via JS) if Web Share API is supported */
.article-title a#btnshare {
display: none;
+ height: 1em;
+ width: 1em;
}
.article-title a#btnshare img {
@@ -1066,12 +1068,6 @@ unhide (via JS) if Web Share API is supported */
.article .article-entry a.headerlink,
.article-title a#btnshare {
margin-left: 0.5em;
- height: 1em;
- width: 1em;
-}
-
-.article .article-entry a.headerlink {
- display: inline-block;
}
@media (max-width: 768px) {