Initial commit
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-01-05 18:10:44 +01:00
commit caef031d48
35 changed files with 2049 additions and 0 deletions

49
templates/base.html Normal file
View File

@@ -0,0 +1,49 @@
<!doctype html>
<html lang="en-gb">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ get_url(path="css/index.css") }}" rel="stylesheet" integrity="sha384-{{ get_hash(path="css/index.css", sha_type=384, base64=true) | safe }}" />
{% block rss %}
<link rel="alternate" type="application/rss+xml" title="blog.polynom.me Atom feed" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
{% endblock %}
{% if page %}
<meta property="og:description" content="{{ page.description }}" />
<meta property="og:title" content="{{ page.title }}" />
<title>{{ page.title }}</title>
{% else %}
<meta property="og:description" content="{{ config.description }}" />
<meta property="og:title" content="{{ config.title }}" />
<title>{{ config.title }}</title>
{% endif %}
{% if page %}
{% if page.extra.mathjax %}
<script type='text/javascript' async src='{{ get_url(path="js/MathJax/MathJax.js") }}?config=TeX-AMS_CHTML' integrity="sha384-{{ get_hash(path="js/MathJax/MathJax.js", sha_type=384, base64=true) | safe }}"></script>
<script type='text/x-mathjax-config'>MathJax.Hub.Config({'CommonHTML': {scale: 100}, tex2jax: {inlineMath: [['$','$']]}});</script>
{% endif %}
{% endif %}
</head>
<body>
<div class="flex flex-col p-2 md:p-8 items-start md:w-4/5 mx-auto">
<!-- Header -->
<div class="flex flex-row self-center">
<img class="w-12 h-12 md:w-24 md:h-24 rounded-lg" src="{{ get_url(path="img/avatar.jpg") }}" integrity="sha384-{{ get_hash(path="img/avatar.jpg", sha_type=384, base64=true) | safe }}" alt="Profile picture"/>
<div class="ml-4 self-center">
<a class="self-center text-2xl font-bold" href="/">PapaTutuWawa's Blog</a>
<ul class="list-none">
<li class="inline mr-8"><a href="/">Posts</a></li>
<li class="inline mr-8"><a href="{{ get_url(path="atom.xml", trailing_slash=false) }}">RSS</a></li>
<li class="inline mr-8"><a href="https://polynom.me">About</a></li>
</ul>
</div>
</div>
{% block content %}{% endblock %}
</div>
</body>
</html>

19
templates/index.html Normal file
View File

@@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block content %}
<!-- Container for posts -->
<div class="mx-auto">
{% for page in section.pages %}
<!-- Post item -->
<div class="flex flex-col pt-4">
<a href="{{ page.permalink | safe }}"><h1 class="text-indigo-400 prose prose-lg text-xl">{{ page.title }}</h1></a>
<span class="text-md mt-2">Posted on {{ page.date }}</span>
<!-- Blurp -->
<span class="prose text-white mt-4">
{{ page.summary | safe }}
</span>
</div>
{% endfor %}
</div>
{% endblock content %}

30
templates/post.html Normal file
View File

@@ -0,0 +1,30 @@
{% extends "base.html" %}
{% block content %}
<!-- Container for posts -->
<div class="mx-auto mt-4 w-full md:max-w-prose">
<h1 class="text-indigo-400 text-3xl">{{ page.title }}</h1>
<span class="text-md mt-2">Posted on {{ page.date }}</span>
{% if page.extra.mathjax %}
<div class="mt-6">
<div class="prose lg:prose-lg text-md text-white">NOTE: This post uses the JavaScript library MathJax to render math equations</div>
</div>
{% endif %}
<!-- Actual article -->
<article class="prose lg:prose-lg text-white mt-4">
{{ page.content | safe }}
</article>
<!-- Common post footer -->
<div class="mt-6">
<span class="prose lg:prose-lg text-md text-white">
If you have any questions or comments, then feel free to send me an email (Preferably with GPG encryption)
to {{ config.extra.email.user }} [at] {{ config.extra.email.domain }} or reach out to me on the Fediverse at <a href="https://{{ config.extra.fedi.url }}">{{ config.extra.fedi.handle }}</a>.
</span>
</div>
</div>
{% endblock content %}