fix(page): replace section svg with sign

- https://en.wikipedia.org/wiki/Section_sign
This commit is contained in:
Ming Di Leom 2021-11-30 08:18:07 +00:00
parent 69cc9fccc5
commit 3ef2918a74
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
3 changed files with 5 additions and 14 deletions

View File

@ -6,7 +6,6 @@
*/
const { slugize, stripHTML } = require('hexo-util')
const svg = '<img src="/svg/link.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 `<h${level} id="${id}">${text} <a href="#${id}" class="headerlink" title="${stripHTML(text)}">${svg}</a></h${level}>`
return `<h${level} id="${id}">${text} <a href="#${id}" class="headerlink" title="${stripHTML(text)}">§</a></h${level}>`
}
})

View File

@ -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) {

View File

@ -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) {