From 666fe03f2d2a1d7e2790ce00ba1a78888b71cfa8 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 16 Dec 2024 11:45:40 +0100 Subject: [PATCH 01/18] chore: update Django --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2f1f0bf..58e901a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django>=4.2,<5.2 +Django>=5.1.4,<5.2 wagtail>=6.3.1,<6.4 whitenoise>=6.6,<7.0 wagtailcodeblock>=1.29.0.2,<2.0 From e9e5e7d30b3098f84759d857655b6ecb5670a796 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 16 Dec 2024 12:00:33 +0100 Subject: [PATCH 02/18] feat: portfolio styles --- home/templates/home/home_page.html | 2 +- portfolio/templates/portfolio/portfolio_page.html | 12 +++++++++--- theme/static_src/src/styles.css | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/home/templates/home/home_page.html b/home/templates/home/home_page.html index fb01ee1..e5eb500 100644 --- a/home/templates/home/home_page.html +++ b/home/templates/home/home_page.html @@ -58,7 +58,7 @@ {{ post.title }} -

{{ post.intro }}

+

{{ post.intro }}

{% if post.main_image %}
diff --git a/portfolio/templates/portfolio/portfolio_page.html b/portfolio/templates/portfolio/portfolio_page.html index 8e395fe..2e3a8a5 100644 --- a/portfolio/templates/portfolio/portfolio_page.html +++ b/portfolio/templates/portfolio/portfolio_page.html @@ -4,8 +4,14 @@ {% block body_class %}template-portfolio{% endblock %} -{% block content %} -

{{ page.title }}

- {{ page.body }} +{% block content %} +
+
+

{{ page.title }}

+
+ {{ page.body }} +
+
+
{% endblock %} \ No newline at end of file diff --git a/theme/static_src/src/styles.css b/theme/static_src/src/styles.css index 3a2011b..ec1481d 100644 --- a/theme/static_src/src/styles.css +++ b/theme/static_src/src/styles.css @@ -45,7 +45,7 @@ } h3 { - @apply mt-12 mb-2 text-xl sm:text-2xl lg:text-2xl leading-none font-extrabold tracking-tight text-black dark:text-white; + @apply mt-10 mb-3 text-xl sm:text-2xl lg:text-2xl leading-none font-extrabold tracking-tight text-black dark:text-white; } h4 { @@ -56,6 +56,10 @@ @apply my-2 mb-3 text-lg leading-relaxed; } + li { + @apply my-2 text-lg; + } + .blog-content ul, .home-content ul { @apply list-none list-inside; } From 3659cf902a355ef1c2e34f762a6c8bf3bea75096 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 16 Dec 2024 12:01:26 +0100 Subject: [PATCH 03/18] chore: bump version, 1.8.0 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf0f14d..f66e454 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help build publish -VERSION = 1.7.0 +VERSION = 1.8.0 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}' From 21121e77ad92079f151654a5c156c73efd269bd7 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 16 Dec 2024 12:06:21 +0100 Subject: [PATCH 04/18] fix: height --- Makefile | 2 +- home/templates/home/home_page.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f66e454..429ff9c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help build publish -VERSION = 1.8.0 +VERSION = 1.8.1 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}' diff --git a/home/templates/home/home_page.html b/home/templates/home/home_page.html index e5eb500..8259f41 100644 --- a/home/templates/home/home_page.html +++ b/home/templates/home/home_page.html @@ -58,8 +58,9 @@ {{ post.title }} -

{{ post.intro }}

+

{{ post.intro }}

+ {% if post.main_image %}
{% with post.main_image as main_image %} From f8f7021198756a66122baf15c4083e0a42f4bfd5 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Thu, 13 Feb 2025 10:39:17 +0100 Subject: [PATCH 05/18] add newsletter anchor --- .idea/iamkonstantin-web.iml | 2 +- .idea/misc.xml | 2 +- .tool-versions | 1 + home/templates/home/home_page.html | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .tool-versions diff --git a/.idea/iamkonstantin-web.iml b/.idea/iamkonstantin-web.iml index 79d7ae9..2d23290 100644 --- a/.idea/iamkonstantin-web.iml +++ b/.idea/iamkonstantin-web.iml @@ -17,7 +17,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index 6de942c..2a30ec5 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..ecefe3a --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +python 3.12.8 diff --git a/home/templates/home/home_page.html b/home/templates/home/home_page.html index 8259f41..7682e19 100644 --- a/home/templates/home/home_page.html +++ b/home/templates/home/home_page.html @@ -82,7 +82,9 @@
-
+
+

Newsletter

{% include 'newsletter/snippets/signup_form.html' %}
+ {% endblock content %} \ No newline at end of file From 41508948c6dcced891b864ae301f244f5dc53514 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Thu, 13 Feb 2025 10:41:17 +0100 Subject: [PATCH 06/18] upgrade wagtail --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 58e901a..eb7da49 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Django>=5.1.4,<5.2 -wagtail>=6.3.1,<6.4 +wagtail>=6.4,<6.5 whitenoise>=6.6,<7.0 wagtailcodeblock>=1.29.0.2,<2.0 django-tailwind>=3.6.0 From e7cab9534eada970cf4202370a8d4486c42a47df Mon Sep 17 00:00:00 2001 From: Konstantin Date: Thu, 13 Feb 2025 10:53:55 +0100 Subject: [PATCH 07/18] Improve search look and feel --- search/templates/search/search.html | 10 +++++----- theme/static_src/src/styles.css | 10 +++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/search/templates/search/search.html b/search/templates/search/search.html index 0a067f5..75556cb 100644 --- a/search/templates/search/search.html +++ b/search/templates/search/search.html @@ -13,13 +13,11 @@
-
+
-
-
@@ -30,7 +28,7 @@
-
+
-

Newsletter

+

Newsletter

{% include 'newsletter/snippets/signup_form.html' %}
From edb7a185d8dbf0271806913a7de26befa1183781 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sun, 16 Mar 2025 18:08:43 +0100 Subject: [PATCH 09/18] upgrade wagtail --- Makefile | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9687bac..b1b520c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help build publish -VERSION = 1.9.1 +VERSION = 1.9.2 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}' diff --git a/requirements.txt b/requirements.txt index eb7da49..459655b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Django>=5.1.4,<5.2 -wagtail>=6.4,<6.5 +wagtail>=6.4.1,<6.5 whitenoise>=6.6,<7.0 wagtailcodeblock>=1.29.0.2,<2.0 django-tailwind>=3.6.0 From 39f243382441766e2a4beb6acb336f25f01055b4 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 11 Apr 2025 15:32:30 +0200 Subject: [PATCH 10/18] feat: update mastodon instance --- Makefile | 2 +- iamkonstantin_web/templates/base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b1b520c..968102b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help build publish -VERSION = 1.9.2 +VERSION = 1.9.3 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}' diff --git a/iamkonstantin_web/templates/base.html b/iamkonstantin_web/templates/base.html index 90c1c93..d535569 100644 --- a/iamkonstantin_web/templates/base.html +++ b/iamkonstantin_web/templates/base.html @@ -4,7 +4,7 @@ - + {% include "wagtailseo/meta.html" %} {% block title %} From 2a2c59d2b894c80d4fdff237de305892b3e108f6 Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Tue, 6 May 2025 18:50:52 +0200 Subject: [PATCH 11/18] feat: upgrade wagtail, tags fixed classes --- Makefile | 2 +- blog/templates/blog/blog_page.html | 4 ---- home/templates/home/home_page.html | 5 ----- requirements.txt | 4 ++-- theme/static_src/src/styles.css | 4 ++-- 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 968102b..84a7b1f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help build publish -VERSION = 1.9.3 +VERSION = 1.9.4 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}' diff --git a/blog/templates/blog/blog_page.html b/blog/templates/blog/blog_page.html index c790824..e0898cb 100644 --- a/blog/templates/blog/blog_page.html +++ b/blog/templates/blog/blog_page.html @@ -79,8 +79,4 @@ </nav> </section> - - <section> - {% include 'newsletter/snippets/signup_form.html' %} - </section> {% endblock %} \ No newline at end of file diff --git a/home/templates/home/home_page.html b/home/templates/home/home_page.html index a84696a..00ed3b9 100644 --- a/home/templates/home/home_page.html +++ b/home/templates/home/home_page.html @@ -82,9 +82,4 @@ </div> </section> - <section> - <h2 id="newsletter" class="sr-only">Newsletter</h2> - {% include 'newsletter/snippets/signup_form.html' %} - </section> - {% endblock content %} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 459655b..e4b21fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -Django>=5.1.4,<5.2 -wagtail>=6.4.1,<6.5 +Django>=5.2,<5.3 +wagtail>=7.0,<7.1 whitenoise>=6.6,<7.0 wagtailcodeblock>=1.29.0.2,<2.0 django-tailwind>=3.6.0 diff --git a/theme/static_src/src/styles.css b/theme/static_src/src/styles.css index 32a2042..d83286a 100644 --- a/theme/static_src/src/styles.css +++ b/theme/static_src/src/styles.css @@ -124,11 +124,11 @@ } .tags ul { - @apply flex space-x-4 text-center text-sm; + @apply flex space-x-2 text-center text-sm; } .tags li { - @apply p-4 inline-flex items-center rounded-2xl bg-green-50 px-2 py-1 font-medium text-green-700 ring-1 ring-inset ring-green-600/20; + @apply p-3 inline-flex items-center rounded-2xl px-2 py-1 text-sm text-black dark:text-white ring-1 ring-inset ring-orange-700/20 dark:ring-white bg-orange-50 dark:bg-transparent; } .tags ul li::before { From 00c7db9bec159fb0b5428d178d6f5587e25f2b53 Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Tue, 6 May 2025 19:08:24 +0200 Subject: [PATCH 12/18] chore: upgrade seo plugin --- ...ogindexpage_struct_org_actions_and_more.py | 218 ++++++++++++++++++ ...ve_homepage_struct_org_actions_and_more.py | 80 +++++++ iamkonstantin_web/templates/base.html | 1 + requirements.txt | 6 +- 4 files changed, 302 insertions(+), 3 deletions(-) create mode 100644 blog/migrations/0015_remove_blogindexpage_struct_org_actions_and_more.py create mode 100644 home/migrations/0007_remove_homepage_struct_org_actions_and_more.py diff --git a/blog/migrations/0015_remove_blogindexpage_struct_org_actions_and_more.py b/blog/migrations/0015_remove_blogindexpage_struct_org_actions_and_more.py new file mode 100644 index 0000000..f9b57b6 --- /dev/null +++ b/blog/migrations/0015_remove_blogindexpage_struct_org_actions_and_more.py @@ -0,0 +1,218 @@ +# Generated by Django 5.1.6 on 2025-05-06 17:00 + +import django.db.models.deletion +from django.db import migrations, models + +from home.models import HomePage + +STRUCT_ORG_FIELDS = [ + "struct_org_type", + "struct_org_name", + "struct_org_logo_id", + "struct_org_image_id", + "struct_org_phone", + "struct_org_address_street", + "struct_org_address_locality", + "struct_org_address_region", + "struct_org_address_postal", + "struct_org_address_country", + "struct_org_geo_lat", + "struct_org_geo_lng", + "struct_org_hours", + "struct_org_actions", + "struct_org_extra_json", ] +# put here every model names of yours that could have been filled with structured seo data; +# order will matter when searching for pages data +SEO_MODELS = [HomePage] + + +def fill_settings_from_pages_struct_org(apps, schema_editor): + """ + Search for pages where seo struct info was filled and use that to + fill new settings struct data + """ + + SeoSettings = apps.get_model("wagtailseo", "SeoSettings") + Site = apps.get_model("wagtailcore", "Site") + + for site in Site.objects.all().select_related("root_page"): + for model_name in SEO_MODELS: + model = apps.get_model("home", model_name) + page = model.objects.filter( + path__startswith=site.root_page.path, + depth__gte=site.root_page.depth + ).order_by( + 'path' + ).exclude(struct_org_name__exact="").first() + # if you are sure that only root pages were used to fill structured data, + # you can directly use: + # page = site.root_page.specific if site.root_page.specific._meta.model_name in SEO_MODELS else None + if page is not None: + seo_settings, _ = SeoSettings.objects.get_or_create(site=site) + for field in STRUCT_ORG_FIELDS: + setattr(seo_settings, field, getattr(page, field)) + seo_settings.save() + break + + +def fill_pages_from_settings_struct_org(apps, schema_editor): + """ + The reverse migration. + + For every site, find the most top-level page inheriting from SeoMixin + and fill its struct information using the site's settings + """ + SeoSettings = apps.get_model("wagtailseo", "SeoSettings") + for seo_settings in SeoSettings.objects.all().select_related("site", "site__root_page"): + for model_name in SEO_MODELS: + model = apps.get_model("home", model_name) + page = model.objects.filter( + path__startswith=seo_settings.site.root_page.path, + depth__gte=seo_settings.site.root_page.depth + ).order_by('path').first() + if page is not None: + for field in STRUCT_ORG_FIELDS: + setattr(page, field, getattr(seo_settings, field)) + page.save() + break + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0014_alter_blogpage_body'), + ('wagtailimages', '0027_image_description'), + ("wagtailseo", "0003_seosettings_struct_org_fields"), + ] + + operations = [ + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_actions', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_address_country', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_address_locality', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_address_postal', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_address_region', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_address_street', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_extra_json', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_geo_lat', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_geo_lng', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_hours', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_image', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_logo', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_name', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_phone', + ), + migrations.RemoveField( + model_name='blogindexpage', + name='struct_org_type', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_actions', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_address_country', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_address_locality', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_address_postal', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_address_region', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_address_street', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_extra_json', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_geo_lat', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_geo_lng', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_hours', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_image', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_logo', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_name', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_phone', + ), + migrations.RemoveField( + model_name='blogpage', + name='struct_org_type', + ), + migrations.AlterField( + model_name='blogindexpage', + name='og_image', + field=models.ForeignKey(blank=True, help_text='Shown when linking to this page on social media. If blank, may show an image from the page, or the default from Settings > SEO.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='Preview image'), + ), + migrations.AlterField( + model_name='blogpage', + name='og_image', + field=models.ForeignKey(blank=True, help_text='Shown when linking to this page on social media. If blank, may show an image from the page, or the default from Settings > SEO.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='Preview image'), + ), + ] diff --git a/home/migrations/0007_remove_homepage_struct_org_actions_and_more.py b/home/migrations/0007_remove_homepage_struct_org_actions_and_more.py new file mode 100644 index 0000000..1ae5f5c --- /dev/null +++ b/home/migrations/0007_remove_homepage_struct_org_actions_and_more.py @@ -0,0 +1,80 @@ +# Generated by Django 5.1.6 on 2025-05-06 17:00 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0006_alter_homepage_body'), + ('wagtailimages', '0027_image_description'), + ] + + operations = [ + migrations.RemoveField( + model_name='homepage', + name='struct_org_actions', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_address_country', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_address_locality', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_address_postal', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_address_region', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_address_street', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_extra_json', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_geo_lat', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_geo_lng', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_hours', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_image', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_logo', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_name', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_phone', + ), + migrations.RemoveField( + model_name='homepage', + name='struct_org_type', + ), + migrations.AlterField( + model_name='homepage', + name='og_image', + field=models.ForeignKey(blank=True, help_text='Shown when linking to this page on social media. If blank, may show an image from the page, or the default from Settings > SEO.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='Preview image'), + ), + ] diff --git a/iamkonstantin_web/templates/base.html b/iamkonstantin_web/templates/base.html index d535569..1c7208b 100644 --- a/iamkonstantin_web/templates/base.html +++ b/iamkonstantin_web/templates/base.html @@ -80,5 +80,6 @@ {# Override this in templates to add extra javascript #} {% endblock %} {% include "wagtailseo/struct_data.html" %} +{% include "wagtailseo/struct_org_data.html" %} </body> </html> diff --git a/requirements.txt b/requirements.txt index e4b21fe..531598c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -Django>=5.2,<5.3 -wagtail>=7.0,<7.1 +Django>=5.1,<5.3 +wagtail>=6.4,<7.1 whitenoise>=6.6,<7.0 wagtailcodeblock>=1.29.0.2,<2.0 django-tailwind>=3.6.0 django-browser-reload>=1.17 Wand==0.6.13 -wagtail-seo==2.5.0 \ No newline at end of file +wagtail-seo==3.0.0 \ No newline at end of file From 9d5f6bc5fb800df38d6dc92e224ee4f7c5d13ea7 Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Tue, 6 May 2025 19:34:10 +0200 Subject: [PATCH 13/18] fix: tags layout and overflow --- Makefile | 2 +- blog/templates/blog/blog_page.html | 4 ++-- iamkonstantin_web/templates/base.html | 1 + theme/static_src/src/styles.css | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 84a7b1f..190dc92 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help build publish -VERSION = 1.9.4 +VERSION = 1.9.6 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}' diff --git a/blog/templates/blog/blog_page.html b/blog/templates/blog/blog_page.html index e0898cb..e930cf5 100644 --- a/blog/templates/blog/blog_page.html +++ b/blog/templates/blog/blog_page.html @@ -54,12 +54,12 @@ {% with tags=page.tags.all %} {% if tags %} - <div class="flex items-center gap-x-4 text-xs my-6"> + <div class="flex items-center justify-center gap-x-4 text-xs my-6"> <div class="tags"> <h2 class="sr-only">Tags</h2> <ul class="flex"> {% for tag in tags %} - <li class="space-x-2"><span class="emoji">🏷️</span> + <li><span class="emoji">🏷</span> <a class="pr-2" href="{% slugurl 'tags' %}?tag={{ tag }}">{{ tag }}</a> </li> {% endfor %} diff --git a/iamkonstantin_web/templates/base.html b/iamkonstantin_web/templates/base.html index 1c7208b..33932cd 100644 --- a/iamkonstantin_web/templates/base.html +++ b/iamkonstantin_web/templates/base.html @@ -4,6 +4,7 @@ <html lang="en" class="h-full antialiased"> <head> <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width"> <meta name="fediverse:creator" content="@iamkonstantin@mastodon.social" /> {% include "wagtailseo/meta.html" %} <title> diff --git a/theme/static_src/src/styles.css b/theme/static_src/src/styles.css index d83286a..29cf0aa 100644 --- a/theme/static_src/src/styles.css +++ b/theme/static_src/src/styles.css @@ -124,11 +124,11 @@ } .tags ul { - @apply flex space-x-2 text-center text-sm; + @apply flex-col sm:flex-row sm:space-x-2 text-center text-sm; } .tags li { - @apply p-3 inline-flex items-center rounded-2xl px-2 py-1 text-sm text-black dark:text-white ring-1 ring-inset ring-orange-700/20 dark:ring-white bg-orange-50 dark:bg-transparent; + @apply p-3 inline-flex items-center rounded-2xl px-2 py-1 text-sm text-black dark:text-white ring-1 ring-inset ring-orange-700/20 dark:ring-white bg-orange-50 dark:bg-transparent; } .tags ul li::before { @@ -137,7 +137,7 @@ } .tags a { - @apply border-b-0 w-full; + @apply border-b-0 w-full m-0; } .blog-pages a { From c4a83cf5bec6bc23e29228de588e9eda303b1f39 Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Thu, 15 May 2025 11:54:27 +0200 Subject: [PATCH 14/18] update portfolio sections --- Makefile | 7 ++--- blog/templates/blog/blog_page.html | 2 +- .../templates/includes/header.html | 2 +- theme/static_src/src/styles.css | 29 +++++++++++++++++++ 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 190dc92..aa018e0 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,9 @@ -.PHONY: help build publish -VERSION = 1.9.6 +.PHONY: help bump publish +VERSION = 1.9.11 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}' -build: - @docker build -t code.headbright.be/konstantin/iamkonstantin:$(VERSION) . - publish: # something to try: --provenance=false @docker buildx build -t code.headbright.be/konstantin/iamkonstantin:$(VERSION) --platform linux/arm64 --push . diff --git a/blog/templates/blog/blog_page.html b/blog/templates/blog/blog_page.html index e930cf5..2bc6968 100644 --- a/blog/templates/blog/blog_page.html +++ b/blog/templates/blog/blog_page.html @@ -74,7 +74,7 @@ </article> - <nav class="w-full text-center px-2 lg:px-4"> + <nav class="w-full text-center px-2 lg:px-4 return"> <a href="{{ page.get_parent.url }}" class="font-bold">Return to blog</a> </nav> diff --git a/iamkonstantin_web/templates/includes/header.html b/iamkonstantin_web/templates/includes/header.html index 9df9919..406c2ea 100644 --- a/iamkonstantin_web/templates/includes/header.html +++ b/iamkonstantin_web/templates/includes/header.html @@ -3,7 +3,7 @@ <a href="#main" class="skip-link">Skip to content</a> {% get_site_root as site_root %} - <nav class="w-full flex justify-center my-8"> + <nav class="w-full flex justify-center my-8 main"> <ul class="flex space-x-8"> <li><a href="{% pageurl site_root %}">{{ site_root.title }}</a></li> {% for menuitem in site_root.get_children.live.in_menu %} diff --git a/theme/static_src/src/styles.css b/theme/static_src/src/styles.css index 29cf0aa..8fac584 100644 --- a/theme/static_src/src/styles.css +++ b/theme/static_src/src/styles.css @@ -104,9 +104,38 @@ @apply text-sm my-1; } + li { + @apply text-sm my-0; + } + .ppb { page-break-before: always; } + + nav.main { + @apply hidden; + } + + main { + @apply mx-0 px-0; + } + + footer { + @apply hidden !important; + } + + nav.return { + @apply hidden; + } + + /*.blog-content ul, .home-content ul {*/ + /* @apply list-none list-inside list-disc;*/ + /* @apply inline-block mr-0;*/ + /*}*/ + + /*.blog-content ul li::before, .home-content ul li::before, .search li::before {*/ + /* content: "";*/ + /*}*/ } .primary-button { From 96633340cd9d334865d9c4caddb89300b9a005c6 Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Thu, 15 May 2025 12:33:55 +0200 Subject: [PATCH 15/18] feat: style changes for print previews --- Makefile | 2 +- theme/static_src/src/styles.css | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index aa018e0..4251cdc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help bump publish -VERSION = 1.9.11 +VERSION = 1.9.12 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}' diff --git a/theme/static_src/src/styles.css b/theme/static_src/src/styles.css index 8fac584..a93a4a8 100644 --- a/theme/static_src/src/styles.css +++ b/theme/static_src/src/styles.css @@ -89,15 +89,19 @@ @media print { h1 { - @apply mt-6 mb-4 text-xl; + @apply m-0 my-2 text-xl; } h2 { - @apply mt-4 mb-2 text-base; + @apply m-0 mt-2 text-base; } h3 { - @apply text-base; + @apply m-0 mt-2 text-base; + } + + h4 { + @apply m-0 text-base; } p { From c42bfbe72ddddbbfe9f59e8994d908c9b5a003ce Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Sun, 18 May 2025 18:26:24 +0200 Subject: [PATCH 16/18] chore: update dependencies --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 531598c..0f0ad01 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django>=5.1,<5.3 +Django>=5.2.1,<5.3 wagtail>=6.4,<7.1 whitenoise>=6.6,<7.0 wagtailcodeblock>=1.29.0.2,<2.0 From 38d59de6c04299782d951cf828a97717153c188e Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Sun, 18 May 2025 18:27:02 +0200 Subject: [PATCH 17/18] fix: unreadable on mobile --- blog/templates/blog/blog_page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/templates/blog/blog_page.html b/blog/templates/blog/blog_page.html index 2bc6968..3ad8acd 100644 --- a/blog/templates/blog/blog_page.html +++ b/blog/templates/blog/blog_page.html @@ -5,7 +5,7 @@ {% block body_class %}template-blogpage{% endblock %} {% block content %} - <section class="flex flex-col items-center justify-center h-full px-0 md:px-4 lg:px-8"> + <section class="flex flex-col justify-center h-full px-0 md:px-4 lg:px-8"> <article class="mb-16 px-1 md:px-4 lg:px-8"> <h1>{{ page.title }}</h1> From 36e46f8cfd5cc01b86fe5ff2a5554d5047ad1d4e Mon Sep 17 00:00:00 2001 From: Konstantin <konstantin@headbright.be> Date: Wed, 21 May 2025 10:50:55 +0200 Subject: [PATCH 18/18] feat: allow publishing posts without indexing them --- Makefile | 2 +- base/wagtail_hooks.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4251cdc..aa1009d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help bump publish -VERSION = 1.9.12 +VERSION = 1.9.15 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}' diff --git a/base/wagtail_hooks.py b/base/wagtail_hooks.py index 135e5e2..84e328b 100644 --- a/base/wagtail_hooks.py +++ b/base/wagtail_hooks.py @@ -5,6 +5,8 @@ from urllib.parse import urlparse from base.indexnow import get_key import requests +from blog.models import BlogPage + @hooks.register('after_publish_page') def after_publish_page(request, page): @@ -14,6 +16,9 @@ def after_publish_page(request, page): if urlparse(page_url).hostname == "localhost": print("not notifying indexnow for localhost" + get_key() + ", page url: " + page_url) return + if urlparse(page_url).path.endswith("--priv") or urlparse(page_url).path.endswith("--priv/"): + print("not notifying indexnow for blog page --priv") + return session = requests.Session() session.post( "https://api.indexnow.org/indexnow",