From 0f34ef13cbeb40f18db3ff8af91072b8d8e8214f Mon Sep 17 00:00:00 2001 From: IkiWiki Date: Wed, 11 Sep 2024 14:34:45 -0400 Subject: [PATCH] templates/*: cleaned up indents + folder restructure --- {basewiki => base/css}/bootstrap.local.css | 0 {basewiki => base/css}/local.css | 0 {basewiki => base}/favicon.ico | Bin .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../fonts/glyphicons-halflings-regular.woff2 | Bin {basewiki => base}/ikiwiki.mdwn | 0 {basewiki => base}/ikiwiki/directive.mdwn | 0 {basewiki => base}/ikiwiki/formatting.mdwn | 0 {basewiki => base}/ikiwiki/markdown.mdwn | 0 {basewiki => base}/ikiwiki/openid.mdwn | 0 {basewiki => base}/ikiwiki/pagespec.mdwn | 0 .../ikiwiki/pagespec/attachment.mdwn | 0 {basewiki => base}/ikiwiki/pagespec/po.mdwn | 0 .../ikiwiki/pagespec/sorting.mdwn | 0 {basewiki => base}/ikiwiki/searching.mdwn | 0 {basewiki => base}/ikiwiki/subpage.mdwn | 0 .../ikiwiki/subpage/linkingrules.mdwn | 0 {basewiki => base}/ikiwiki/wikilink.mdwn | 0 {basewiki => base}/index.mdwn | 0 base/js/mastodon.js | 55 +++ {basewiki => base}/recentchanges.fr.po | 0 {basewiki => base}/recentchanges.mdwn | 0 {basewiki => base}/sandbox.mdwn | 0 {basewiki => base}/shortcuts.fr.po | 0 {basewiki => base}/shortcuts.mdwn | 0 {basewiki => base}/templates.mdwn | 0 {basewiki => base}/templates/note.mdwn | 0 {basewiki => base}/templates/popup.mdwn | 0 {basewiki => base}/wikiicons/diff.png | Bin {basewiki => base}/wikiicons/email.png | Bin {basewiki => base}/wikiicons/languages.png | Bin .../wikiicons/openidlogin-bg.gif | Bin {basewiki => base}/wikiicons/revert.png | Bin {basewiki => base}/wikiicons/search-bg.gif | Bin content/contact.pot | 2 +- content/footer.pot | 2 +- content/index.pot | 2 +- content/sidebar.pot | 2 +- ikiwiki.setup | 2 +- templates/page.tmpl | 389 +++++++----------- templates/trails.tmpl | 54 +-- 44 files changed, 245 insertions(+), 263 deletions(-) rename {basewiki => base/css}/bootstrap.local.css (100%) rename {basewiki => base/css}/local.css (100%) rename {basewiki => base}/favicon.ico (100%) rename {basewiki => base}/fonts/glyphicons-halflings-regular.eot (100%) rename {basewiki => base}/fonts/glyphicons-halflings-regular.svg (100%) rename {basewiki => base}/fonts/glyphicons-halflings-regular.ttf (100%) rename {basewiki => base}/fonts/glyphicons-halflings-regular.woff (100%) rename {basewiki => base}/fonts/glyphicons-halflings-regular.woff2 (100%) rename {basewiki => base}/ikiwiki.mdwn (100%) rename {basewiki => base}/ikiwiki/directive.mdwn (100%) rename {basewiki => base}/ikiwiki/formatting.mdwn (100%) rename {basewiki => base}/ikiwiki/markdown.mdwn (100%) rename {basewiki => base}/ikiwiki/openid.mdwn (100%) rename {basewiki => base}/ikiwiki/pagespec.mdwn (100%) rename {basewiki => base}/ikiwiki/pagespec/attachment.mdwn (100%) rename {basewiki => base}/ikiwiki/pagespec/po.mdwn (100%) rename {basewiki => base}/ikiwiki/pagespec/sorting.mdwn (100%) rename {basewiki => base}/ikiwiki/searching.mdwn (100%) rename {basewiki => base}/ikiwiki/subpage.mdwn (100%) rename {basewiki => base}/ikiwiki/subpage/linkingrules.mdwn (100%) rename {basewiki => base}/ikiwiki/wikilink.mdwn (100%) rename {basewiki => base}/index.mdwn (100%) create mode 100644 base/js/mastodon.js rename {basewiki => base}/recentchanges.fr.po (100%) rename {basewiki => base}/recentchanges.mdwn (100%) rename {basewiki => base}/sandbox.mdwn (100%) rename {basewiki => base}/shortcuts.fr.po (100%) rename {basewiki => base}/shortcuts.mdwn (100%) rename {basewiki => base}/templates.mdwn (100%) rename {basewiki => base}/templates/note.mdwn (100%) rename {basewiki => base}/templates/popup.mdwn (100%) rename {basewiki => base}/wikiicons/diff.png (100%) rename {basewiki => base}/wikiicons/email.png (100%) rename {basewiki => base}/wikiicons/languages.png (100%) rename {basewiki => base}/wikiicons/openidlogin-bg.gif (100%) rename {basewiki => base}/wikiicons/revert.png (100%) rename {basewiki => base}/wikiicons/search-bg.gif (100%) diff --git a/basewiki/bootstrap.local.css b/base/css/bootstrap.local.css similarity index 100% rename from basewiki/bootstrap.local.css rename to base/css/bootstrap.local.css diff --git a/basewiki/local.css b/base/css/local.css similarity index 100% rename from basewiki/local.css rename to base/css/local.css diff --git a/basewiki/favicon.ico b/base/favicon.ico similarity index 100% rename from basewiki/favicon.ico rename to base/favicon.ico diff --git a/basewiki/fonts/glyphicons-halflings-regular.eot b/base/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from basewiki/fonts/glyphicons-halflings-regular.eot rename to base/fonts/glyphicons-halflings-regular.eot diff --git a/basewiki/fonts/glyphicons-halflings-regular.svg b/base/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from basewiki/fonts/glyphicons-halflings-regular.svg rename to base/fonts/glyphicons-halflings-regular.svg diff --git a/basewiki/fonts/glyphicons-halflings-regular.ttf b/base/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from basewiki/fonts/glyphicons-halflings-regular.ttf rename to base/fonts/glyphicons-halflings-regular.ttf diff --git a/basewiki/fonts/glyphicons-halflings-regular.woff b/base/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from basewiki/fonts/glyphicons-halflings-regular.woff rename to base/fonts/glyphicons-halflings-regular.woff diff --git a/basewiki/fonts/glyphicons-halflings-regular.woff2 b/base/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from basewiki/fonts/glyphicons-halflings-regular.woff2 rename to base/fonts/glyphicons-halflings-regular.woff2 diff --git a/basewiki/ikiwiki.mdwn b/base/ikiwiki.mdwn similarity index 100% rename from basewiki/ikiwiki.mdwn rename to base/ikiwiki.mdwn diff --git a/basewiki/ikiwiki/directive.mdwn b/base/ikiwiki/directive.mdwn similarity index 100% rename from basewiki/ikiwiki/directive.mdwn rename to base/ikiwiki/directive.mdwn diff --git a/basewiki/ikiwiki/formatting.mdwn b/base/ikiwiki/formatting.mdwn similarity index 100% rename from basewiki/ikiwiki/formatting.mdwn rename to base/ikiwiki/formatting.mdwn diff --git a/basewiki/ikiwiki/markdown.mdwn b/base/ikiwiki/markdown.mdwn similarity index 100% rename from basewiki/ikiwiki/markdown.mdwn rename to base/ikiwiki/markdown.mdwn diff --git a/basewiki/ikiwiki/openid.mdwn b/base/ikiwiki/openid.mdwn similarity index 100% rename from basewiki/ikiwiki/openid.mdwn rename to base/ikiwiki/openid.mdwn diff --git a/basewiki/ikiwiki/pagespec.mdwn b/base/ikiwiki/pagespec.mdwn similarity index 100% rename from basewiki/ikiwiki/pagespec.mdwn rename to base/ikiwiki/pagespec.mdwn diff --git a/basewiki/ikiwiki/pagespec/attachment.mdwn b/base/ikiwiki/pagespec/attachment.mdwn similarity index 100% rename from basewiki/ikiwiki/pagespec/attachment.mdwn rename to base/ikiwiki/pagespec/attachment.mdwn diff --git a/basewiki/ikiwiki/pagespec/po.mdwn b/base/ikiwiki/pagespec/po.mdwn similarity index 100% rename from basewiki/ikiwiki/pagespec/po.mdwn rename to base/ikiwiki/pagespec/po.mdwn diff --git a/basewiki/ikiwiki/pagespec/sorting.mdwn b/base/ikiwiki/pagespec/sorting.mdwn similarity index 100% rename from basewiki/ikiwiki/pagespec/sorting.mdwn rename to base/ikiwiki/pagespec/sorting.mdwn diff --git a/basewiki/ikiwiki/searching.mdwn b/base/ikiwiki/searching.mdwn similarity index 100% rename from basewiki/ikiwiki/searching.mdwn rename to base/ikiwiki/searching.mdwn diff --git a/basewiki/ikiwiki/subpage.mdwn b/base/ikiwiki/subpage.mdwn similarity index 100% rename from basewiki/ikiwiki/subpage.mdwn rename to base/ikiwiki/subpage.mdwn diff --git a/basewiki/ikiwiki/subpage/linkingrules.mdwn b/base/ikiwiki/subpage/linkingrules.mdwn similarity index 100% rename from basewiki/ikiwiki/subpage/linkingrules.mdwn rename to base/ikiwiki/subpage/linkingrules.mdwn diff --git a/basewiki/ikiwiki/wikilink.mdwn b/base/ikiwiki/wikilink.mdwn similarity index 100% rename from basewiki/ikiwiki/wikilink.mdwn rename to base/ikiwiki/wikilink.mdwn diff --git a/basewiki/index.mdwn b/base/index.mdwn similarity index 100% rename from basewiki/index.mdwn rename to base/index.mdwn diff --git a/base/js/mastodon.js b/base/js/mastodon.js new file mode 100644 index 0000000..532cab9 --- /dev/null +++ b/base/js/mastodon.js @@ -0,0 +1,55 @@ +function escapeHtml(unsafe) { + return unsafe + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +} + +document.getElementById("load-comment").addEventListener("click", function() { + document.getElementById("load-comment").innerHTML = "Loading..."; + fetch('https:///api/v1/statuses//context') + .then(function(response) { + return response.json(); + }) + .then(function(data) { + if(data['descendants'] && + Array.isArray(data['descendants']) && + data['descendants'].length > 0) { + document.getElementById('mastodon-comments-list').innerHTML = ""; + data['descendants'].forEach(function(reply) { + reply.account.display_name = escapeHtml(reply.account.display_name); + reply.account.emojis.forEach(emoji => { + reply.account.display_name = reply.account.display_name.replace(`:${emoji.shortcode}:`, + `Emoji ${emoji.shortcode}`); + }); + mastodonComment = + ``; + document.getElementById('mastodon-comments-list').appendChild(DOMPurify.sanitize(mastodonComment, {'RETURN_DOM_FRAGMENT': true})); + }); + } + else { + document.getElementById('mastodon-comments-list').innerHTML = "

Not comments found

"; + } + }); +}); + diff --git a/basewiki/recentchanges.fr.po b/base/recentchanges.fr.po similarity index 100% rename from basewiki/recentchanges.fr.po rename to base/recentchanges.fr.po diff --git a/basewiki/recentchanges.mdwn b/base/recentchanges.mdwn similarity index 100% rename from basewiki/recentchanges.mdwn rename to base/recentchanges.mdwn diff --git a/basewiki/sandbox.mdwn b/base/sandbox.mdwn similarity index 100% rename from basewiki/sandbox.mdwn rename to base/sandbox.mdwn diff --git a/basewiki/shortcuts.fr.po b/base/shortcuts.fr.po similarity index 100% rename from basewiki/shortcuts.fr.po rename to base/shortcuts.fr.po diff --git a/basewiki/shortcuts.mdwn b/base/shortcuts.mdwn similarity index 100% rename from basewiki/shortcuts.mdwn rename to base/shortcuts.mdwn diff --git a/basewiki/templates.mdwn b/base/templates.mdwn similarity index 100% rename from basewiki/templates.mdwn rename to base/templates.mdwn diff --git a/basewiki/templates/note.mdwn b/base/templates/note.mdwn similarity index 100% rename from basewiki/templates/note.mdwn rename to base/templates/note.mdwn diff --git a/basewiki/templates/popup.mdwn b/base/templates/popup.mdwn similarity index 100% rename from basewiki/templates/popup.mdwn rename to base/templates/popup.mdwn diff --git a/basewiki/wikiicons/diff.png b/base/wikiicons/diff.png similarity index 100% rename from basewiki/wikiicons/diff.png rename to base/wikiicons/diff.png diff --git a/basewiki/wikiicons/email.png b/base/wikiicons/email.png similarity index 100% rename from basewiki/wikiicons/email.png rename to base/wikiicons/email.png diff --git a/basewiki/wikiicons/languages.png b/base/wikiicons/languages.png similarity index 100% rename from basewiki/wikiicons/languages.png rename to base/wikiicons/languages.png diff --git a/basewiki/wikiicons/openidlogin-bg.gif b/base/wikiicons/openidlogin-bg.gif similarity index 100% rename from basewiki/wikiicons/openidlogin-bg.gif rename to base/wikiicons/openidlogin-bg.gif diff --git a/basewiki/wikiicons/revert.png b/base/wikiicons/revert.png similarity index 100% rename from basewiki/wikiicons/revert.png rename to base/wikiicons/revert.png diff --git a/basewiki/wikiicons/search-bg.gif b/base/wikiicons/search-bg.gif similarity index 100% rename from basewiki/wikiicons/search-bg.gif rename to base/wikiicons/search-bg.gif diff --git a/content/contact.pot b/content/contact.pot index 11aeed6..1a4bbc7 100644 --- a/content/contact.pot +++ b/content/contact.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-08-10 21:36-0400\n" +"POT-Creation-Date: 2024-09-11 14:32-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/content/footer.pot b/content/footer.pot index b7684be..4809da6 100644 --- a/content/footer.pot +++ b/content/footer.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-09-10 22:25-0400\n" +"POT-Creation-Date: 2024-09-11 14:32-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/content/index.pot b/content/index.pot index 327f990..a6be463 100644 --- a/content/index.pot +++ b/content/index.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-08-11 00:05-0400\n" +"POT-Creation-Date: 2024-09-11 14:32-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/content/sidebar.pot b/content/sidebar.pot index a0f47c5..2200388 100644 --- a/content/sidebar.pot +++ b/content/sidebar.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-09-10 22:25-0400\n" +"POT-Creation-Date: 2024-09-11 14:32-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/ikiwiki.setup b/ikiwiki.setup index 2061a35..b9b2db9 100644 --- a/ikiwiki.setup +++ b/ikiwiki.setup @@ -54,7 +54,7 @@ templatedir: ./templates #templatedir: /usr/share/ikiwiki/templates # base wiki source location #underlaydir: /usr/share/ikiwiki/basewiki -underlaydir: ./basewiki +underlaydir: ./base # display verbose messages? verbose: 1 # log to syslog? diff --git a/templates/page.tmpl b/templates/page.tmpl index d407937..79d74cd 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -1,249 +1,176 @@ - - - - - - - - - - - + + + + + + + + + + + - <TMPL_VAR TITLE> - <TMPL_VAR WIKINAME> + <TMPL_VAR TITLE> - <TMPL_VAR WIKINAME> - - - - - - - - + + + + + + + + - - + + - - - + + + - - + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - -
- - - - -
- Download -
-
- - - - - - - - -
- - - - - -
Comments on this page are closed.
-
-
-
-
- - - -
-

You can use your Mastodon account to reply to this post.

-

- - - -
-
- -
- Created . - - - Edited . - - Edited . - - -
- -
-
- -
-
- - - - - -
-
- - - - - - + + + + - + diff --git a/templates/trails.tmpl b/templates/trails.tmpl index ddc7598..caf36b7 100644 --- a/templates/trails.tmpl +++ b/templates/trails.tmpl @@ -1,29 +1,29 @@ - - - + + +