add new templates

This commit is contained in:
slonkazoid 2025-01-29 16:35:18 +03:00
parent 5de6840532
commit 5c8aea9277
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM
6 changed files with 45 additions and 20 deletions

View file

@ -1,10 +1,10 @@
running
<a href="{{bingus_info.repository}}" target="_blank">{{bingus_info.name}}</a>
v{{bingus_info.version}}
{{#if rendered_in}}
{{#if perf}}
<b> - </b>
{{/if}}
{{#each rendered_in}}
{{#each perf}}
{{#if (eq @key "Rendered")}}
<span class="tooltipped" title="parsing metadata took {{duration this.parsed}}">parsed meta</span>
and

View file

@ -2,17 +2,17 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="{{title}}" />
<meta property="og:title" content="{{title}}" />
<meta property="og:description" content="{{description}}" />
<meta name="description" content="{{style.title}}" />
<meta property="og:title" content="{{style.title}}" />
<meta property="og:description" content="{{style.description}}" />
<meta name="keywords" content="{{joined_tags}}" />
{{#if (ne color null)}}
<meta name="theme-color" content="{{style.color}}" />
{{/if}}
<title>{{title}}</title>
<title>{{style.title}}</title>
<link rel="stylesheet" href="/static/style.css" />
{{#if rss}}
<link rel="alternate" type="application/rss+xml" title="{{title}}" href="/feed.xml" />
<link rel="alternate" type="application/rss+xml" title="{{style.title}}" href="/feed.xml" />
{{/if}}
{{#if js}}
<script src="/static/date.js" defer></script>
@ -20,7 +20,7 @@
<script src="/static/main.js" defer></script>
{{/if}}
</head>
<body>
<body class="cool">
<main>
{{>title}}
<h2>posts</h2>
@ -36,15 +36,7 @@
</form>
{{/if}}
<div id="posts">
{{#each posts}}
<div class="post">
<a href="/posts/{{name}}"><b>{{title}}</b></a>
<span class="post-author">- by {{author}}</span>
<br />
{{description}}<br />
{{>post_table post style=@root.style}}
</div>
{{else}} there are no posts right now. check back later! {{/each}}
{{>post_list}}
</div>
</div>

View file

@ -46,7 +46,7 @@
<a href="/">back to home</a>
</div>
<hr />
{{{rendered}}}
{{{body}}}
</main>
<footer>
{{>footer}}

10
templates/post_list.hbs Normal file
View file

@ -0,0 +1,10 @@
{{#each posts}}
<div class="post">
<section>
<a href="/posts/{{name}}"><b>{{title}}</b></a>
<span class="post-author">- by {{author}}</span>
</section>
<section role="paragraph">{{description}}</section>
{{>post_table post style=@root.style}}
</div>
{{else}} there are no posts right now. check back later! {{/each}}

23
templates/posts.hbs Normal file
View file

@ -0,0 +1,23 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{title}}</title>
<link rel="stylesheet" href="/static/style.css" />
{{#if rss}}
<link rel="alternate" type="application/rss+xml" title="{{title}}" href="/feed.xml" />
{{/if}}
{{#if js}}
<script src="/static/date.js" defer></script>
<script src="/static/sort.js" defer></script>
<script src="/static/main.js" defer></script>
{{/if}}
</head>
<body>
<main>
<div id="posts">
{{>post_list}}
</div>
</main>
</body>
</html>

View file

@ -1,2 +1,2 @@
<h1>{{title}}</h1>
<p>{{description}}</p>
<h1>{{style.title}}</h1>
<p>{{style.description}}</p>