Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xianmin/hugo-theme-jane.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Xianmin <xianmin12@gmail.com>2022-09-06 15:58:55 +0300
committerChen Xianmin <xianmin12@gmail.com>2022-09-06 15:58:55 +0300
commit679987c5d9883ea37b401ee6c194bd085b90bab4 (patch)
treef6f4a6b87e902dd6dd376b7c65d0e0d80a7e12b9
parent942f9d91bfdb94f4ee2699c7525ef582c0a7f79e (diff)
fix: footnote error for new hugo version
-rw-r--r--assets/js/main.js2
-rw-r--r--assets/sass/_partial/_post/_footnote.scss58
-rw-r--r--exampleSite/content/post/jane-theme-preview.md3
3 files changed, 31 insertions, 32 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index 41be1dc..b99abb5 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -153,7 +153,7 @@ var headerAnchor = function() {
*/
var fnTooltip = function () {
$(".footnote-ref").each(function () {
- var id = $(this).children("a").attr("href").substr(1),
+ var id = $(this).attr("href").substr(1),
footnote = $(document.getElementById(id)).clone(),
outer_wrapper = $("<span>", { "class": "fn-content" }),
inner_wrapper = $("<span>", { "class": "fn-text" });
diff --git a/assets/sass/_partial/_post/_footnote.scss b/assets/sass/_partial/_post/_footnote.scss
index b9182e9..26808d7 100644
--- a/assets/sass/_partial/_post/_footnote.scss
+++ b/assets/sass/_partial/_post/_footnote.scss
@@ -12,6 +12,14 @@
display: inline;
position: relative;
margin-left: 3px;
+ font-weight: bold;
+
+ &::after {
+ content: "]";
+ }
+ &::before {
+ content: "[";
+ }
&:hover .fn-content {
opacity: 1;
@@ -19,16 +27,6 @@
transform: translate3d(0, 0, 0) rotate3d(0, 0, 0, 0);
// transition: opacity 0.3s transform 0.3s;
}
-
- >a {
- font-weight: 700;
- &::after {
- content: ']';
- }
- &::before {
- content: '[';
- }
- }
}
.fn-content {
@@ -37,7 +35,6 @@
z-index: 14;
left: 50%;
bottom: 100%;
- line-height: 1.3;
border-radius: 0.5em;
border: 1px solid rgba(0, 0, 0, 0.1);
background: #f6f6f6;
@@ -45,28 +42,28 @@
visibility: hidden;
transform: translate3d(0, -10px, 0);
transition: opacity 0.3s, transform 0.3s;
-// transition-delay: 2s;
+ // transition-delay: 2s;
-// &:hover {
-// opacity: 1;
-// pointer-events: auto;
-// }
+ // &:hover {
+ // opacity: 1;
+ // pointer-events: auto;
+ // }
/* Arrow */
-// &:after {
-// content: '';
-// top: 100%;
-// left: 50%;
-// border: solid transparent;
-// height: 0;
-// width: 0;
-// position: absolute;
-// pointer-events: none;
-// border-color: transparent;
-// border-top-color: #f6f6f6;
-// border-width: 10px;
-// margin-left: -10px;
-// }
+ // &:after {
+ // content: '';
+ // top: 100%;
+ // left: 50%;
+ // border: solid transparent;
+ // height: 0;
+ // width: 0;
+ // position: absolute;
+ // pointer-events: none;
+ // border-color: transparent;
+ // border-top-color: #f6f6f6;
+ // border-width: 10px;
+ // margin-left: -10px;
+ // }
.fn-text {
// line-height: 1.35;
display: inline-block;
@@ -78,4 +75,3 @@
}
}
}
-
diff --git a/exampleSite/content/post/jane-theme-preview.md b/exampleSite/content/post/jane-theme-preview.md
index 785d32d..5e9be72 100644
--- a/exampleSite/content/post/jane-theme-preview.md
+++ b/exampleSite/content/post/jane-theme-preview.md
@@ -178,7 +178,10 @@ will produce:
You can create footnotes like this[^footnote].
+This is another footnote[^another-footnote].
+
[^footnote]: Here is the *text* of the **footnote**.
+[^another-footnote]: second footnote is here.
Mouse on the ‘footnote’ superscript to see content of the footnote.