improve layout, version 32

This commit is contained in:
Konstantin 2024-04-09 09:36:18 +02:00
parent 0c61532746
commit 74e11d8992
5 changed files with 113 additions and 70 deletions

View file

@ -1,5 +1,5 @@
.PHONY: help build publish
VERSION = 1.0.31
VERSION = 1.0.32
help:
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@ -11,4 +11,4 @@ publish:
@docker push code.headbright.be/konstantin/iamkonstantin:$(VERSION)
bump:
@bash ./bump_version.sh
upgrade: bump build publish
upgrade: build publish

View file

@ -6,64 +6,64 @@
{% block content %}
<section class="py-24 sm:py-32 mx-4">
<div class="px-0 md:px-4 lg:px-8">
<div class="mx-auto max-w-2xl lg:max-w-4xl">
<h1 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ page.title }}</h1>
<div class="mt-2 text-lg leading-8">{{ page.intro|richtext }}</div>
<section class="px-1 md:px-4 lg:px-8">
<div class="mt-16 space-y-20 lg:mt-20 blog-pages">
{% for post in blogpages %}
{% with post=post.specific %}
<article class="relative isolate flex flex-col gap-8">
<div class="group relative w-full">
<h2 class="mt-3 font-semibold leading-6 group-hover:text-klavender border-klavender border-b-4">
<a href="{% pageurl post %}">
<span class="absolute inset-0"></span>
{{ post.title }}
</a>
</h2>
<p class="mt-5 leading-6">{{ post.intro }}</p>
</div>
{% if post.main_image %}
<div class="relative aspect-[16/9]">
{% with post.main_image as main_image %}
{% if main_image %}
{% image main_image width-1600 class="blog absolute inset-0 h-full w-full rounded-2xl bg-gray-50 object-cover" %}{% endif %}
{% endwith %}
<div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"></div>
</div>
{% endif %}
<div class="flex-col items-center text-xs">
<div class="space-x-2 text-left"><span class="emoji"
aria-hidden="true">🕘</span>
<time class="text-sm"
datetime="{{ post.date|date:"Y-m-d" }}">{{ post.date }}</time>
</div>
<div class="mx-auto max-w-2xl lg:max-w-4xl">
<h1 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ page.title }}</h1>
<div class="mt-2 text-lg leading-8">{{ page.intro|richtext }}</div>
{% with tags=post.tags.all %}
{% if tags %}
<div class="tags mt-2">
<h3 class="sr-only">Tags</h3>
<ul class="flex">
{% for tag in tags %}
<li class="lg:space-x-2"><span class="emoji">🏷️</span>
<a class="pr-2"
href="{% slugurl 'tags' %}?tag={{ tag }}">{{ tag }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="mt-16 space-y-20 lg:mt-20 blog-pages">
{% for post in blogpages %}
{% with post=post.specific %}
<article class="relative isolate flex flex-col gap-8">
<div class="group relative w-full">
<h2 class="mt-3 font-semibold leading-6 group-hover:text-klavender border-klavender border-b-4">
<a href="{% pageurl post %}">
<span class="absolute inset-0"></span>
{{ post.title }}
</a>
</h2>
<p class="mt-5 leading-6">{{ post.intro }}</p>
</div>
{% if post.main_image %}
<div class="relative aspect-[16/9]">
{% with post.main_image as main_image %}
{% if main_image %}
{% image main_image width-1600 class="blog absolute inset-0 h-full w-full rounded-2xl bg-gray-50 object-cover" %}{% endif %}
{% endwith %}
<div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"></div>
</div>
{% endif %}
<div class="flex-col items-center text-xs">
<div class="space-x-2 text-left"><span class="emoji"
aria-hidden="true">🕘</span>
<time class="text-sm"
datetime="{{ post.date|date:"Y-m-d" }}">{{ post.date }}</time>
</div>
</article>
{% endwith %}
{% endfor %}
</div>
{% with tags=post.tags.all %}
{% if tags %}
<div class="tags mt-2">
<h3 class="sr-only">Tags</h3>
<ul class="flex">
{% for tag in tags %}
<li class="lg:space-x-2"><span class="emoji">🏷️</span>
<a class="pr-2"
href="{% slugurl 'tags' %}?tag={{ tag }}">{{ tag }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endwith %}
</div>
</article>
{% endwith %}
{% endfor %}
</div>
</div>
</section>
{% endblock %}

View file

@ -6,7 +6,7 @@
{% block content %}
<section class="flex flex-col items-center justify-center h-full px-0 md:px-4 lg:px-8">
<article class="mb-16 px-0 md:px-4 lg:px-8">
<article class="mb-16 px-1 md:px-4 lg:px-8">
<h1>{{ page.title }}</h1>
{% with authors=page.authors.all %}
@ -37,7 +37,7 @@
{% endwith %}
<div class="blog-content w-full px-2 lg:px-4">
<div class="blog-content w-full">
<div class="my-6 text-lg font-medium">{{ page.intro }}</div>
{{ page.body }}

View file

@ -1,25 +1,68 @@
{% extends "base.html" %}
{% load wagtailcore_tags %}
{% load wagtailcore_tags wagtailimages_tags %}
{% block content %}
<section class="h-full px-0 md:px-4 lg:px-8">
<div class="mb-16 px-0 md:px-4 lg:px-8">
{% if request.GET.tag %}
<h1>Showing pages tagged "{{ request.GET.tag }}"</h1>
{% endif %}
<section class="px-1 md:px-4 lg:px-8">
<div class="mx-auto max-w-2xl lg:max-w-4xl">
<h1 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ request.GET.tag }}</h1>
<p class="mt-2 text-lg leading-8">{{ page.intro|richtext }}</p>
{% for blogpage in blogpages %}
<div class="mt-16 space-y-20 lg:mt-20 blog-pages">
{% for post in blogpages %}
{% with post=post.specific %}
<article class="relative isolate flex flex-col gap-8">
<div class="group relative w-full">
<h2 class="mt-3 font-semibold leading-6 group-hover:text-klavender border-klavender border-b-4">
<a href="{% pageurl post %}">
<span class="absolute inset-0"></span>
{{ post.title }}
</a>
</h2>
<p class="mt-5 leading-6">{{ post.intro }}</p>
</div>
{% if post.main_image %}
<div class="relative aspect-[16/9]">
{% with post.main_image as main_image %}
{% if main_image %}
{% image main_image width-1600 class="blog absolute inset-0 h-full w-full rounded-2xl bg-gray-50 object-cover" %}{% endif %}
{% endwith %}
<div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"></div>
</div>
{% endif %}
<div class="flex-col items-center text-xs">
<div class="space-x-2 text-left"><span class="emoji"
aria-hidden="true">🕘</span>
<time class="text-sm"
datetime="{{ post.date|date:"Y-m-d" }}">{{ post.date }}</time>
</div>
<p>
<strong><a href="{% pageurl blogpage %}">{{ blogpage.title }}</a></strong><br/>
<small>Revised: {{ blogpage.latest_revision_created_at }}</small><br/>
</p>
{% with tags=post.tags.all %}
{% if tags %}
<div class="tags mt-2">
<h3 class="sr-only">Tags</h3>
<ul class="flex">
{% for tag in tags %}
<li class="lg:space-x-2"><span class="emoji">🏷️</span>
<a class="pr-2"
href="{% slugurl 'tags' %}?tag={{ tag }}">{{ tag }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endwith %}
</div>
{% empty %}
No pages found with that tag.
{% endfor %}
</div>
</article>
{% endwith %}
{% empty %}
No pages found with that tag.
{% endfor %}
</div>
</div>
</section>
{% endblock %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB