mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-06-24 11:06:51 +00:00

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Co-authored-by: Franck Nijhof <git@frenck.dev>
57 lines
2.0 KiB
HTML
57 lines
2.0 KiB
HTML
---
|
|
layout: default
|
|
---
|
|
|
|
<article class="page">
|
|
{% if page.title and page.show_title != false and page.layout != "landingpage" %}
|
|
<header>
|
|
{% assign crumbs = page.url | split: '/' %}
|
|
{% if crumbs.size > 2 %}
|
|
<div class="breadcrumbs">
|
|
<a href="/">Home</a>
|
|
{% for crumb in crumbs offset: 1 %}
|
|
{% if forloop.last %}
|
|
▸
|
|
{% else %}
|
|
{% assign crumb_limit = forloop.index | plus: 1 %}
|
|
▸ <a href="{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}">{{ crumb | replace:'docs','documentation' | replace:'-',' ' | replace:'_',' ' | capitalize }}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<h1 class="title indent">
|
|
{% if page.title contains "Category:" %}
|
|
{{ page.title | replace: "-", " " | replace: "Category: ", "" }}
|
|
{% else %}
|
|
{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}
|
|
{% endif %}
|
|
</h1>
|
|
</header>
|
|
{% if page.collection == "integrations" %}
|
|
{% assign active_alert = "" %}
|
|
{% for alert in site.data.alerts_data %}
|
|
{% for integration in alert.integrations %}
|
|
{% if integration.package == page.ha_domain %}
|
|
{% assign active_alert = alert.alert_url %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% if active_alert != "" %}
|
|
<div class="integration-alert-container">
|
|
<a class="integration-alert" href="{{active_alert}}" target="_blank">
|
|
<svg preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true" viewBox="0 0 24 24" color="currentColor">
|
|
<g><path d="M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16"></path></g>
|
|
</svg>
|
|
<div class="content">There is an active alert for this integration!</div>
|
|
<div class="learn-more">LEARN MORE</div>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{{ content }}
|
|
|
|
{% include related.html %}
|
|
{% include feedback.html %}
|
|
</article>
|