Phase 7 is mostly authored assets. This commit is the asset half; the
template half is a Builder child issue because this phase must not write
application code.
DoD items satisfied or advanced:
- [x] Eight diagrams present, both themes, readable at 1x and on mobile
8 SVGs, one byte-identical <style> block across all 8 (one visual
language by construction). Light and dark resolve from a single file
via prefers-color-scheme, verified per file in Chrome: 8/8 return two
distinct palettes. Geometry verified with getBBox(), not estimated:
0 findings after fixing 74 (text overflow, partial overlap, empty
text, out-of-viewBox). Mobile type at the 900px minimum is 14.1/12.2px.
- [x] Six code exhibits with a two-sentence rationale each
212 verbatim lines across five eras, copied with cp/sed from the
read-only archive. Every rationale is exactly two sentences about why
the code is good; every exhibit also carries an honest_note, and where
the code is not good the note says so (the 3,400-line procedural PHP
script is presented for its operational judgement, not its structure).
- [~] Every image optimised; total page weight budgeted and recorded
BUDGET.md records measured raw and gzip weights for all 15 served
files: 63,802 B raw / 13,220 B gzipped. Zero rasters by design. Page
weight of a real page is not measurable until Phase 2 templates and
Phase 3 serving exist, and is recorded as open rather than asserted.
- [x] Archive never linked or exposed
No mount paths or volume names under content/. Provenance recorded as
"private archive, path withheld".
- [ ] Client wall reads as deliberate -> needs markup/CSS (Builder)
- [ ] Lighthouse held at >= 95/95 -> needs a served page (Phase 3)
Also: the client wall is authored as data (45 entries, 44 distinct names) with
the 45-vs-46 discrepancy and the Diajio -> Diageo correction recorded
rather than papered over. No commercial marks are enabled: that is a
permission decision for Sam, so availability is recorded and permission is not
implied.
29 lines
788 B
C++
29 lines
788 B
C++
// WiFiMgr.hpp — the interface the rest of the firmware depends on
|
|
// WiFiMgr.hpp
|
|
#pragma once
|
|
#include <Arduino.h>
|
|
|
|
namespace WiFiMgr {
|
|
bool connectHome(const char* ssid, const char* psk, uint32_t timeoutMs = 15000);
|
|
void disconnect();
|
|
}
|
|
// WiFiMgr.cpp — the only translation unit that includes <WiFi.h>
|
|
// WiFiMgr.cpp
|
|
#include "WiFiMgr.hpp"
|
|
#include <WiFi.h> // ESP32 WiFi
|
|
|
|
namespace WiFiMgr {
|
|
bool connectHome(const char* ssid, const char* psk, uint32_t timeoutMs) {
|
|
WiFi.mode(WIFI_STA);
|
|
WiFi.begin(ssid, psk);
|
|
uint32_t t0 = millis();
|
|
while (WiFi.status() != WL_CONNECTED && millis() - t0 < timeoutMs) {
|
|
delay(200);
|
|
}
|
|
return WiFi.status() == WL_CONNECTED;
|
|
}
|
|
void disconnect() {
|
|
WiFi.disconnect(true, true);
|
|
WiFi.mode(WIFI_OFF);
|
|
}
|
|
} |