wiki

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit d820b195f0b4bd9a9b0d9e15dbeb9cf426f74d07
parent 400868836cf7111a2bb01e462dd19a278a43e84f
Author: Alisa Lain <60989682+al1-ce@users.noreply.github.com>
Date:   Fri, 11 Jul 2025 06:07:30 +0300

fix styling, add footnotes, add favicon and others

Diffstat:
A.gitattributes | 14++++++++++++++
AREADME.md | 6++++++
Mpublic/_404.md | 4+++-
Mpublic/all_pages.md | 5+++--
Apublic/favicon.png | 3+++
Apublic/files/images/tega.png | 3+++
Mpublic/index.html | 119+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Mpublic/index.md | 3+++
Mpublic/js/plugins/footnote.js | 1+
Mpublic/js/plugins/wikilink.js | 2+-
Apublic/meta/options.md | 14++++++++++++++
Apublic/meta/style_test.md | 160+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpublic/wiki/Kagai_nihongo.md | 2+-
Mpublic/wiki/aa.md | 17+++++++++++++++++
Apublic/wiki/recursion.md | 2++
15 files changed, 335 insertions(+), 20 deletions(-)

diff --git a/.gitattributes b/.gitattributes @@ -0,0 +1,13 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.mp3 filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.fbx filter=lfs diff=lfs merge=lfs -text +*.blend filter=lfs diff=lfs merge=lfs -text +*.gltf filter=lfs diff=lfs merge=lfs -text +*.glb filter=lfs diff=lfs merge=lfs -text +*.kra filter=lfs diff=lfs merge=lfs -text +\ No newline at end of file diff --git a/README.md b/README.md @@ -0,0 +1,5 @@ +``` +git clone git@github.com:al1-ce/wiki.al1-ce.dev +cd wiki.al1-ce.dev +git lfs pull +``` +\ No newline at end of file diff --git a/public/_404.md b/public/_404.md @@ -1,3 +1,5 @@ -<h2><center>404 - Page not found</center></h2> +<h2><center id="page-404-title-center">404 - Page not found</center></h2> + +<center>You can <a href="" id="page-404-create-new-article">create it</a>.</center> <center>Return to <a href="/">home</a>?</center> diff --git a/public/all_pages.md b/public/all_pages.md @@ -1,4 +1,5 @@ |||| |:-|:-|:-| -|[Kagai_nihongo](wiki/Kagai_nihongo.md)|[index](/)|[markdown_flavour](meta/markdown_flavour.md)| -|[aa](wiki/aa.md)|[maintenance](meta/maintenance.md)|[style_guidelines](meta/style_guidelines.md)| +|[aa](wiki/aa.md)|[maintenance](meta/maintenance.md)|[recursion](wiki/recursion.md)| +|[index](/)|[markdown_flavour](meta/markdown_flavour.md)|[style_guidelines](meta/style_guidelines.md)| +|[kagai_nihongo](wiki/kagai_nihongo.md)|[options](meta/options.md)|[style_test](meta/style_test.md)| diff --git a/public/favicon.png b/public/favicon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b48d6e05364a8b47034a17026c33652d87ce550d0524177e3ba3e10aa4256a0b +size 1134 diff --git a/public/files/images/tega.png b/public/files/images/tega.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d1e0d5dae9b68f082b55657ab6317308667bd18ca32f820bfc3dd8b5504fdf4 +size 21984 diff --git a/public/index.html b/public/index.html @@ -10,6 +10,7 @@ <link rel="stylesheet" href="/css/reset.css"> <link rel="stylesheet" href="/js/plugins/themable.css"> <link rel="stylesheet" href="/css/dark.css"> + <link rel="icon" href="/favicon.png"> </head> <body> @@ -122,18 +123,43 @@ :root { --sidebar-width: 0 !important; - --heading-h1-font-size: var(--font-size-xl); + --heading-h1-border-style: solid; + --heading-h1-font-size: var(--font-size-xxl); + --heading-h1-font-weight: 400; + --heading-h1-border-color: var(--mono-tint2); + --heading-h1-border-width: 0 0 1px 0; + + --heading-h2-border-style: solid; + --heading-h2-font-size: var(--font-size-xl); + --heading-h2-font-weight: 400; + --heading-h2-border-color: var(--mono-tint2); + --heading-h2-border-width: 0; /* 0 0 1px 0; */ + --heading-h2-margin: auto; /* 2.5rem 0 1.5rem; */ + --heading-h2-padding: auto; /* 0 0 1rem 0; */ + + --heading-h3-border-style: solid; + --heading-h3-font-size: var(--font-size-l); + + --heading-h4-border-style: solid; + --heading-h4-font-size: var(--font-size-m); + + --heading-h5-border-style: solid; + --heading-h5-font-size: var(--font-size-s); + + --heading-h6-border-style: solid; + --heading-h6-font-size: var(--font-size-xs); + + --blockquote-padding: 0; } - h1 { + /* h1 { border-bottom: 1px solid var(--gray) !important; } h2 { border-bottom: none !important; - /* TODO: fix properly with themable */ - } + } */ #main { margin-bottom: 1rem; @@ -172,12 +198,12 @@ pre[data-lang="aa"] code { font-family: Mona,IPAMonaPGothic,"giko2",sans-serif !important; - font-size: 16px; - line-height: 18px; + font-size: 16px !important; + line-height: 18px !important; } - pre[data-lang="aa"] button { display: none; } + pre[data-lang="aa"] button { display: none !important; } pre[data-lang="aa"]::after { content: none !important; } .side-by-side { @@ -185,12 +211,13 @@ flex-direction: row; align-items: center; justify-content: center; + overflow-x: auto; /* flex-wrap: wrap; */ } @media only screen and (max-width: 500px) { #app-nav { - margin-left 0; + margin-left: 0; margin-right: 0; left: 0 !important; right: 0 !important; @@ -213,6 +240,21 @@ margin-left: 1rem; } } + + blockquote { + color: #789922 !important; + border: none !important; + margin: auto 0 !important; + } + + blockquote p { + margin: auto 0 !important; + } + + blockquote > blockquote { + color: #D00 !important; + text-decoration: underline; + } </style> <nav id="app-nav" class="app-nav"> <a id="nav-home" href="/">Home</a> @@ -273,11 +315,19 @@ }, plugins: [ function(hook, vm) { + function getDirname(pathname, separator) { + var parts = pathname.split(separator); + if (parts[parts.length - 1].indexOf('.') > -1) { + return parts.slice(0, -1).join(separator) + } + return pathname; + } + + // Invoked one time when docsify script is initialized + // hook.init(function () {}); + + // Invoked one time when the docsify instance has mounted on the DOM hook.mounted(function() { - // document.getElementById("nav-find").addEventListener("click", function() { - // document.body.classList.toggle("close"); - // }); - let sbar = document.querySelector(".sidebar > .search"); document.getElementById("app-nav").insertBefore(sbar, document.getElementById("nav-edit")); // have to keep it for search @@ -289,17 +339,55 @@ input.value = ""; }); }); + + // Invoked on each page load before new markdown is transformed to HTML. + // Supports asynchronous tasks (see beforeEach documentation for details). + // hook.beforeEach(function (markdown) {return markdown;}); + + // Invoked on each page load after new markdown has been transformed to HTML. + // Supports asynchronous tasks (see afterEach documentation for details). + hook.afterEach(function (html) {return html;}); + + // Invoked on each page load after new HTML has been appended to the DOM hook.doneEach(function() { document.title += ' - wiki@al1-ce'; - }); - hook.afterEach(function (html) { + + var urlNew = 'https://github.com/al1-ce/wiki.al1-ce.dev/new/master/public' + getDirname(vm.route.file, '/'); var urlEdit = 'https://github.com/al1-ce/wiki.al1-ce.dev/edit/master/public' + vm.route.file; var urlHist = 'https://github.com/al1-ce/wiki.al1-ce.dev/commits/master/public' + vm.route.file; document.getElementById("nav-edit").href = urlEdit; document.getElementById("nav-hist").href = urlHist; - return html; + + let p404_title = document.querySelector("#page-404-title-center"); + let p404_create = document.querySelector("#page-404-create-new-article"); + + if (p404_title != null) p404_title.innerHTML = `404 - Page "${vm.route.file}" not found.`; + if (p404_create != null) p404_create.href = urlNew; + + let opt_reset_cookies = document.querySelector("#opt-reset-cookies"); + let opt_reset_storage = document.querySelector("#opt-reset-storage"); + + if (opt_reset_cookies != null) opt_reset_cookies.addEventListener("click", () => { + if (confirm("Reset cookies?")) document.cookie.split(";").forEach(function(c) { + document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); + }); + }); + if (opt_reset_storage != null) opt_reset_storage.addEventListener("click", () => { + if (confirm("Reset local storage?")) localStorage.clear(); + }); + + for (let e of document.querySelectorAll("blockquote > p")) { + e.innerHTML = "> " + e.innerHTML; + } + + for (let e of document.querySelectorAll("blockquote > blockquote > p")) { + e.innerHTML = ">" + e.innerHTML; + } }); + + // Invoked one time after rendering the initial page + // hook.ready(function () {}); }, ] } @@ -318,6 +406,7 @@ <script src="/js/plugins/copy-code.js"></script> <link rel="stylesheet" href="/js/plugins/footer.css"> <script src="/js/plugins/footer.js"></script> + <script src="/js/plugins/footnote.js"></script> <!-- - ----------------------------- Prism languages ------------------------------ - --> <script src="/js/prism/d.js"></script> <script src="/js/prism/json.js"></script> diff --git a/public/index.md b/public/index.md @@ -4,3 +4,6 @@ This is an empty place for now and shall be for some time as I accumulate articl For now you could explore [[All Pages]], which wouldn't be much... +## Important pages + +- [[meta/options|Options]] diff --git a/public/js/plugins/footnote.js b/public/js/plugins/footnote.js @@ -34,6 +34,7 @@ const t = o > 0 ? "-" + o : ""; const c = $props.hideSubAnchor ? f : f + t; r = r.replace(s[0], `<sup class="footnote-symbol" id="ft-${f + t}">[\[${c}\]](#ftref-${f + t})</sup>`); + // r = r.replace(s[0], `<sup class="footnote-symbol" id="ft-${f + t}"><a href="#ftref-${f + t}">[${c}]</a></sup>`); e.push(`<stronge id="ftref-${f + t}">[↩︎](#ft-${f + t})</stronge>`); }); c.push(`${f}. ${s[1].trim().replaceAll("\n", "<br />")} ${e.join(" ")}\n`); diff --git a/public/js/plugins/wikilink.js b/public/js/plugins/wikilink.js @@ -37,7 +37,7 @@ function plugin(hook, vm) { topic = topic.replaceAll(' ', '-'); if (hashPath.length == 0) { hashPath = vm.route.path; - return `<a href="#${topic}">${showText}</a>` + return `<a href="${topic}">${showText}</a>` } if (hashPath.indexOf('/') === 0) { //absolute path diff --git a/public/meta/options.md b/public/meta/options.md @@ -0,0 +1,13 @@ +# Settings + +This is a settings page, it will be filled with settings in a future, maybe a custom theme or something like it. + +## Clearing local cache + +This wiki might store some cookies (right now it doesn't, TODO: change when it will) related to customization options. + +<button id="opt-reset-cookies">Reset cookies</button> + +This wiki uses local storage for caching search, storing elements or other similar use-cases. + +<button id="opt-reset-storage">Reset local storage</button> +\ No newline at end of file diff --git a/public/meta/style_test.md b/public/meta/style_test.md @@ -0,0 +1,160 @@ +# Style test + +Page to test markdown style and some features. + +## Headers + +# Header 1 + +Some text here + +## Header 2 + +Some text here + +### Header 3 + +Some text here + +#### Header 4 + +Some text here + +##### Header 5 + +Some text here + +###### Header 6 + +Some text here + +Header 1 === +========== + +Header 2 --- +---------- + +## Lists + +Normal list +- Aa +- Bb +- Cc + - Dd + - Ee +- Ff + +Numbered list +1. 123 +2. 456 + 3. 789 +4. 0 + +## Text style + +- bold **bold** bold +- italic *italic* italic +- bold italic **_bold italic_** bold italic +- code `code` code +- striked ~~striked~~ striked +- highlighted ==highlighted== highlighted +- subscript ~sub~script subscript +- superscript ^super^script superscript + +## Lines + +*** + +--- + +___ + +## Blockquotes + +> Paragraph 1 +> +> paragraph 2 +>> double block +> - list item a +> - list item b +> *text* styling in **block** + +## Code blocks + +```md +<!--markdown--> +# Header +``` + +```d +// d +int main(int argc, char **argv) { return 0; } +``` + + +```aa +AA (Shift JIS) +|     .|\|/ |     |   .| +| ∧∧.|/⌒ヽ、| ∧_∧ .| ∧∧ | +|(,,゚Д゚)||,,゚ Θ゚)|(; ´Д`)|(=゚ω゚)| +``` + +## Images + +Markdown image + +![Img thing](../files/images/tega.png) + +HTML image + +<img src="../files/images/tega.png" width="640px" /> + +## Footnotes + +Here's a simple footnote,a[^1] and here's a longer one.[^bignote] + +[^1]: This is the first footnote. + +[^bignote]: bignotezz + +## Links + +- [normal link](/) - normal link +- [[markdown flavour]] - wikilink +- [[/wiki/recursion|recursion]] - absolute wikilink +- [[https://a.com|a.com]] - external wikilink? +- [ext link][5] `[link][id]` DO NOT USE IT CONFLICTS WITH FOOTNOTES +- <https://wiki.al1-ce.dev> - autolink +- <fake@example.com> - auto email + +[5]: https://wiki.al1-ce.dev + +## Tables + +| Syntax | Description | +| ----------- | ----------- | +| Header | Title | +| Paragraph | Text | + +| Syntax | Description | Test Text | +| :--- | :----: | ---: | +| Header | Title | Here's this | +| Paragraph | Text | And more | + +## Custom header ID's + +### My Great Heading {#custom-id} +- [Markdown link](#custom-id) +- [[#custom-id|Wiki link]] + +## Misc + +- [x] done +- [ ] todo + +- Auto-emoji :joy: + +!> Warning + +?> Info + diff --git a/public/wiki/Kagai_nihongo.md b/public/wiki/Kagai_nihongo.md @@ -1,6 +1,6 @@ # Kagai nihongo (moon. foreign japanese) -An unnamed phenomenon, most likely brought by [[imageboards]], where [[anon]] incorporate select japanese words into his speech. +An unnamed phenomenon, most likely brought by [[imageboards]], where [[anon|anons]] incorporate select japanese words into his speech. Notable examples: - daijoubu - "not daijoubu", "it's daijoubu", replacement for "ok" diff --git a/public/wiki/aa.md b/public/wiki/aa.md @@ -94,6 +94,23 @@ r-'ァ'"´/  /! ハ  ハ  !  iヾ_ノ i イ iゝ、イ人レ ,.ヘ,)、  )>,、 _____, ,.イ  ハ    レ ル` ー--─ ´ルレ レ´ ``` +```aa + +                 ∩ +                 | | +                 | |     / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ +        ∧_∧   | |    / Sensei, I request a guide for one +       ( ;´Д`)//  < or more of the following editors! +      /       /     \ Something like a walkthrough... +     / /|    /       \_____________ +  __| | .|    | +  \   ̄ ̄ ̄ ̄ ̄ ̄ ̄\ +  ||\             \ +  ||\|| ̄ ̄ ̄ ̄ ̄ ̄ ̄|| ̄ +  ||  || ̄ ̄ ̄ ̄ ̄ ̄ ̄|| +     .||              || +``` + |Japan Hub|| |:-|:-| |[[Futaba Channel]]|[[AA]] ⋅ [[Nijiura]]| diff --git a/public/wiki/recursion.md b/public/wiki/recursion.md @@ -0,0 +1 @@ +# [[Recursion]] +\ No newline at end of file