You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
{{define "content"}} |
|
<article class="wiki-page"> |
|
<header class="page-header"> |
|
<h1><span class="icon-inline">{{icon "file-text"}}</span> {{.Title}}</h1> |
|
{{if .Summary}}<p class="page-summary">{{.Summary}}</p>{{end}} |
|
</header> |
|
|
|
{{if .TableOfContents}} |
|
<aside class="table-of-contents"> |
|
<h2><span class="icon-inline">{{icon "list"}}</span> Table of Contents</h2> |
|
{{.TableOfContents}} |
|
</aside> |
|
{{end}} |
|
|
|
<div class="page-content"> |
|
{{.Content}} |
|
</div> |
|
</article> |
|
|
|
<script> |
|
// Handle hash-based wiki URLs: convert /wiki#kind:pubkey:dtag to /wiki?ref=kind:pubkey:dtag |
|
(function() { |
|
if (window.location.pathname === '/wiki' || window.location.pathname === '/wiki/') { |
|
const hash = window.location.hash.substring(1); // Remove the '#' |
|
if (hash && /^\d+:[a-fA-F0-9]+:[^:]+$/.test(hash)) { |
|
// Hash matches format: kind:pubkey:dtag |
|
// Convert to query parameter and reload |
|
const newUrl = window.location.pathname + '?ref=' + encodeURIComponent(hash); |
|
window.location.replace(newUrl); |
|
} |
|
} |
|
})(); |
|
</script> |
|
{{end}} |
|
|
|
{{/* Feed is defined in components.html */}}
|
|
|