Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/raspberry-mint/public/localized/index.html.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'base.html.j2' %}
{% set regional_content = project.extensions['raspberry-mint'].configuration.regional_content %}
{% set regional_content = project.extensions['raspberry-mint'].regional_content %}
{% block page_summary %}
{% if 'front-page-summary' in regional_content %}
{{ regional_content['front-page-summary'] | build_content }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<style>svg{filter: drop-shadow(0 0 5px #999);}</style>
<path stroke="#000000" stroke-width="50"
d="M256 32C167.67 32 96 96.51 96 176c0 128 160 304 160 304s160-176 160-304c0-79.49-71.67-144-160-144zm0 224a64 64 0 1164-64 64.07 64.07 0 01-64 64z"/>
<path fill="color-mix(in srgb, #fff 80%, {{ project.extensions['raspberry-mint'].configuration.tertiary_color }} 100%)"
<path fill="color-mix(in srgb, #fff 80%, {{ project.extensions['raspberry-mint'].tertiary_color }} 100%)"
d="M256 32C167.67 32 96 96.51 96 176c0 128 160 304 160 304s160-176 160-304c0-79.49-71.67-144-160-144zm0 224a64 64 0 1164-64 64.07 64.07 0 01-64 64z"/>
</svg>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="49px" height="49px" viewBox="0 0 49 49">
<style>svg{filter: drop-shadow(0 0 5px #999);}</style>
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].primary_color }}"
fill-opacity="50%"/>
<circle cx="25" cy="25" r="16" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"/>
<circle cx="25" cy="25" r="16" fill="{{ project.extensions['raspberry-mint'].primary_color }}"/>
</svg>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="49px" height="49px" viewBox="0 0 49 49">
<style>svg{filter: drop-shadow(0 0 5px #999);}</style>
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].primary_color }}"
fill-opacity="50%"/>
<circle cx="25" cy="25" r="12" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"/>
<circle cx="25" cy="25" r="12" fill="{{ project.extensions['raspberry-mint'].primary_color }}"/>
</svg>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="49px" height="49px" viewBox="0 0 49 49">
<style>svg{filter: drop-shadow(0 0 5px #999);}</style>
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].primary_color }}"
fill-opacity="50%"/>
<circle cx="25" cy="25" r="16" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"/>
<circle cx="25" cy="25" r="16" fill="{{ project.extensions['raspberry-mint'].primary_color }}"/>
</svg>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="49px" height="49px" viewBox="0 0 49 49">
<style>svg{filter: drop-shadow(0 0 5px #999);}</style>
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"
<circle cx="25" cy="25" r="19" fill="{{ project.extensions['raspberry-mint'].primary_color }}"
fill-opacity="50%"/>
<circle cx="25" cy="25" r="4" fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"/>
<circle cx="25" cy="25" r="4" fill="{{ project.extensions['raspberry-mint'].primary_color }}"/>
</svg>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="49px" height="59px" class="ionicon" viewBox="0 0 512 512">
<style>svg{filter: drop-shadow(0 0 5px #999);}</style>
<path stroke="color-mix(in srgb, #fff 80%, {{ project.extensions['raspberry-mint'].configuration.primary_color }} 100%)" stroke-width="50"
<path stroke="color-mix(in srgb, #fff 80%, {{ project.extensions['raspberry-mint'].primary_color }} 100%)" stroke-width="50"
d="M256 32C167.67 32 96 96.51 96 176c0 128 160 304 160 304s160-176 160-304c0-79.49-71.67-144-160-144zm0 224a64 64 0 1164-64 64.07 64.07 0 01-64 64z"/>
<path fill="{{ project.extensions['raspberry-mint'].configuration.primary_color }}"
<path fill="{{ project.extensions['raspberry-mint'].primary_color }}"
d="M256 32C167.67 32 96 96.51 96 176c0 128 160 304 160 304s160-176 160-304c0-79.49-71.67-144-160-144zm0 224a64 64 0 1164-64 64.07 64.07 0 01-64 64z"/>
</svg>
2 changes: 1 addition & 1 deletion assets/raspberry-mint/templates/entity/page.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
document.resource
) %}
{% block page_content %}
{% set regional_content = project.extensions['raspberry-mint'].configuration.regional_content %}
{% set regional_content = project.extensions['raspberry-mint'].regional_content %}
{% if 'entity-page-content--' ~ document.resource.plugin().id in regional_content %}
{{ regional_content['entity-page-content--' ~ document.resource.plugin().id] | build_content }}
{% elif 'entity-page-content' in regional_content %}
Expand Down
2 changes: 1 addition & 1 deletion assets/raspberry-mint/templates/trees/node-color.txt.j2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ project.extensions['raspberry-mint'].configuration.secondary_color }}
{{ project.extensions['raspberry-mint'].secondary_color }}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ project.extensions['raspberry-mint'].configuration.secondary_color }}
{{ project.extensions['raspberry-mint'].secondary_color }}
5 changes: 4 additions & 1 deletion assets/universe/locale/ar/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: ar\n"
Expand Down Expand Up @@ -1536,6 +1536,9 @@ msgstr ""
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/betty.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -1523,6 +1523,9 @@ msgstr ""
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/de-DE/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: de_DE\n"
Expand Down Expand Up @@ -1558,6 +1558,9 @@ msgstr "Staat"
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr "Straße"

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/en-GB/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: en_GB\n"
Expand Down Expand Up @@ -1576,6 +1576,9 @@ msgstr "State"
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr "Street"

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/es-ES/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:15+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: es_ES\n"
Expand Down Expand Up @@ -1535,6 +1535,9 @@ msgstr "Estado"
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr "Calle"

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/fi-FI/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: fi_FI\n"
Expand Down Expand Up @@ -1531,6 +1531,9 @@ msgstr ""
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/fr-FR/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: fr_FR\n"
Expand Down Expand Up @@ -1544,6 +1544,9 @@ msgstr "État"
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr "Rue"

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/he/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
"Language: he\n"
Expand Down Expand Up @@ -1531,6 +1531,9 @@ msgstr ""
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/nl-NL/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 19:37+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: nl_NL\n"
Expand Down Expand Up @@ -1602,6 +1602,9 @@ msgstr "Staat"
msgid "States"
msgstr "Staten"

msgid "Static content"
msgstr ""

msgid "Street"
msgstr "Straat"

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/pt-BR/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: pt_BR\n"
Expand Down Expand Up @@ -1568,6 +1568,9 @@ msgstr ""
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/ru-RU/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: ru_RU\n"
Expand Down Expand Up @@ -1585,6 +1585,9 @@ msgstr "Штат"
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr "Улица"

Expand Down
5 changes: 4 additions & 1 deletion assets/universe/locale/uk/betty.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty 0.4\n"
"Report-Msgid-Bugs-To: illia@maier.page\n"
"POT-Creation-Date: 2026-03-17 14:01+0000\n"
"POT-Creation-Date: 2026-03-18 00:52+0000\n"
"PO-Revision-Date: 2026-02-17 18:12+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: uk\n"
Expand Down Expand Up @@ -1580,6 +1580,9 @@ msgstr "Штат"
msgid "States"
msgstr ""

msgid "Static content"
msgstr ""

msgid "Street"
msgstr "Вулиця"

Expand Down
2 changes: 1 addition & 1 deletion betty/plugins/content/raspberry_mint_color_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def new(cls, project: Project, data: ColorStyleConfiguration, /) -> Self:
gather(
*map(
project.factory.new,
map(ContentManufacturer.resolve, data.content),
data.content,
)
),
project.jinja,
Expand Down
35 changes: 35 additions & 0 deletions betty/plugins/content/static.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
Static content.
"""

from __future__ import annotations

from typing import TYPE_CHECKING, Self, final, override

from betty.content import Content, ContentDefinition
from betty.locale.localizable.gettext import _
from betty.service.factory import Manufacturable

if TYPE_CHECKING:
from betty.document import Document
from betty.service.level import ServiceLevel


@final
@ContentDefinition("static", label=_("Static content"))
class Static(Content, Manufacturable):
"""
.. plugin:: content:static.
"""

def __init__(self, content: str | None = None, /):
self._content = content

@override
@classmethod
async def new(cls, services: ServiceLevel, /) -> Self:
return cls()

@override
async def build(self, *, document: Document) -> str | None:
return self._content
6 changes: 3 additions & 3 deletions betty/plugins/extension/demo/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from betty.plugins.entity.person import Person
from betty.plugins.entity.place import Place
from betty.plugins.entity.source import Source
from betty.plugins.extension.raspberry_mint import Breakpoint, RaspberryMint
from betty.plugins.extension.raspberry_mint import Breakpoint, RaspberryMint, Region
from betty.plugins.extension.raspberry_mint.data import RaspberryMintConfiguration
from betty.plugins.extension.raspberry_mint.default import regional_content
from betty.project import Project
Expand Down Expand Up @@ -61,7 +61,7 @@ async def create_project(app: App, project_directory_path: Path) -> Project:
RaspberryMintConfiguration(
regional_content={
**regional_content(localizers=localizers),
"front-page-content": [
Region.FRONT_PAGE_CONTENT: [
ContentManufacturer(
Columns,
ColumnsConfiguration([[IncompleteTranslationWarning]]),
Expand Down Expand Up @@ -167,7 +167,7 @@ async def create_project(app: App, project_directory_path: Path) -> Project:
),
),
],
"front-page-summary": [
Region.FRONT_PAGE_SUMMARY: [
ContentManufacturer(
Render,
RenderConfiguration(
Expand Down
Loading
Loading