aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/css/_iconfont.scss3
-rw-r--r--src/css/_partial/_post/_content.scss26
-rw-r--r--src/fonts/iconfont/iconfont.eotbin10064 -> 10420 bytes
-rw-r--r--src/fonts/iconfont/iconfont.svg1
-rw-r--r--src/fonts/iconfont/iconfont.ttfbin9900 -> 10256 bytes
-rw-r--r--src/fonts/iconfont/iconfont.woffbin9980 -> 10336 bytes
-rw-r--r--src/js/even.js2
7 files changed, 31 insertions, 1 deletions
diff --git a/src/css/_iconfont.scss b/src/css/_iconfont.scss
index 786be46..f4fa791 100644
--- a/src/css/_iconfont.scss
+++ b/src/css/_iconfont.scss
@@ -137,6 +137,9 @@
.icon-close:before {
content: "\e60f";
}
+.icon-link:before {
+ content: "\e909";
+}
/* Admonition Icon */
/*
diff --git a/src/css/_partial/_post/_content.scss b/src/css/_partial/_post/_content.scss
index 5628664..9e48177 100644
--- a/src/css/_partial/_post/_content.scss
+++ b/src/css/_partial/_post/_content.scss
@@ -9,6 +9,32 @@
h#{$i} {
font-weight: 400;
font-family: $global-serif-font-family;
+
+ .anchor {
+ float: left;
+ line-height: 1;
+ margin-left: -20px;
+ padding-right: 4px;
+
+ &:hover {
+ border-bottom: initial;
+ }
+
+ .icon-link {
+ visibility: hidden;
+ font-size: 16px;
+
+ &:before {
+ vertical-align: middle;
+ }
+ }
+ }
+
+ &:hover {
+ .icon-link {
+ visibility: visible;
+ }
+ }
}
}
diff --git a/src/fonts/iconfont/iconfont.eot b/src/fonts/iconfont/iconfont.eot
index 56a61e1..66e449b 100644
--- a/src/fonts/iconfont/iconfont.eot
+++ b/src/fonts/iconfont/iconfont.eot
Binary files differ
diff --git a/src/fonts/iconfont/iconfont.svg b/src/fonts/iconfont/iconfont.svg
index ef88e55..4bed506 100644
--- a/src/fonts/iconfont/iconfont.svg
+++ b/src/fonts/iconfont/iconfont.svg
@@ -35,6 +35,7 @@
<glyph unicode="&#xe906;" glyph-name="bulb" d="M512 896c-194.432 0-352-157.568-352-352 0-128.992 118.016-265.696 160.992-385.76 64.096-179.040 56.992-286.24 191.008-286.24 136 0 126.88 106.688 191.008 285.504 43.104 120.32 160.992 258.496 160.992 386.496 0 194.432-157.632 352-352 352zM594.944 26.368l-158.656-19.808c-5.664 16.384-11.744 35.552-19.136 60.576-0.096 0.32-0.224 0.672-0.288 0.992l198.016 24.736c-2.816-9.44-5.824-19.36-8.448-28.256-4.192-14.368-7.936-26.848-11.488-38.24zM407.552 98.944c-5.824 19.264-12.384 39.552-19.68 61.056h248.512c-3.936-11.488-7.872-23.008-11.264-33.888l-217.568-27.168zM512-64c-32.416 0-47.328 3.744-63.904 40l135.616 16.992c-19.648-52.928-33.952-56.992-71.712-56.992zM661.504 224h-298.656c-15.936 34.56-35.072 69.12-53.952 102.944-41.76 74.72-84.896 152-84.896 217.056 0 158.816 129.184 288 288 288s288-129.184 288-288c0-64.576-43.2-142.272-84.992-217.44-18.688-33.696-37.696-68.192-53.504-102.56zM512 736c8.8 0 16-7.168 16-16s-7.168-16-16-16c-88.224 0-160-71.776-160-160 0-8.832-7.168-16-16-16s-16 7.168-16 16c0 105.888 86.112 192 192 192z" />
<glyph unicode="&#xe907;" glyph-name="bug" horiz-adv-x="951" d="M932.571 329.143c0-20-16.571-36.571-36.571-36.571h-128c0-71.429-15.429-125.143-38.286-165.714l118.857-119.429c14.286-14.286 14.286-37.143 0-51.429-6.857-7.429-16.571-10.857-25.714-10.857s-18.857 3.429-25.714 10.857l-113.143 112.571s-74.857-68.571-172-68.571v512h-73.143v-512c-103.429 0-178.857 75.429-178.857 75.429l-104.571-118.286c-7.429-8-17.143-12-27.429-12-8.571 0-17.143 2.857-24.571 9.143-14.857 13.714-16 36.571-2.857 52l115.429 129.714c-20 39.429-33.143 90.286-33.143 156.571h-128c-20 0-36.571 16.571-36.571 36.571s16.571 36.571 36.571 36.571h128v168l-98.857 98.857c-14.286 14.286-14.286 37.143 0 51.429s37.143 14.286 51.429 0l98.857-98.857h482.286l98.857 98.857c14.286 14.286 37.143 14.286 51.429 0s14.286-37.143 0-51.429l-98.857-98.857v-168h128c20 0 36.571-16.571 36.571-36.571zM658.286 658.285h-365.714c0 101.143 81.714 182.857 182.857 182.857s182.857-81.714 182.857-182.857z" />
<glyph unicode="&#xe908;" glyph-name="chevron-down" d="M797.867 541.867c-17.067 17.067-42.667 17.067-59.733 0l-226.133-226.133-226.133 226.133c-17.067 17.067-42.667 17.067-59.733 0s-17.067-42.667 0-59.733l256-256c8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8l256 256c17.067 17.067 17.067 42.667 0 59.733z" />
+<glyph unicode="&#xe909;" glyph-name="link" d="M474.112 204.8c-8.559 14.643-13.613 32.239-13.613 51.016 0 19.135 5.248 37.044 14.384 52.366l-0.259-0.469c79.299 6.646 141.144 72.648 141.144 153.094 0 84.831-68.769 153.6-153.6 153.6-0.481 0-0.961-0.002-1.441-0.007l0.073 0.001h-204.8c-84.831 0-153.6-68.769-153.6-153.6s68.769-153.6 153.6-153.6v0h4.096c-2.706-15.393-4.254-33.116-4.254-51.2s1.547-35.807 4.516-53.044l-0.263 1.844h-4.096c-141.385 0-256 114.615-256 256s114.615 256 256 256v0h204.8c1.982 0.055 4.315 0.087 6.656 0.087 141.433 0 256.087-114.654 256.087-256.087 0-139.092-110.89-252.284-249.087-255.993l-0.343-0.007zM549.888 512c8.559-14.643 13.613-32.239 13.613-51.016 0-19.135-5.248-37.044-14.384-52.366l0.259 0.469c-79.299-6.646-141.144-72.648-141.144-153.094 0-84.831 68.769-153.6 153.6-153.6 0.481 0 0.961 0.002 1.441 0.007l-0.073-0.001h204.8c84.831 0 153.6 68.769 153.6 153.6s-68.769 153.6-153.6 153.6v0h-4.096c2.706 15.393 4.254 33.116 4.254 51.2s-1.547 35.807-4.516 53.044l0.263-1.844h4.096c141.385 0 256-114.615 256-256s-114.615-256-256-256v0h-204.8c-1.982-0.055-4.315-0.087-6.656-0.087-141.433 0-256.087 114.654-256.087 256.087 0 139.092 110.89 252.284 249.087 255.993l0.343 0.007z" />
<glyph unicode="&#xe9b9;" glyph-name="list-numbered" d="M384 64h640v-128h-640zM384 448h640v-128h-640zM384 832h640v-128h-640zM192 896v-256h-64v192h-64v64zM128 370v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM256 192v-320h-192v64h128v64h-128v64h128v64h-128v64z" />
<glyph unicode="&#xe9bb;" glyph-name="list2" d="M384 832h640v-128h-640v128zM384 448h640v-128h-640v128zM384 64h640v-128h-640v128zM0 768c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 384c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 0c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128z" />
<glyph unicode="&#xea07;" glyph-name="warning" d="M512 803.226l429.102-855.226h-858.206l429.104 855.226zM512 896c-22.070 0-44.14-14.882-60.884-44.648l-437.074-871.112c-33.486-59.532-5-108.24 63.304-108.24h869.308c68.3 0 96.792 48.708 63.3 108.24h0.002l-437.074 871.112c-16.742 29.766-38.812 44.648-60.882 44.648v0zM576 64c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.346 28.654 64 64 64s64-28.654 64-64zM512 192c-35.346 0-64 28.654-64 64v192c0 35.346 28.654 64 64 64s64-28.654 64-64v-192c0-35.346-28.654-64-64-64z" />
diff --git a/src/fonts/iconfont/iconfont.ttf b/src/fonts/iconfont/iconfont.ttf
index 3e26965..f8f81a4 100644
--- a/src/fonts/iconfont/iconfont.ttf
+++ b/src/fonts/iconfont/iconfont.ttf
Binary files differ
diff --git a/src/fonts/iconfont/iconfont.woff b/src/fonts/iconfont/iconfont.woff
index 50dd36a..e400c03 100644
--- a/src/fonts/iconfont/iconfont.woff
+++ b/src/fonts/iconfont/iconfont.woff
Binary files differ
diff --git a/src/js/even.js b/src/js/even.js
index c82eb41..a2cee48 100644
--- a/src/js/even.js
+++ b/src/js/even.js
@@ -213,7 +213,7 @@ Even._linkToc = function() {
const headers = document.querySelectorAll('.post-content>h' + num);
for (let i = 0; i < headers.length; i++) {
const header = headers[i];
- header.innerHTML = `<a href="#${header.id}" class="headerlink"></a>${header.innerHTML}`;
+ header.innerHTML = `<a href="#${header.id}" class="headerlink anchor"><i class="iconfont icon-link"></i></a>${header.innerHTML}`;
}
}
};