diff --git a/src/SiteInfo.php b/src/SiteInfo.php index a14d90b7..868350a2 100644 --- a/src/SiteInfo.php +++ b/src/SiteInfo.php @@ -12,6 +12,8 @@ class SiteInfo { ['name:s', 'Misuzu'], 'desc:s', 'url:s', + 'email:s', + 'bsky:s', 'ext_logo:s', ]); } @@ -28,6 +30,14 @@ class SiteInfo { get => rtrim($this->props['url'], '/'); } + public string $email { + get => $this->props['email']; + } + + public string $bsky { + get => $this->props['bsky']; + } + public string $externalLogo { get => $this->props['ext_logo']; } diff --git a/src/TemplatingExtension.php b/src/TemplatingExtension.php index 0545ca64..99eb101e 100644 --- a/src/TemplatingExtension.php +++ b/src/TemplatingExtension.php @@ -99,6 +99,11 @@ final class TemplatingExtension extends AbstractExtension { 'title' => 'Rules', 'url' => $this->ctx->urls->format('info', ['title' => 'rules']), ]; + if(!empty($this->ctx->siteInfo->bsky)) + $home['menu'][] = [ + 'title' => 'Bluesky', + 'url' => $this->ctx->siteInfo->bsky, + ]; $menu[] = $home; diff --git a/templates/_layout/footer.twig b/templates/_layout/footer.twig index ae905795..37d707d4 100644 --- a/templates/_layout/footer.twig +++ b/templates/_layout/footer.twig @@ -1,18 +1,17 @@ diff --git a/templates/_layout/header.twig b/templates/_layout/header.twig index 16d257f2..e5117c15 100644 --- a/templates/_layout/header.twig +++ b/templates/_layout/header.twig @@ -33,14 +33,14 @@
{% for item in header_menu %}
- {{ item.title }} + {{ item.title }} {% if item.menu is defined and item.menu is iterable %}
{% for subitem in item.menu %} - {{ subitem.title }} + {{ subitem.title }} {% endfor %}
@@ -103,11 +103,11 @@
{% for item in header_menu %} - {{ item.title }} + {{ item.title }} {% if item.menu is defined and item.menu is iterable %} {% for subitem in item.menu %} - {{ subitem.title }} + {{ subitem.title }} {% endfor %} {% endif %} {% endfor %}