diff --git a/config/application.yaml b/config/application.yaml
index a581c12..5fae072 100644
--- a/config/application.yaml
+++ b/config/application.yaml
@@ -1,6 +1,6 @@
server:
port: 8081
dir:
- root: \Gitlab\note
- main: PDF
-message: 阿里云2C2G3M 99元/年,老用户也可以哦
\ No newline at end of file
+ root: \Work\Github\note-summary
+ main: 专栏
+message:
\ No newline at end of file
diff --git a/static/index.js b/static/index.js
index 5de3f93..391386f 100644
--- a/static/index.js
+++ b/static/index.js
@@ -19,18 +19,24 @@ if (path.replace("/", "") === "") {
}
window.onload = function () {
- var title = document.title
- var ele = document.getElementById(title + ".md");
- if (ele) {
- ele.classList.add("current-tab")
+ var titleEle = document.getElementById("title");
+ if (!titleEle) {
+ return
}
+ var title = titleEle.getAttribute("data-id")
+ console.log("title=" + title)
var eleList = document.getElementsByClassName("menu-item")
for (var i = 0; i < eleList.length; i++) { //遍历数组
- if (eleList[i].id.startsWith(title) && i > 0) {
- document.getElementById("prePage").innerHTML = "上一页"
- }
- if (eleList[i].id.startsWith(title) && i < eleList.length) {
- document.getElementById("nextPage").innerHTML = "下一页"
+ console.log("eleText=" + eleList[i].id)
+ if (eleList[i].id.startsWith(title)) {
+ eleList[i].classList.add("current-tab")
+ if (i > 0) {
+ document.getElementById("prePage").innerHTML = "上一页"
+ }
+ if (i < eleList.length) {
+ document.getElementById("nextPage").innerHTML = "下一页"
+ }
+
}
}
}
@@ -92,15 +98,3 @@ function hide_canvas() {
sidebar.classList.remove('show')
overlay.classList.remove('show')
}
-
-const gitalk = new Gitalk({
- clientID: 'a0fe07089fe55e24df4e',
- clientSecret: '58bc23313fbc2e117a34f024967b6b3caaffc1e9',
- repo: 'com-lianglianglee-learn', // The repository of store comments,
- owner: 'lianglianglee-learn',
- admin: ['lianglianglee-learn'],
- id: document.title, // Ensure uniqueness and length less than 50
- distractionFreeMode: false // Facebook-like distraction free mode
-})
-
-gitalk.render('gitalk-container')
diff --git a/templates/index.html b/templates/index.html
index 79cccd9..2b925f0 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -18,8 +18,6 @@
-
-
@@ -68,9 +66,11 @@
overflow-x: auto;
overflow-y: hidden;">
+ {{if .message}}
{{.message}}
+ {{end}}
-
{{.title}}
+
{{.title}}
{{ .htmlContext }}
@@ -82,8 +82,6 @@
-
-