mirror of
https://github.com/zyllian/zyllian.github.io.git
synced 2025-05-09 18:16:43 -07:00
swap to tera in place of handlebars
This commit is contained in:
parent
76c75a40d9
commit
ee48eae327
25 changed files with 407 additions and 184 deletions
|
@ -9,9 +9,9 @@ resources:
|
|||
source_path: blog
|
||||
output_path_short: blog
|
||||
output_path_long: blog
|
||||
resource_template: blog-post
|
||||
resource_list_template: blog-list
|
||||
rss_template: rss/blog-post
|
||||
resource_template: blog-post.tera
|
||||
resource_list_template: blog-list.tera
|
||||
rss_template: rss/blog-post.tera
|
||||
rss_title: zyl's blog
|
||||
rss_description: feed of recent blog posts on zyl's website.
|
||||
list_title: blog
|
||||
|
@ -22,9 +22,9 @@ resources:
|
|||
source_path: images
|
||||
output_path_short: i
|
||||
output_path_long: images
|
||||
resource_template: image
|
||||
resource_list_template: images
|
||||
rss_template: rss/image
|
||||
resource_template: image.tera
|
||||
resource_list_template: images.tera
|
||||
rss_template: rss/image.tera
|
||||
rss_title: zyl's images
|
||||
rss_description: feed of newly uploaded images from zyl's website.
|
||||
list_title: images
|
||||
|
|
|
@ -8,5 +8,5 @@ embed:
|
|||
description: click click click
|
||||
extra:
|
||||
name: basic
|
||||
template: extras/click
|
||||
template: extras/click.tera
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
extra:
|
||||
name: resource-list-outside
|
||||
template: extras/index-injection
|
||||
template: extras/index-injection.tera
|
||||
resource: blog
|
||||
count: 3
|
||||
---
|
||||
|
|
|
@ -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>
|
||||
|
|
@ -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>
|
8
site/templates/basic-link-list.tera
Normal file
8
site/templates/basic-link-list.tera
Normal 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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
31
site/templates/extras/click.tera
Normal file
31
site/templates/extras/click.tera
Normal 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>
|
|
@ -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>
|
13
site/templates/extras/index-injection.tera
Normal file
13
site/templates/extras/index-injection.tera
Normal 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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -1 +0,0 @@
|
|||
<div>{{{source}}}</div>
|
1
site/templates/rss/blog-post.tera
Normal file
1
site/templates/rss/blog-post.tera
Normal file
|
@ -0,0 +1 @@
|
|||
<div>{{ desc | safe }}</div>
|
|
@ -1 +0,0 @@
|
|||
<img src="{{src}}" alt="{{alt}}">
|
1
site/templates/rss/image.tera
Normal file
1
site/templates/rss/image.tera
Normal file
|
@ -0,0 +1 @@
|
|||
<img src="{{cdn_file}}" alt="{{alt}}">
|
Loading…
Add table
Add a link
Reference in a new issue