miki

Miki: personal wiki with the fmd markup format
git clone https://wtenison.com/repo/miki.git
Log | Files | Refs | README | LICENSE

commit 80f3de4bba87deb3abb8e994af85cd994aa6baf8
parent c8fab1bf4306efa366ff120e0c3f0cc737234a50
Author: weetat <wtenison@protonmail.com>
Date:   Thu, 27 Feb 2025 13:46:00 +0000

Added 'subject' page.

Diffstat:
Msrc/filesystem/directories.go | 2+-
Msrc/network/routes.go | 2+-
Mweb/edit/index.html | 2+-
Mweb/home/index.html | 2+-
Aweb/subject/index.html | 39+++++++++++++++++++++++++++++++++++++++
5 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/src/filesystem/directories.go b/src/filesystem/directories.go @@ -17,7 +17,7 @@ const ( type DirectoryPackage struct { Root string // The root directory of the resource. DependencyFiles []string // The set of valid resource files. - DependencyData interface{} // Any relevant resource data. + // DependencyData interface{} // Any relevant resource data. } // func MakeDirectoryPkg(resSig DirectorySignature) (DirectoryPackage, error) { diff --git a/src/network/routes.go b/src/network/routes.go @@ -56,7 +56,7 @@ func handlePageDefault(w http.ResponseWriter, r *http.Request) { } // Render template. - if _err = _tmpl.ExecuteTemplate(w, "index.html", _rPkg.DependencyData); _err != nil { + if _err = _tmpl.ExecuteTemplate(w, "index.html", nil); _err != nil { log.Printf("_ERROR\tnetwork:handlePageDefault(\"/\"):%s", _err) http.Error(w, "_ERROR:network:handlePageDefault(\"/\"):template.ExecuteTemplate", 500) return diff --git a/web/edit/index.html b/web/edit/index.html @@ -17,7 +17,7 @@ <section id="left"></section> <section id="main" class="__container"> - <textarea name="editor" id="0">{{.fileText}}</textarea> + <textarea name="editor" id="0">{{.fileTextFMD}}</textarea> </section> <section id="right"></section> diff --git a/web/home/index.html b/web/home/index.html @@ -24,7 +24,7 @@ <section id="_body"> - {{.PageContent}} + {{.fileTextHTML}} </section> diff --git a/web/subject/index.html b/web/subject/index.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + +<head> + <title>Miki/Home</title> + <meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1.0" /> + <link rel="stylesheet" type="text/css" href="/web/global/styles.css" /> + <script src="/web/global/script.js" defer></script> +</head> + +<body> + + {{template "header" "Home"}} + + <section class="_content"> + + <section id="left"></section> + + <section id="subject_"> + + <section id="_card" class="__container_bg-1"> + + </section> + + <section id="_body"> + + {{.fileTextHTML}} + + </section> + + </section> + + <section id="right"></section> + + </section> +</body> + +</html> +\ No newline at end of file