Skip to content

Commit 4212a5e

Browse files
authored
Install button (#1)
* Adding basic hardware selection button. * Completed some basic linting. * Initial installation website.
1 parent 5a6232f commit 4212a5e

File tree

7 files changed

+139
-9
lines changed

7 files changed

+139
-9
lines changed

.htmllintrc

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"plugins": [], // npm modules to load
3+
4+
"maxerr": false,
5+
"raw-ignore-regex": false,
6+
"attr-bans": [
7+
// "align",
8+
"background",
9+
"bgcolor",
10+
"border",
11+
"frameborder",
12+
"longdesc",
13+
"marginwidth",
14+
"marginheight",
15+
"scrolling",
16+
"style",
17+
"width"
18+
],
19+
"indent-delta": false,
20+
"indent-style": "nonmixed",
21+
"indent-width": 2,
22+
"indent-width-cont": false,
23+
"spec-char-escape": true,
24+
"text-ignore-regex": false,
25+
"tag-bans": [
26+
// "style",
27+
"b",
28+
"i"
29+
],
30+
"tag-close": true,
31+
"tag-name-lowercase": true,
32+
"tag-name-match": true,
33+
"tag-self-close": false,
34+
"doctype-first": false,
35+
"doctype-html5": false,
36+
"attr-name-style": "dash",
37+
"attr-name-ignore-regex": false,
38+
"attr-no-dup": true,
39+
"attr-no-unsafe-char": true,
40+
"attr-order": false,
41+
"attr-quote-style": "double",
42+
"attr-req-value": true,
43+
"attr-new-line": false,
44+
"attr-validate": true,
45+
"id-no-dup": true,
46+
"id-class-no-ad": true,
47+
"id-class-style": "underscore",
48+
"class-no-dup": true,
49+
"class-style": false,
50+
"id-class-ignore-regex": false,
51+
"img-req-alt": true,
52+
"img-req-src": true,
53+
"html-valid-content-model": true,
54+
"head-valid-content-model": true,
55+
"href-style": false,
56+
"link-req-noopener": true,
57+
"label-req-for": true,
58+
"line-end-style": "lf",
59+
"line-no-trailing-whitespace": true,
60+
"line-max-len": false,
61+
"line-max-len-ignore-regex": false,
62+
"head-req-title": false,
63+
"title-no-dup": true,
64+
"title-max-len": 60,
65+
"html-req-lang": false,
66+
"lang-style": "case",
67+
"fig-req-figcaption": false,
68+
"focusable-tabindex-style": false,
69+
"input-radio-req-name": true,
70+
"input-req-label": false,
71+
"table-req-caption": false,
72+
"table-req-header": false,
73+
"tag-req-attr": false
74+
}

.markdownlint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
---
12
# Default state for all rules
23
default: true
34

4-
MD013: false # Disable line-length checking
5-
MD034: false # Disable checking for bare URL's as they are commonly used with Jekyll
5+
MD013: false # Disable line-length checking

_config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# You can create any custom variable you would like, and they will be accessible
2121
# in the templates via {{ site.myvariable }}.
2222

23-
title: ESPHome econet
23+
title: ESPHome-econet
2424
2525
description: >- # this means to ignore newlines until "baseurl:"
2626
esphome-econet is a package for controlling a Rheem water
@@ -38,6 +38,10 @@ header_pages:
3838
- install.markdown
3939
- about.markdown
4040

41+
minima:
42+
social_links:
43+
- {platform: github, user_url: "https://github.com/esphome-econet/esphome-econet"}
44+
4145
# Exclude from processing.
4246
# The following items will not be processed, by default.
4347
# Any item listed under the `exclude:` key here will be automatically added to
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<head>
2+
<style>
3+
.invisible {
4+
visibility: hidden;
5+
}
6+
.hidden {
7+
display: none;
8+
}
9+
esp-web-install-button[install-unsupported] {
10+
visibility: inherit;
11+
}
12+
.radios li {
13+
list-style: none;
14+
line-height: 2em;
15+
}
16+
</style>
17+
18+
<script
19+
type="module"
20+
src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"
21+
></script>
22+
</head>
23+
24+
<p>Select your product</p>
25+
<ul class="radios">
26+
<li>
27+
<label><input type="radio" name="type" value="etwh" />Electric Tank Water Heater</label>
28+
</li>
29+
<li>
30+
<label><input type="radio" name="type" value="hpwh" />Heatpump Water Heater</label>
31+
</li>
32+
<li>
33+
<label><input type="radio" name="type" value="hvac" />HVAC System</label>
34+
</li>
35+
<li>
36+
<label><input type="radio" name="type" value="tlwh" />Tankless Water Heater</label>
37+
</li>
38+
</ul>
39+
<p class="button-row" align="center">
40+
<esp-web-install-button class="invisible"></esp-web-install-button>
41+
</p>
42+
43+
<script>
44+
document.querySelectorAll('input[name="type"]').forEach(radio =>
45+
radio.addEventListener("change", () => {
46+
const button = document.querySelector('esp-web-install-button');
47+
button.manifest = `https://esphome-econet.github.io/esphome-econet/econet-${radio.value}.json`;
48+
button.classList.remove('invisible');
49+
}
50+
));
51+
</script>

about.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ layout: page
33
title: About
44
permalink: /about/
55
---
6-
The esphome-econet project is focused on enabling smart control of Rheem appliances via an ESPHome-powered micro-computer. For more details, visit our main page on GitHub at https://github.com/esphome-econet/esphome-econet.
6+
The esphome-econet project is focused on enabling smart control of Rheem appliances via an ESPHome-powered micro-computer. For more details, visit our main page on GitHub at <https://github.com/esphome-econet/esphome-econet>.

index.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
44

55
layout: home
6+
title: ESPHome-econet
67
---
8+
To install ESPHome-econet on your device, [visit our installation page](/install).
9+
10+
if you'd like help with your setup or to discuss potential improvements to ESPHome-econet, come join us on [our Discord](https://discord.gg/gytTnekGSz).

install.markdown

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ layout: page
33
title: Installation
44
permalink: /install/
55
---
6-
<script
7-
type="module"
8-
src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"
9-
></script>
6+
## Web-Based Installation
107

11-
This page will soon be updated to support web_serial installation of esphome-econet devices.
8+
{% include hardwareSelectorButton.html %}

0 commit comments

Comments
 (0)