Skip to content

Commit bc4233e

Browse files
committed
Fix some css and add troubleshooting card
1 parent 8602c24 commit bc4233e

File tree

6 files changed

+74
-4
lines changed

6 files changed

+74
-4
lines changed

home-assistant-connect-zwa-2/install-portable.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
border-radius: 8px;
4848
}
4949

50+
warning-card::part(container) {
51+
margin: -5px 20px 20px;
52+
}
53+
5054
install-esphome-firmware .min-h-screen {
5155
min-height: auto !important;
5256
}

home-assistant-connect-zwa-2/install.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
min-height: auto !important;
5353
}
5454

55+
warning-card::part(container) {
56+
margin: -5px 20px 20px;
57+
}
58+
5559
a {
5660
color: #03a9f4;
5761
text-decoration: none;

src/components/details.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class DetailsPage extends LitElement {
127127
128128
@media (max-width: 768px) {
129129
:host {
130-
padding: 0px;
130+
padding: 20px 0 0 0;
131131
}
132132
133133
.hero[data-expanded='false'] ::slotted([slot='secondary-description']),

src/components/warning-card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class WarningCard extends LitElement {
5050

5151
render() {
5252
return html`
53-
<div class="warning-container">
53+
<div class="warning-container" part="container">
5454
<div class="warning-card">
5555
<svg class="warning-icon" viewBox="0 0 24 24" fill="currentColor">
5656
<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" />

src/pages/zwa2-install-poe.ts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,33 @@ export class Zwa2InstallPoEPage extends LitElement {
1212
display: block;
1313
}
1414
15+
.troubleshooting-container {
16+
max-width: 1200px;
17+
margin: 0 auto;
18+
padding: 0 20px;
19+
}
20+
21+
.troubleshooting-card {
22+
background: var(--app-bg-card);
23+
border-radius: 16px;
24+
padding: 16px 20px;
25+
box-shadow: 0 2px 8px var(--app-shadow);
26+
margin: 20px 0 30px;
27+
}
28+
29+
.troubleshooting-card h3 {
30+
margin-top: 0;
31+
}
32+
33+
.troubleshooting-card a {
34+
color: var(--wa-color-brand-50);
35+
text-decoration: none;
36+
}
37+
38+
.troubleshooting-card a:hover {
39+
text-decoration: underline;
40+
}
41+
1542
p[slot='subtitle'] {
1643
color: var(--wa-color-brand-50);
1744
font-size: 1.1rem;
@@ -322,7 +349,11 @@ export class Zwa2InstallPoEPage extends LitElement {
322349
</li>
323350
<li>Enjoy!</li>
324351
</ol>
352+
</div>
353+
</details-page>
325354
355+
<div class="troubleshooting-container">
356+
<div class="troubleshooting-card">
326357
<h3>Troubleshooting</h3>
327358
<p>
328359
Make sure the Waveshare ESP32-PoE board is connected to the same
@@ -359,7 +390,7 @@ export class Zwa2InstallPoEPage extends LitElement {
359390
and connect the ZWA-2 directly to Home Assistant.
360391
</p>
361392
</div>
362-
</details-page>
393+
</div>
363394
`;
364395
}
365396
}

src/pages/zwa2-install-portable.ts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,33 @@ export class Zwa2InstallPortablePage extends LitElement {
99
display: block;
1010
}
1111
12+
.troubleshooting-container {
13+
max-width: 1200px;
14+
margin: 0 auto;
15+
padding: 0 20px;
16+
}
17+
18+
.troubleshooting-card {
19+
background: var(--app-bg-card);
20+
border-radius: 16px;
21+
padding: 16px 20px;
22+
box-shadow: 0 2px 8px var(--app-shadow);
23+
margin: 20px 0 30px;
24+
}
25+
26+
.troubleshooting-card h3 {
27+
margin-top: 0;
28+
}
29+
30+
.troubleshooting-card a {
31+
color: var(--wa-color-brand-50);
32+
text-decoration: none;
33+
}
34+
35+
.troubleshooting-card a:hover {
36+
text-decoration: underline;
37+
}
38+
1239
p[slot='subtitle'] {
1340
color: var(--wa-color-brand-50);
1441
font-size: 1.1rem;
@@ -198,7 +225,11 @@ export class Zwa2InstallPortablePage extends LitElement {
198225
<i>rebuild network routes</i>.
199226
</li>
200227
</ol>
228+
</div>
229+
</details-page>
201230
231+
<div class="troubleshooting-container">
232+
<div class="troubleshooting-card">
202233
<h3>Troubleshooting</h3>
203234
<p>
204235
Make sure the ZWA-2 is connected to the same network as Home
@@ -232,7 +263,7 @@ export class Zwa2InstallPortablePage extends LitElement {
232263
and connect it directly to Home Assistant.
233264
</p>
234265
</div>
235-
</details-page>
266+
</div>
236267
`;
237268
}
238269

0 commit comments

Comments
 (0)