Compare commits

...

6 commits

32 changed files with 26 additions and 13 deletions

3
.gitignore vendored
View file

@ -166,3 +166,6 @@ cython_debug/
#.idea/ #.idea/
.env.production .env.production
media/images/
media/original_images/

View file

@ -1,5 +1,5 @@
.PHONY: help build publish .PHONY: help build publish
VERSION = 1.5.0 VERSION = 1.7.0
help: 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}' @perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

View file

@ -1,3 +1,4 @@
from wagtail.api import APIField
from wagtail.blocks import ( from wagtail.blocks import (
CharBlock, CharBlock,
ChoiceBlock, ChoiceBlock,
@ -14,6 +15,13 @@ class ImageBlock(StructBlock):
caption = CharBlock(required=False) caption = CharBlock(required=False)
attribution = CharBlock(required=False) attribution = CharBlock(required=False)
api_fields = [
APIField('image'),
# Adds a URL to a rendered thumbnail of the image to the API
APIField('caption'),
APIField('attribution'),
]
class Meta: class Meta:
icon = "image" icon = "image"
template = "base/blocks/image_block.html" template = "base/blocks/image_block.html"

View file

@ -6,6 +6,7 @@ from modelcluster.fields import ParentalKey, ParentalManyToManyField
from modelcluster.contrib.taggit import ClusterTaggableManager from modelcluster.contrib.taggit import ClusterTaggableManager
from taggit.models import TaggedItemBase from taggit.models import TaggedItemBase
from wagtail.api import APIField from wagtail.api import APIField
from wagtail.images.api.fields import ImageRenditionField
from wagtail.models import Page, Orderable from wagtail.models import Page, Orderable
from wagtail.fields import RichTextField, StreamField from wagtail.fields import RichTextField, StreamField
@ -78,6 +79,7 @@ class BlogPage(SeoMixin, Page):
# Export fields over the API # Export fields over the API
api_fields = [ api_fields = [
APIField('gallery_images'), APIField('gallery_images'),
# Adds a URL to a rendered thumbnail of the image to the API
APIField('body'), APIField('body'),
APIField('intro'), APIField('intro'),
APIField('tags'), APIField('tags'),

View file

@ -9,13 +9,13 @@
> >
<figure class="w-1/2" style="min-width: 24rem"> <figure class="w-1/2" style="min-width: 24rem">
<figcaption class="sr-only"> <figcaption class="sr-only">
Drawing of my computer desk where we see a computer with an open Terminal Hero image
</figcaption>
<img src="/static/images/my-office.png" alt="Drawing of my computer desk where we see a computer with an open Terminal
with Elixir code snippets. On the shelf behind we can see programming with Elixir code snippets. On the shelf behind we can see programming
books for Rust, Elixir and JavaScript. The books are arranges vertically books for Rust, Elixir and JavaScript. The books are arranges vertically
next to a small flower pot. The flower has big green leaves. A cup of next to a small flower pot. The flower has big green leaves. A cup of
steaming coffee sits on the desk, to the left of the computer. The cup has a Python logo on it. steaming coffee sits on the desk, to the left of the computer. The cup has a Python logo on it." />
</figcaption>
<img src="/static/images/my-office.png" />
</figure> </figure>
<section class="w-100 text-lg dark:text-white mx-2"> <section class="w-100 text-lg dark:text-white mx-2">
<h1 <h1
@ -25,8 +25,8 @@
><img ><img
width="48px" width="48px"
height="48px" height="48px"
src="static/images/waving-hand-sign_1f44b.png" /></span alt="waving hand emoji"
>Hi! I'm Konstantin src="static/images/waving-hand-sign_1f44b.png" /></span>Hi! I'm Konstantin
</h1> </h1>
</section> </section>
@ -50,7 +50,7 @@
<ul class="mx-auto mt-8 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-3"> <ul class="mx-auto mt-8 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-3">
{% for post in recent_blog_items %} {% for post in recent_blog_items %}
{% with post=post.specific %} {% with post=post.specific %}
<article class="flex flex-col items-center justify-start max-w-xl"> <li class="flex flex-col items-center justify-start max-w-xl">
<div class="group relative w-full"> <div class="group relative w-full">
<h3 class=""> <h3 class="">
<a href="{% pageurl post %}"> <a href="{% pageurl post %}">
@ -69,7 +69,7 @@
<div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"></div> <div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"></div>
</div> </div>
{% endif %} {% endif %}
</article> </li>
{% endwith %} {% endwith %}
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -152,7 +152,7 @@ WAGTAIL_CONTENT_LANGUAGES = LANGUAGES = [
('nl', "Dutch"), ('nl', "Dutch"),
] ]
WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE = True WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE = False
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/ # https://docs.djangoproject.com/en/5.0/howto/static-files/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -1,4 +1,4 @@
<div class="py-16 sm:py-24 lg:py-32"> <div class="py-16 sm:py-24 lg:py-32">
<iframe data-w-type="embedded" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://sgx7y.mjt.lu/wgt/sgx7y/xtn1/form?c=c9b8015e" width="100%" style="height: 0;"></iframe> <iframe data-w-type="embedded" title="Newsletter" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://sgx7y.mjt.lu/wgt/sgx7y/xtn1/form?c=c9b8015e" width="100%" style="height: 0;"></iframe>
<script type="text/javascript" src="https://app.mailjet.com/pas-nc-embedded-v1.js"></script> <script type="text/javascript" src="https://app.mailjet.com/pas-nc-embedded-v1.js"></script>
</div> </div>

View file

@ -3,6 +3,6 @@ wagtail>=6.3.1,<6.4
whitenoise>=6.6,<7.0 whitenoise>=6.6,<7.0
wagtailcodeblock>=1.29.0.2,<2.0 wagtailcodeblock>=1.29.0.2,<2.0
django-tailwind>=3.6.0 django-tailwind>=3.6.0
django-browser-reload>=1.12 django-browser-reload>=1.17
Wand==0.6.13 Wand==0.6.13
wagtail-seo==2.5.0 wagtail-seo==2.5.0