From 30573143c023272b92f414a2ae0a51186618c435 Mon Sep 17 00:00:00 2001 From: shaoying Date: Mon, 10 Sep 2018 19:37:51 +0800 Subject: [PATCH] mac add wiki.link --- usr/library/wiki.js | 9 +++++++-- usr/template/common/wiki.html | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/usr/library/wiki.js b/usr/library/wiki.js index 2b1d9b82..fb3d94bf 100644 --- a/usr/library/wiki.js +++ b/usr/library/wiki.js @@ -111,9 +111,12 @@ function menu() { one.className = list[j].level; } + } + var m = document.getElementsByClassName("link"); + for (var i = 0; i < m.length; i++) { var one = m[i].appendChild(document.createElement("div")); - var a = one.appendChild(document.createTextNode("相关链接")); + var a = one.appendChild(document.createTextNode("相关链接: ")); for (var j = 0; j < link.length; j++) { var one = m[i].appendChild(document.createElement("div")); @@ -167,5 +170,7 @@ function tags(event) { document.onmouseup = tags; window.onload = function() { toggle(); - menu(); + if (location.href.endsWith(".md")) { + menu(); + } } diff --git a/usr/template/common/wiki.html b/usr/template/common/wiki.html index ae1a8c2f..d4b3cb0b 100644 --- a/usr/template/common/wiki.html +++ b/usr/template/common/wiki.html @@ -109,7 +109,7 @@ float:left; margin-left:2%; } -.link { +.li_link { font-size:18px; } .number { @@ -136,6 +136,16 @@ .menu .h3 { padding-left: 10px; } +.link { + margin-top:10px; + font-size: 16px; +} +.link div:first-child { + margin-left:-10px; +} +.link div { + padding-left:10px; +}
@@ -145,6 +155,7 @@
上次阅读时间: {{option . "last_record_time"|meta}} 总访问量: {{option . "record_count"|meta}}
+
{{range option . "nline"|meta|list}}
{{.}}
@@ -160,7 +171,7 @@ {{else}}