minor layout fixes

This commit is contained in:
Konstantin 2024-03-19 21:39:18 +01:00
parent 30e8f29d1f
commit 44969cf4dd
8 changed files with 115 additions and 91 deletions

View file

@ -7,7 +7,7 @@
{% block content %}
<section class="py-24 sm:py-32 mx-4">
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<div class="mx-auto max-w-7xl px-0 md:px-4 lg:px-8">
<div class="mx-auto max-w-2xl lg:max-w-4xl">
<h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ page.title }}</h2>
<div class="mt-2 text-lg leading-8">{{ page.intro|richtext }}</div>
@ -16,7 +16,7 @@
{% for post in blogpages %}
{% with post=post.specific %}
<article class="relative isolate flex flex-col gap-8 lg:flex-row">
<div class="relative aspect-[16/9] sm:aspect-[2/1] lg:aspect-square lg:w-64 lg:shrink-0">
<div class="relative aspect-[16/9] lg:w-64 lg:shrink-0">
{% with post.main_image as main_image %}
{% if main_image %}
{% image main_image width-400 class="blog absolute inset-0 h-full w-full rounded-2xl bg-gray-50 object-cover" %}{% endif %}
@ -43,7 +43,7 @@
{% endwith %}
</div>
<div class="group relative max-w-xl">
<h3 class="mt-3 text-lg font-semibold leading-6 group-hover:text-gray-600">
<h3 class="mt-3 text-lg font-semibold leading-6 group-hover:text-klavender">
<a href="{% pageurl post %}">
<span class="absolute inset-0"></span>
{{ post.title }}

View file

@ -5,14 +5,14 @@
{% block body_class %}template-blogpage{% endblock %}
{% block content %}
<section class="flex flex-col items-center justify-center h-full mx-4">
<article class="mb-16">
<section class="flex flex-col items-center justify-center h-full max-w-7xl px-0 md:px-4 lg:px-8">
<article class="mb-16 px-2 lg:px-4">
<h1>{{ page.title }}</h1>
<p class="meta">{{ page.date }}</p>
{% with authors=page.authors.all %}
{% if authors %}
<h3>Posted by:</h3>
<h3 class="sr-only">Posted by:</h3>
<ul>
{% for author in authors %}
<li style="display: inline">
@ -22,7 +22,7 @@
{% image author.author_image fill-64x64 class="inline-block h-14 w-14 rounded-full" %}
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-700 group-hover:text-gray-900"> {{ author.name }}</p>
<p class="text-sm font-medium"> {{ author.name }}</p>
</div>
</div>
</div>
@ -32,7 +32,7 @@
{% endif %}
{% endwith %}
<div class="intro">{{ page.intro }}</div>
<div class="intro mt-6">{{ page.intro }}</div>
<div class="blog-content">
{{ page.body }}
@ -62,7 +62,7 @@
</article>
<nav class="w-full">
<nav class="w-full px-2 lg:px-4">
<a href="{{ page.get_parent.url }}" class="font-bold">Return to blog</a>
</nav>

View file

@ -3,19 +3,23 @@
{% block content %}
{% if request.GET.tag %}
<h4>Showing pages tagged "{{ request.GET.tag }}"</h4>
{% endif %}
<section class="py-24 sm:py-32 mx-4">
<div class="mx-auto max-w-7xl px-0 md:px-4 lg:px-8">
{% if request.GET.tag %}
<h1>Showing pages tagged "{{ request.GET.tag }}"</h1>
{% endif %}
{% for blogpage in blogpages %}
{% for blogpage in blogpages %}
<p>
<strong><a href="{% pageurl blogpage %}">{{ blogpage.title }}</a></strong><br />
<small>Revised: {{ blogpage.latest_revision_created_at }}</small><br />
</p>
<p>
<strong><a href="{% pageurl blogpage %}">{{ blogpage.title }}</a></strong><br/>
<small>Revised: {{ blogpage.latest_revision_created_at }}</small><br/>
</p>
{% empty %}
No pages found with that tag.
{% endfor %}
{% empty %}
No pages found with that tag.
{% endfor %}
</div>
</section>
{% endblock %}