swap to tera in place of handlebars

This commit is contained in:
zyl 2024-11-04 17:09:11 -08:00
parent 76c75a40d9
commit ee48eae327
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
25 changed files with 407 additions and 184 deletions

View file

@ -1,3 +1,7 @@
{% macro badge(badge, url, alt) %}
<a href="{{url}}"><img src="/badges/{{badge}}" alt="{{alt}}"></a>
{% endmacro badge %}
<!DOCTYPE html>
<html lang="en">
@ -5,15 +9,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="no-referrer">
<link rel="stylesheet" href="/styles/index.css">
<title>{{title}}</title>
<title>{{ title }}</title>
<script type="text/javascript" src="/js/pet-me.js" defer></script>
{{{head}}}
{{#each scripts}}
<script type="text/javascript" src="{{this}}" defer></script>
{{/each}}
{{#each styles}}
<link rel="stylesheet" href="/styles/{{this}}">
{{/each}}
{{ head | safe }}
{% for script in scripts %}
<script type="text/javascript" src="{{script}}" defer></script>
{% endfor %}
{% for style in styles %}
<link rel="stylesheet" href="/styles/{{style}}">
{% endfor %}
</head>
<body>
@ -32,7 +36,7 @@
</header>
<div id="content">
<main class="page">
{{{page}}}
{% block content %}{{ page | safe }}{% endblock content %}
</main>
</div>
@ -42,10 +46,7 @@
bark bark awruff :3
<div class="badges">
{{#*inline "badge"}}
<a href="{{url}}"><img src="/badges/{{badge}}" alt="{{alt}}"></a>
{{/inline}}
{{> badge badge="transbian.png" url="https://badge.les.bi" alt="transgender and lesbian flags"}}
{{ self::badge(badge="transbian.png", url="https://badge.les.bi", alt="transgender and lesbian flags") }}
</div>
</footer>

View file

@ -1,8 +0,0 @@
<h1>{{title}}</h1>
<div class="link-list">
<ul>
{{#each links}}
<li><a href="{{this.link}}">{{this.title}}</a></li>
{{/each}}
</ul>
</div>

View file

@ -0,0 +1,8 @@
<h1>{{ title }}</h1>
<div class="link-list">
<ul>
{% for link in links %}
<li><a href="{{link.link}}">{{link.title}}</a></li>
{% endfor %}
</ul>
</div>

View file

@ -1,24 +1,24 @@
{{#if tag}}
{% if tag %}
<h1>blog posts tagged {{tag}}</h1>
<p><a href="/blog/">View all blog posts</a></p>
{{else}}
{% else %}
<h1>blog Posts</h1>
<p><a href="tags">view blog tags</a></p>
<p><a href="rss.xml">rss feed</a></p>
{{/if}}
{% endif %}
<h1>Page {{page}}/{{page_max}}</h1>
{{#if previous}}
{% if previous %}
<a href="./{{previous}}">previous page</a>
{{/if}}
{{#if next}}
{% endif %}
{% if next %}
<a href="./{{next}}">next page</a>
{{/if}}
{% endif %}
<div class="blog-post-list">
{{#each resources}}
{% for resource in resources %}
<div class="post">
<p class="title"><a href="/blog/{{id}}">{{title}}</a></p>
<p class="timestamp">{{timestamp}}</p>
<p class="short-desc">{{desc}}</p>
<p class="title"><a href="/blog/{{resource.id}}">{{resource.title}}</a></p>
<p class="timestamp">{{resource.timestamp}}</p>
<p class="short-desc">{{resource.desc}}</p>
</div>
{{/each}}
{% endfor %}
</div>

View file

@ -1,22 +1,22 @@
<div class="blog-post">
<h1 class="title">{{title}}</h1>
<span class="timestamp">published {{timestamp}}</span>
{{#if draft}}
{% if draft %}
<h2>DRAFT</h2>
{{/if}}
{% endif %}
<div class="header-image-wrapper">
<p class="short-desc">{{desc}}</p>
<img class="header-image" src="{{cdn_file}}" alt="{{header_image_alt}}"
style="object-fit: cover; object-position: 50% 50%">
</div>
<div class="content">
{{{content}}}
{{ content | safe }}
</div>
<hr />
<h3 class="tags-title">tags</h3>
<div class="post-tags">
{{#each tags}}
<a class="tag" href="/blog/tag/{{this}}">{{this}}</a>{{#unless @last}},{{/unless}}
{{/each}}
{% for tag in tags %}
<a class="tag" href="/blog/tag/{{tag}}">{{tag}}</a>{% if not loop.last %},{% endif %}
{% endfor %}
</div>
</div>

View file

@ -1,30 +0,0 @@
<div id="click">
<p>WARNING: no save mechanic is implemented yet!!</p>
<h1>click</h1>
<noscript>
<h1>javascript is required for the clicker game!!</h1>
</noscript>
<div class="resources">
{{#*inline "resource"}}
<span class="resource">{{name}}</span><span id={{id}}>0</span> <span>(<span
id="{{id}}-per-second">0</span>/s)</span>
{{/inline}}
{{> resource id="pets" name="pets"}}
{{> resource id="barks" name="barks"}}
{{> resource id="kisses" name="kisses"}}
</div>
<button id="barker">bark</button>
<div class="tools">
{{#*inline "tool"}}
<div class="tool" data-tool={{id}}>
<p class="name">{{name}} (<span class="count">0</span>, lvl <span class="level">1</span>)</p>
<p class="description">{{description}}</p>
<button class="buy">buy</button> <button class="upgrade">upgrade</button>
</div>
{{/inline}}
{{> tool id="hand" name="hand" description="don't bite the hand that pets you"}}
{{> tool id="puppy" name="puppy" description="arf arf wruff :3"}}
{{> tool id="foodBowl" name="food bowl" description="more food for more barking"}}
{{> tool id="kisser" name="kisser wow" description="someone to kiss all those poor puppies,,"}}
</div>
</div>

View file

@ -0,0 +1,31 @@
{% macro resource(id, name) %}
<span class="resource">{{name}}</span><span id={{id}}>0</span> <span>(<span id="{{id}}-per-second">0</span>/s)</span>
{% endmacro resource %}
{% macro tool(id, name, description) %}
<div class="tool" data-tool={{id}}>
<p class="name">{{name}} (<span class="count">0</span>, lvl <span class="level">1</span>)</p>
<p class="description">{{description}}</p>
<button class="buy">buy</button> <button class="upgrade">upgrade</button>
</div>
{% endmacro tool %}
<div id="click">
<p>WARNING: no save mechanic is implemented yet!!</p>
<h1>click</h1>
<noscript>
<h1>javascript is required for the clicker game!!</h1>
</noscript>
<div class="resources">
{{ self::resource(id="pets", name="pets") }}
{{ self::resource(id="barks", name="barks") }}
{{ self::resource(id="kisses", name="kisses") }}
</div>
<button id="barker">bark</button>
<div class="tools">
{{ self::tool(id="hand", name="hand", description="don't bite the hand that pets you") }}
{{ self::tool(id="puppy", name="puppy", description="arf arf wruff :3") }}
{{ self::tool(id="foodBowl", name="food bowl", description="more food for more barking") }}
{{ self::tool(id="kisser", name="kisser wow", description="someone to kiss all those poor puppies,,") }}
</div>
</div>

View file

@ -1,13 +0,0 @@
<hr />
<div class="index-info">
<h3>most recent blog posts</h3>
<div class="blog-post-list">
{{#each resources}}
<div class="post">
<p class="title"><a href="/blog/{{id}}">{{title}}</a></p>
<p class="timestamp">{{timestamp}}</p>
<p class="short-desc">{{desc}}</p>
</div>
{{/each}}
</div>
</div>

View file

@ -0,0 +1,13 @@
<hr />
<div class="index-info">
<h3>most recent blog posts</h3>
<div class="blog-post-list">
{% for resource in resources %}
<div class="post">
<p class="title"><a href="/blog/{{resource.id}}">{{resource.title}}</a></p>
<p class="timestamp">{{resource.timestamp}}</p>
<p class="short-desc">{{resource.desc}}</p>
</div>
{% endfor %}
</div>
</div>

View file

@ -2,12 +2,12 @@
<h1 class="title">{{title}}</h1>
<span class="timestamp">published {{timestamp}}</span>
<img class="image-actual" src="{{cdn_file}}" alt="{{alt}}">
{{{content}}}
{{ content | safe }}
<p><a href="{{cdn_file}}">view full size image</a></p>
<h3 class="tags-title">tags</h3>
<div class="image-tags">
{{#each tags}}
<a class="tag" href="/i/tag/{{this}}/">{{this}}</a>{{#unless @last}},{{/unless}}
{{/each}}
{% for tag in tags %}
<a class="tag" href="/i/tag/{{tag}}/">{{tag}}</a>{% if not loop.last %},{% endif %}
{% endfor %}
</div>
</div>

View file

@ -1,23 +1,23 @@
{{#if tag}}
{% if tag %}
<h1>images tagged {{tag}}</h1>
<p><a href="/images/">view all images</a></p>
{{else}}
{% else %}
<h1>images</h1>
<p><a href="/i/tags">view image tags</a></p>
<p><a href="rss.xml">rss feed</a></p>
{{/if}}
{% endif %}
<h3>page {{page}}/{{page_max}}</h3>
{{#if previous}}
{% if previous %}
<a href="./{{previous}}">previous page</a>
{{/if}}
{{#if next}}
{% endif %}
{% if next %}
<a href="./{{next}}">next page</a>
{{/if}}
{% endif %}
<div class="images-list">
{{#each resources}}
<a class="image" href="/i/{{id}}">
<img class="image-actual" src="{{cdn_file}}" alt="{{alt}}">
<span class="title">{{title}}</span>
{% for resource in resources %}
<a class="image" href="/i/{{resource.id}}">
<img class="image-actual" src="{{resource.cdn_file}}" alt="{{resource.alt}}">
<span class="title">{{resource.title}}</span>
</a>
{{/each}}
{% endfor %}
</div>

View file

@ -1 +0,0 @@
<div>{{{source}}}</div>

View file

@ -0,0 +1 @@
<div>{{ desc | safe }}</div>

View file

@ -1 +0,0 @@
<img src="{{src}}" alt="{{alt}}">

View file

@ -0,0 +1 @@
<img src="{{cdn_file}}" alt="{{alt}}">