Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Sep 12, 2023
1 parent 00d4aa6 commit 4c89f13
Showing 1 changed file with 2 additions and 231 deletions.
233 changes: 2 additions & 231 deletions static/index.html
Original file line number Diff line number Diff line change
@@ -1,238 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>ESPHome ratgdo</title>
<meta
name="description"
content="Install ratgdo on your ESPHome devices."
/>
<meta name="viewport" content="width=device-width" />
<meta name="color-scheme" content="dark light" />
<meta property="og:title" content="ESPHome ratgdo" />
<meta property="og:site_name" content="ESPHome ratgdo" />
<meta
property="og:url"
content="https://esphome-ratgdo.github.io/esphome-ratgdo/"
/>
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Install RATGTO on your ESPHome devices."
/>
<meta
property="og:image"
content="https://esphome-ratgdo.github.io/esphome-ratgdo/header.png"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@esphome_ratgdo" />
<meta name="twitter:title" content="ESPHome ratgdo" />
<meta
name="twitter:description"
content="Install ratgdo on your ESPHome devices."
/>
<meta
name="twitter:image"
content="https://esphome-ratgdo.github.io/esphome-ratgdo/header.png"
/>

<style>
body {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
Roboto, Ubuntu, sans-serif;
padding: 0;
margin: 0;
line-height: 1.4;
}
.content {
max-width: 600px;
margin: 0 auto;
padding: 12px;
}
.header {
display: block;
width: 100%;
aspect-ratio: 1200 / 675;
border-radius: 12px;
}
h3 {
margin-top: 1.5em;
}
a {
color: #03a9f4;
}
.hidden {
display: none;
}
li {
padding: 4px 0;
}
.footer {
margin-top: 24px;
border-top: 1px solid #ccc;
padding-top: 24px;
text-align: center;
}
.footer .initiative {
font-style: italic;
margin-top: 16px;
}
.radios {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
}
.radios label {
padding: 4px;
cursor: pointer;
width: calc(33.3% - 16px);
display: block;
position: relative;
}
.radios input {
position: absolute;
top: 12px;
left: 12px;
}
.radios img {
display: block;
width: calc(100% - 8px);
border: 4px solid rgba(0, 0, 0, 0);
aspect-ratio: 1;
}
input:checked + img {
border-color: #58a6ff;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #333;
color: #fff;
}
a {
color: #58a6ff;
}
}
@media only screen and (max-width: 450px) {
.radios label {
width: calc(50% - 16px);
max-width: initial;
}
}
.diy::after {
content: "DIY";
background-color: #f44336;
color: #fff;
padding: 2px 4px;
border-radius: 4px;
font-size: 0.8em;
position: absolute;
bottom: 12px;
left: 12px;
}
body .diy {
display: none;
}
body.show-diy .diy {
display: initial;
}
</style>
<script
type="module"
src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"
></script>
<meta http-equiv="refresh" content="0; url='https://ratgdo.github.io/esphome-ratgdo/'" />
</head>
<body>
<div class="content">
<img
class="header"
src="./header.png"
alt="ESPHome ratgdo"
/>
<h1>ESPHome ratgdo</h1>
<p></p>
<p>
Pick your board to flash your ratgdo board with ESPhome for <a href="https://github.com/PaulWieland/ratgdo#ratgdo">ratgdo</a>.
No programming or other software required.
</p>
<p>
<b>Be sure to save the value of the rolling code counter and set it again or the board will not be able to control the garage door opener. If you forget to do this, you may be able to restore control by pressing the learn button, or factory resetting the garage door opener by pressing and holding the learn button 3 times for 10 seconds.</b>
</p>

<div class="radios">
<label>
<input type="radio" name="type" value="v2board_esp8266_d1_mini_lite" checked />
<img src="./v2board_esp8266_d1_mini_lite.png" alt="ratgdo v2 board with ESP8266 D1 Mini Lite" />
</label>
<label>
<input type="radio" name="type" value="v2board_esp32_d1_mini" />
<img src="./v2board_esp32_d1_mini.png" alt="ratgdo v2 board with ESP32 D1 Mini" />
</label>
</div>

<p class="button-row" align="center">
<esp-web-install-button></esp-web-install-button>
</p>

<div class="hidden info v2board">
<h3>ratgdo Shield v2</h3>
<p>
Replace the official ratgdo v2 board firmware with
ESPHome.
</p>
<p>
This project is not affiliated with ratgdo or Paul Wieland.

Please support his excellent work by buying his boards.
<a
href="https://paulwieland.github.io/ratgdo/#order"
>Buy boards from Paul</a>
</p>
</div>

<h3>Updating from versions older than 2023.07.07</h3>
<p>
When updating from older versions, save the rolling counter value and restore it via the number entity after flashing the new firmware. If you forget to save the code, check the Home Assistant history.
</p>

<h3>Advanced Users</h3>
<ul>
<li>
The device is adoptable in
<a
href="https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon"
>the ESPHome dashboard</a
>
</li>
<li>
The YAML configuration is on
<a href="https://github.com/ESPHome-RATGDO/esphome-ratgdo/tree/main/static">GitHub</a>
</li>
</ul>

<div class="footer">
<a href="https://esphome.io">ESPHome</a>
&mdash; Installer powered by
<a href="https://esphome.github.io/esp-web-tools/">ESP Web Tools</a>.
</div>
</div>
<script>
document.querySelectorAll('input[name="type"]').forEach((radio) =>
radio.addEventListener("change", () => {
const button = document.querySelector("esp-web-install-button");
button.manifest = `./${radio.value}-manifest.json`;

document.querySelectorAll(".info").forEach((info) => {
info.classList.add("hidden");
});
document
.querySelector(`.info.${radio.value}`)
.classList.remove("hidden");
})
);
document
.querySelector('input[name="type"]:checked')
.dispatchEvent(new Event("change"));
</script>
<p>You will be redirected to https://ratgdo.github.io/esphome-ratgdo/ soon!</p>
</body>
</html>

0 comments on commit 4c89f13

Please sign in to comment.