try harder
This commit is contained in:
@@ -133,11 +133,11 @@ const pageTpl = `<!DOCTYPE html>
|
||||
<div style="display:flex; gap:14px; align-items:center;">
|
||||
<div class="logo-mark"><a href="/blog/">CS</a></div>
|
||||
<nav>
|
||||
<a href="/">Home</a>
|
||||
<a href="/blog/">Blog</a>
|
||||
<a href="/" hx-get="/" hx-target="main" hx-push-url="true">Home</a>
|
||||
<a href="/blog/" hx-get="/blog/" hx-target="main" hx-push-url="true">Blog</a>
|
||||
</nav>
|
||||
</div>
|
||||
<a href="/blog/feed.xml" style="margin-left:auto; font-size:13px; text-transform:uppercase; letter-spacing:0.1em; color:var(--text-dim); text-decoration:none;">RSS</a>
|
||||
<a href="/blog/feed.xml" style="margin-left:auto; font-size:13px; text-transform:uppercase; letter-spacing:0.1em; color:var(--text-dim); text-decoration:none;" hx-boost="false">RSS</a>
|
||||
</header>
|
||||
<main>
|
||||
{{if .Post.HTML}}
|
||||
@@ -152,7 +152,7 @@ const pageTpl = `<!DOCTYPE html>
|
||||
<ul class="post-list">
|
||||
{{range .Posts}}
|
||||
<li>
|
||||
<a href="/blog/posts/{{.Slug}}">{{.Title}}</a>
|
||||
<a href="/blog/posts/{{.Slug}}" hx-get="/blog/posts/{{.Slug}}" hx-target="main" hx-push-url="true">{{.Title}}</a>
|
||||
<span class="post-date-inline">{{.Date.Format "Jan 2, 2006"}}</span>
|
||||
</li>
|
||||
{{end}}
|
||||
@@ -167,7 +167,11 @@ const pageTpl = `<!DOCTYPE html>
|
||||
<span>Chaosmith Systems</span>
|
||||
</footer>
|
||||
</div>
|
||||
<script>window.addEventListener('DOMContentLoaded',()=>hljs.highlightAll());</script>
|
||||
<script>
|
||||
function initPage(){hljs.highlightAll();}
|
||||
window.addEventListener('DOMContentLoaded',initPage);
|
||||
document.body.addEventListener('htmx:afterSwap',initPage);
|
||||
</script>
|
||||
</body>
|
||||
</html>`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user