miki

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

commit 782f00a25ec3a0b0800c4a905907ee574350aa76
parent 0b74c71aa7b7decfd699a6d451f9a3be31eb94d6
Author: weetat <wtenison@protonmail.com>
Date:   Tue, 22 Sep 2026 23:52:50 +0000

Drop the PWA layer and finish the editor's error panel

The service worker never did anything useful offline and its cached
responses made testing confusing, so remove sw.js, the manifest, its
<link> in tmpl.meta.html, the registration block in global/script.js,
and the ten icon PNGs it needed.

Also populate the editor's error-output panel from getFMDErrors(1) when
it opens, clear the placeholder text out of both editor panels, restyle
#subcard as a bordered card, and point the homepage subcard at the
editor preview and the Codeberg repo.

Diffstat:
Mweb/edit/index.html | 4++--
Mweb/edit/script.js | 1+
Mweb/global/fmd.wasm | 0
Dweb/global/manifest.json | 66------------------------------------------------------------------
Mweb/global/script.js | 14--------------
Mweb/global/styles.css | 8+++++---
Mweb/global/tmpl.meta.html | 1-
Mweb/home/info.fmd | 4++--
Dweb/icons/icon-128x128.png | 0
Dweb/icons/icon-144x144.png | 0
Dweb/icons/icon-152x152.png | 0
Dweb/icons/icon-192x192.png | 0
Dweb/icons/icon-256x256.png | 0
Dweb/icons/icon-384x384.png | 0
Dweb/icons/icon-48x48.png | 0
Dweb/icons/icon-512x512.png | 0
Dweb/icons/icon-72x72.png | 0
Dweb/icons/icon-96x96.png | 0
Dweb/sw.js | 23-----------------------
19 files changed, 10 insertions(+), 111 deletions(-)

diff --git a/web/edit/index.html b/web/edit/index.html @@ -47,11 +47,11 @@ </div> <div id="guide-text-panel" class="--transition"> - <div class="_content_">Test guide text</div> + <div class="_content_"></div> </div> <div id="error-output-panel" class="--transition"> - <div class="_content_">Test error ouput</div> + <div class="_content_"></div> </div> </div> diff --git a/web/edit/script.js b/web/edit/script.js @@ -84,6 +84,7 @@ var fmdViewTransitions = { }, "error-output": { open: function () { + fmdViewPanelSet["error-output"].content.innerHTML = getFMDErrors(1) fmdViewPanelSet["error-output"].root.classList.add("--open") errorLogButton = document.getElementById("error-log-bttn") errorLogButton.innerHTML = "▾ CLOSE" diff --git a/web/global/fmd.wasm b/web/global/fmd.wasm Binary files differ. diff --git a/web/global/manifest.json b/web/global/manifest.json @@ -1,65 +0,0 @@ -{ - "id": "miki", - "name": "My Wiki", - "short_name": "Miki", - "description": "A personal wiki and note taking application.", - "start_url": "/home/index.html", - - "display": "standalone", - "orientation": "any", - "form_factor": "any", - "theme_color": "#ff7675", - "background_color": "#2d3436", - "icons": [ - { - "src": "/web/icons/icon-48x48.png", - "sizes": "48x48", - "type": "image/png" - }, - { - "src": "/web/icons/icon-72x72.png", - "sizes": "72x72", - "type": "image/png" - }, - { - "src": "/web/icons/icon-96x96.png", - "sizes": "96x96", - "type": "image/png" - }, - { - "src": "/web/icons/icon-128x128.png", - "sizes": "128x128", - "type": "image/png" - }, - { - "src": "/web/icons/icon-144x144.png", - "sizes": "144x144", - "type": "image/png" - }, - { - "src": "/web/icons/icon-152x152.png", - "sizes": "152x152", - "type": "image/png" - }, - { - "src": "/web/icons/icon-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/web/icons/icon-256x256.png", - "sizes": "256x256", - "type": "image/png" - }, - { - "src": "/web/icons/icon-384x384.png", - "sizes": "384x384", - "type": "image/png" - }, - { - "src": "/web/icons/icon-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} -\ No newline at end of file diff --git a/web/global/script.js b/web/global/script.js @@ -1,19 +1,5 @@ // GLOBAL SETTINGS // -if ('serviceWorker' in navigator) { - - navigator.serviceWorker.register('/sw.js') - .then(registration => { - console.log('> Service Worker registered with scope:', registration.scope); - }) - .catch(error => { - console.error('> Service Worker registration failed:', error); - }) - -} else { - console.error('> Service Worker is not supported by this browser.'); -} - if (sessionStorage.getItem("theme") != null) { document.body.style.colorScheme = sessionStorage.getItem("theme") } diff --git a/web/global/styles.css b/web/global/styles.css @@ -2,7 +2,6 @@ @import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap'); - /* STYLE GUIDE :: class: __attribute - ( __ ) signifies global attribute @@ -383,16 +382,19 @@ #subcard { width: min(75vw); + padding: var(--fmd_padding); + margin-bottom: var(--fmd_margin--double); display: grid; justify-self: center; - background-color: var(--fmd_color__bg-l); + background-color: var(--fmd_color__fg-l); + border: 1px solid var(--fmd_color__fg-d); + border-radius: var(--fmd_border__radius--half); @media screen and (min-width: 900px) { width: calc(var(--fmd_gold) * 12rem); margin-right: var(--fmd_margin--double); - margin-bottom: var(--fmd_margin--double); float: left; } diff --git a/web/global/tmpl.meta.html b/web/global/tmpl.meta.html @@ -1,6 +1,5 @@ {{define "meta"}} <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" /> -<link rel="manifest" href="/web/global/manifest.json" /> <script src="/web/global/script.js" defer></script> {{end}} \ No newline at end of file diff --git a/web/home/info.fmd b/web/home/info.fmd @@ -1,8 +1,8 @@ h1:{Welcome} _(id:"subcard"):{ - This is a subcard + i:{Text Editor:} a(link:"https://test.wtenison.com/edit"):{Edtior Preview} + i:{Code Repo:} a(link:"https://codeberg.org/wtenison/miki"):{i:{Codeberg.org}} } - Miki is a personal documentation application in development with the intent of providing a standard interface for creating, organizing, and viewing wiki like articles generated by the user. The repo for this project exists a(link:"https://codeberg.org/wtenison/miki"):here (i:{Codeberg.org}). The project is a work in progress; polish and precision takes care and time. The current point of order is completing an functional editor interface for the markdown language (my own FMD). The current version of the editor can be viewed a(link:"https://test.wtenison.com/edit"):here. diff --git a/web/icons/icon-128x128.png b/web/icons/icon-128x128.png Binary files differ. diff --git a/web/icons/icon-144x144.png b/web/icons/icon-144x144.png Binary files differ. diff --git a/web/icons/icon-152x152.png b/web/icons/icon-152x152.png Binary files differ. diff --git a/web/icons/icon-192x192.png b/web/icons/icon-192x192.png Binary files differ. diff --git a/web/icons/icon-256x256.png b/web/icons/icon-256x256.png Binary files differ. diff --git a/web/icons/icon-384x384.png b/web/icons/icon-384x384.png Binary files differ. diff --git a/web/icons/icon-48x48.png b/web/icons/icon-48x48.png Binary files differ. diff --git a/web/icons/icon-512x512.png b/web/icons/icon-512x512.png Binary files differ. diff --git a/web/icons/icon-72x72.png b/web/icons/icon-72x72.png Binary files differ. diff --git a/web/icons/icon-96x96.png b/web/icons/icon-96x96.png Binary files differ. diff --git a/web/sw.js b/web/sw.js @@ -1,22 +0,0 @@ -self.addEventListener("install", (event) => { - event.waitUntil( - caches.open("v1") - .then((cache) => { - return cache.addAll([ - "/", - "/home/", - "/home/index.html", - "/home/script.js", - "/global/", - "/global/styles.css", - "/global/script.js", - "/global/fmd.wasm", - "/global/wasm_exec.js", - ]).catch(err => console.error("> Failed to cache files: ", err)) - }) - ); -}); - -self.addEventListener("fetch", (event) => { - console.log("> Fetch: ", event.request.url); -}); -\ No newline at end of file