mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 18:06:54 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
3b827e5803
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@ public
|
|||||||
source/_data/analytics_data.json
|
source/_data/analytics_data.json
|
||||||
source/_data/blueprint_exchange_data.json
|
source/_data/blueprint_exchange_data.json
|
||||||
source/_data/version_data.json
|
source/_data/version_data.json
|
||||||
|
source/_data/alerts_data.json
|
||||||
source/_stash
|
source/_stash
|
||||||
source/stylesheets/screen.css
|
source/stylesheets/screen.css
|
||||||
source/.jekyll-cache/
|
source/.jekyll-cache/
|
||||||
|
16
Rakefile
16
Rakefile
@ -33,6 +33,8 @@ task :generate do
|
|||||||
abort("Generating CSS failed") unless success
|
abort("Generating CSS failed") unless success
|
||||||
success = system "rake analytics_data"
|
success = system "rake analytics_data"
|
||||||
abort("Generating analytics data failed") unless success
|
abort("Generating analytics data failed") unless success
|
||||||
|
success = system "rake alerts_data"
|
||||||
|
abort("Generating alerts data failed") unless success
|
||||||
success = system "rake version_data"
|
success = system "rake version_data"
|
||||||
abort("Generating version data failed") unless success
|
abort("Generating version data failed") unless success
|
||||||
success = system "rake blueprint_exchange_data"
|
success = system "rake blueprint_exchange_data"
|
||||||
@ -74,6 +76,7 @@ task :preview, :listen do |t, args|
|
|||||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
||||||
system "rake analytics_data"
|
system "rake analytics_data"
|
||||||
system "rake version_data"
|
system "rake version_data"
|
||||||
|
system "rake alerts_data"
|
||||||
system "rake blueprint_exchange_data"
|
system "rake blueprint_exchange_data"
|
||||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build -t --watch --incremental")
|
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build -t --watch --incremental")
|
||||||
compassPid = Process.spawn("compass watch")
|
compassPid = Process.spawn("compass watch")
|
||||||
@ -191,6 +194,19 @@ task :analytics_data do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
desc "Download data from alerts.home-assistant.io"
|
||||||
|
task :alerts_data do
|
||||||
|
uri = URI('https://alerts.home-assistant.io/alerts.json')
|
||||||
|
|
||||||
|
remote_data = JSON.parse(Net::HTTP.get(uri))
|
||||||
|
|
||||||
|
File.open("#{source_dir}/_data/alerts_data.json", "w") do |file|
|
||||||
|
file.write(JSON.generate(remote_data))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
desc "Download version data from version.home-assistant.io"
|
desc "Download version data from version.home-assistant.io"
|
||||||
task :version_data do
|
task :version_data do
|
||||||
uri = URI('https://version.home-assistant.io/stable.json')
|
uri = URI('https://version.home-assistant.io/stable.json')
|
||||||
|
@ -51,6 +51,17 @@ $primary-color: #049cdb;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.integration-alert {
|
||||||
|
margin: -1em 0;
|
||||||
|
background-color: wheat;
|
||||||
|
padding: 4px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $menu-collapse) {
|
@media only screen and (max-width: $menu-collapse) {
|
||||||
.search-container {
|
.search-container {
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% assign percentage = 100.0 | times: site.data.analytics_data.integrations[page.ha_domain] | divided_by: site.data.analytics_data.reports_integrations | round: 1 %}
|
{% assign percentage = 100.0 | times: site.data.analytics_data.integrations[page.ha_domain] | divided_by: site.data.analytics_data.reports_integrations | round: 1 %}
|
||||||
<section class="aside-module grid__item one-whole lap-one-half">
|
<section class="aside-module grid__item one-whole lap-one-half">
|
||||||
|
|
||||||
<div class='brand-logo-container section'>
|
<div class='brand-logo-container section'>
|
||||||
{%- if page.logo -%}
|
{%- if page.logo -%}
|
||||||
<img src='/images/supported_brands/{{ page.logo }}' />
|
<img src='/images/supported_brands/{{ page.logo }}' />
|
||||||
@ -13,12 +12,6 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{%- if page.ha_domain -%}
|
|
||||||
<div class="section">
|
|
||||||
<kb-alert-link integration="{{ page.ha_domain }}"></kb-alert-link>
|
|
||||||
</div>
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
<div class='section'>
|
<div class='section'>
|
||||||
The {{ page.name | default: page.title }} integration was introduced in Home Assistant {{ page.ha_release | default: "unknown" }},
|
The {{ page.name | default: page.title }} integration was introduced in Home Assistant {{ page.ha_release | default: "unknown" }},
|
||||||
and it's used by <a title="Open analytics.home-assistant.io" href="https://analytics.home-assistant.io/#integrations" target="_blank" rel="noopener">
|
and it's used by <a title="Open analytics.home-assistant.io" href="https://analytics.home-assistant.io/#integrations" target="_blank" rel="noopener">
|
||||||
@ -61,5 +54,3 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script src="https://alerts.home-assistant.io/ce-alert-link.js"></script>
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{% include site/head.html %}
|
{% include site/head.html %}
|
||||||
<body {% if page.body_id %} id="{{ page.body_id }}"{% endif %}>
|
<body {% if page.body_id %} id="{{ page.body_id }}"{% endif %}>
|
||||||
|
|
||||||
<header class='site-header'>
|
<header class='site-header'>
|
||||||
{% include site/header.html %}
|
{% include site/header.html %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
{% if page.hero_unit %}
|
{% if page.hero_unit %}
|
||||||
|
@ -10,6 +10,19 @@ layout: default
|
|||||||
}}{% endif %}
|
}}{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
|
{% if page.collection == "integrations" %}
|
||||||
|
{% assign active_alert = "" %}
|
||||||
|
{% for alert in site.data.alerts_data %}
|
||||||
|
{% if alert.integrations and alert.integrations[0].package == page.ha_domain %}
|
||||||
|
{% assign active_alert = alert.alert_url %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if active_alert != "" %}
|
||||||
|
<div class="integration-alert">
|
||||||
|
<a href="{{active_alert}}" target="_blank">⚠️ There is an active alert for this integration!</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
<hr class="divider" />
|
<hr class="divider" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user