浏览代码

relative URL, jQuery not necessary

Johann ELSASS 1 年之前
父节点
当前提交
31746f88ff
共有 3 个文件被更改,包括 6 次插入7 次删除
  1. 2 1
      web/config.toml
  2. 1 3
      web/layouts/_default/baseof.html
  3. 3 3
      web/layouts/index.html

+ 2 - 1
web/config.toml

@@ -1,7 +1,8 @@
 baseURL = "https://lazpaint.github.io/"
+relativeURL = true
 defaultContentLanguage = "en"
 title = "download_lazpaint"
-disableKinds = ["taxonomyTerm"]
+disableKinds = ["taxonomy"]
 
 [params]
   repo = "https://github.com/bgrabitmap/lazpaint/releases/download/"

+ 1 - 3
web/layouts/_default/baseof.html

@@ -1,7 +1,5 @@
 {{ partial "header.html" . }}
     <main id="main">{{ block "main" . }}{{ end }}
     </main>
-    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
-        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
-        crossorigin="anonymous"></script>{{ block "dynamic" . }}{{ end }}
+    {{ block "dynamic" . }}{{ end }}
 {{ partial "footer.html" . }}

+ 3 - 3
web/layouts/index.html

@@ -69,9 +69,9 @@
 
     	if (OSName != "unknown")
     	{
-    	    osHint = $('#os-hint');
-        	osHint.text(osHint.text().replace("%s", OSName));
-        	osHint.css("visibility", "visible");
+    	    osHint = document.getElementById("os-hint");
+        	osHint.innerHTML = osHint.innerHTML.replace("%s", OSName);
+        	osHint.style.visibility = "visible";
     	}
 	</script>
 {{- end }}