add poem card
This commit is contained in:
1 parent
58f4fa9962
commit
e92e8edbf9
5 files changed
+90
-2
No files matched your search
@@ -1054,6 +1054,7 @@ inject:
|
|||||||
- <link rel="stylesheet" href="/css/rightmenu.css">
|
- <link rel="stylesheet" href="/css/rightmenu.css">
|
||||||
- <link rel="stylesheet" href="/css/shuoshuo.css">
|
- <link rel="stylesheet" href="/css/shuoshuo.css">
|
||||||
- <link rel="stylesheet" href="/css/font.css">
|
- <link rel="stylesheet" href="/css/font.css">
|
||||||
|
- <link rel="stylesheet" href="/css/poem.css">
|
||||||
- <link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="all" onload="this.media="all"">
|
- <link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="all" onload="this.media="all"">
|
||||||
bottom:
|
bottom:
|
||||||
# - <script src="xxxx"></script>
|
# - <script src="xxxx"></script>
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#card-poem.card-widget
|
||||||
|
#poem_sentence
|
||||||
|
#poem_info
|
||||||
|
#poem_dynasty
|
||||||
|
#poem_author
|
||||||
|
script(src='https://cdn.liumingye.cn/npm/js-heo@1.0.11/poem/jinrishici.js', charset='utf-8')
|
||||||
|
script(type='text/javascript').
|
||||||
|
jinrishici.load(function(result) {
|
||||||
|
var sentence = document.querySelector("#poem_sentence")
|
||||||
|
var author = document.querySelector("#poem_author")
|
||||||
|
var dynasty = document.querySelector("#poem_dynasty")
|
||||||
|
var sentenceText = result.data.content
|
||||||
|
sentenceText = sentenceText.substr(0, sentenceText.length - 1);
|
||||||
|
sentence.innerHTML = sentenceText
|
||||||
|
dynasty.innerHTML = result.data.origin.dynasty
|
||||||
|
author.innerHTML = result.data.origin.author + '《' + result.data.origin.title + '》'
|
||||||
|
});
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
else
|
else
|
||||||
!=partial('includes/widget/card_author', {}, {cache: true})
|
!=partial('includes/widget/card_author', {}, {cache: true})
|
||||||
!=partial('includes/widget/card_announcement', {}, {cache: true})
|
!=partial('includes/widget/card_announcement', {}, {cache: true})
|
||||||
|
!=partial('includes/widget/card_poem', {}, {cache: true})
|
||||||
!=partial('includes/widget/card_top_self', {}, {cache: true})
|
!=partial('includes/widget/card_top_self', {}, {cache: true})
|
||||||
.sticky_layout
|
.sticky_layout
|
||||||
if showToc
|
if showToc
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
//- page
|
//- page
|
||||||
!=partial('includes/widget/card_author', {}, {cache: true})
|
!=partial('includes/widget/card_author', {}, {cache: true})
|
||||||
!=partial('includes/widget/card_announcement', {}, {cache: true})
|
!=partial('includes/widget/card_announcement', {}, {cache: true})
|
||||||
|
!=partial('includes/widget/card_poem', {}, {cache: true})
|
||||||
!=partial('includes/widget/card_top_self', {}, {cache: true})
|
!=partial('includes/widget/card_top_self', {}, {cache: true})
|
||||||
|
|
||||||
.sticky_layout
|
.sticky_layout
|
||||||
|
|||||||
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user