mirror of https://gitlab.com/curben/blog
fix(page): replace section svg with sign
- https://en.wikipedia.org/wiki/Section_sign
This commit is contained in:
parent
69cc9fccc5
commit
3ef2918a74
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { slugize, stripHTML } = require('hexo-util')
|
const { slugize, stripHTML } = require('hexo-util')
|
||||||
const svg = '<img src="/svg/link.svg">'
|
|
||||||
|
|
||||||
const anchorId = (str, transformOption) => {
|
const anchorId = (str, transformOption) => {
|
||||||
return slugize(str.trim(), { transform: transformOption })
|
return slugize(str.trim(), { transform: transformOption })
|
||||||
|
@ -27,6 +26,6 @@ hexo.extend.filter.register('marked:renderer', function (renderer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add headerlink
|
// 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}>`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -734,6 +734,8 @@ svg#share:hover {
|
||||||
unhide (via JS) if Web Share API is supported */
|
unhide (via JS) if Web Share API is supported */
|
||||||
.article-title a#btnshare {
|
.article-title a#btnshare {
|
||||||
display: none;
|
display: none;
|
||||||
|
height: 1em;
|
||||||
|
width: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-title a#btnshare img {
|
.article-title a#btnshare img {
|
||||||
|
@ -746,12 +748,6 @@ unhide (via JS) if Web Share API is supported */
|
||||||
.article .article-entry a.headerlink,
|
.article .article-entry a.headerlink,
|
||||||
.article-title a#btnshare {
|
.article-title a#btnshare {
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
height: 1em;
|
|
||||||
width: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.article .article-entry a.headerlink {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|
|
@ -1054,6 +1054,8 @@ svg#share:hover {
|
||||||
unhide (via JS) if Web Share API is supported */
|
unhide (via JS) if Web Share API is supported */
|
||||||
.article-title a#btnshare {
|
.article-title a#btnshare {
|
||||||
display: none;
|
display: none;
|
||||||
|
height: 1em;
|
||||||
|
width: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-title a#btnshare img {
|
.article-title a#btnshare img {
|
||||||
|
@ -1066,12 +1068,6 @@ unhide (via JS) if Web Share API is supported */
|
||||||
.article .article-entry a.headerlink,
|
.article .article-entry a.headerlink,
|
||||||
.article-title a#btnshare {
|
.article-title a#btnshare {
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
height: 1em;
|
|
||||||
width: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.article .article-entry a.headerlink {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|
Loading…
Reference in New Issue