major refactoring for og tags (closes #57)

This commit is contained in:
Samuel Philipp 2024-03-31 14:18:45 +02:00
parent 01104b528a
commit 40a4a44c52
25 changed files with 31 additions and 37 deletions

View file

@ -31,7 +31,6 @@ layout: base.njk
</div>
</div>
{% endif %}
{% set service = services | getServiceById(service) %}
{% if service %}
<div class="tab-card">
<div class="title">{{ strings.article.relatedService }}</div>

View file

@ -1,12 +1,7 @@
---
layout: base.njk
eleventyComputed:
service: "{{ getServiceById(key) }}"
title: "{{ service.name }}"
summary: "{{ service.summary[locale] }}"
---
{% set service = services | getServiceById(key) %}
{% if service %}
<p class="small"><a href="/{{locale}}/services/">{{ strings.service.overview }}</a></p>
<h1 class="clearfix"><i class="{{service.icon}}"></i> {{title}} <a href="https://status.sp-codes.de" class="float-end"><img alt="{{strings.state.title}}" src="https://status.sp-codes.de/api/badge/{{service.status}}/status?label={{strings.state.title}}&upLabel={{strings.state.operational}}&downLabel={{strings.state.outage}}&maintenanceLabel={{strings.state.maintenance}}"></a></h1>