Skip to content

Commit f8b0c66

Browse files
committed
Add white label reference page
Documents EVCC_CUSTOM_* branding (logo, brand, contact, custom CSS), problem-report email flow, deployment via CLI/systemd/Docker and image forking. Adds screenshot-generator recipes and explicit English anchors on the Linux env-vars section.
1 parent dda3c6f commit f8b0c66

43 files changed

Lines changed: 538 additions & 5 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ export default defineConfig({
269269
{ label: "Plugins", slug: "reference/plugins" },
270270
{ label: "Modbus", slug: "reference/modbus" },
271271
{ label: "Web UI", slug: "reference/web-ui" },
272+
{ label: "White Label", slug: "reference/white-label" },
272273
{ label: "API State", link: "/reference/state" },
273274
{ label: "evcc App", slug: "reference/app" },
274275
{
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

screenshot-generator/recipes/utils/evcc.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ const BINARY = "./evcc";
1212

1313
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
1414

15-
export async function start(config, sqlDumps) {
15+
export async function start(config, sqlDumps, flags = []) {
1616
await _clean();
1717
if (sqlDumps) {
1818
await _restoreDatabase(sqlDumps);
1919
}
20-
await _start(config);
20+
await _start(config, flags);
2121
}
2222

2323
export async function stop() {
@@ -49,16 +49,17 @@ async function _restoreDatabase(sqlDumps) {
4949

5050
let instance = null;
5151

52-
async function _start(config) {
52+
async function _start(config, flags = []) {
5353
const configPath =
5454
typeof config === "string"
5555
? `recipes/${config}`
5656
: mergeYaml(`recipes/${config[0]}`, `recipes/${config[1]}`);
5757

58-
console.log("starting evcc", { config });
58+
console.log("starting evcc", { config, flags });
5959
const port = new URL(BASE_URL).port;
60+
const flagArgs = flags.map((flag) => JSON.stringify(flag)).join(" ");
6061
instance = exec(
61-
`EVCC_DATABASE_DSN=${DB_PATH} EVCC_NETWORK_PORT=${port} EVCC_OCPP_PORT=12099 EVCC_EEBUS_PORT=13099 ${BINARY} --config ${configPath}`,
62+
`EVCC_DATABASE_DSN=${DB_PATH} EVCC_NETWORK_PORT=${port} EVCC_OCPP_PORT=12099 EVCC_EEBUS_PORT=13099 ${BINARY} --config ${configPath} ${flagArgs}`,
6263
);
6364
instance.stdout.pipe(process.stdout);
6465
instance.stderr.pipe(process.stderr);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { test } from "@playwright/test";
2+
import { loop } from "./utils/loop";
3+
import { start, stop } from "./utils/evcc";
4+
5+
const BASE_PATH = "reference/screenshots";
6+
7+
test.beforeAll(async () => {
8+
// config is ignored in demo mode but required by the start helper
9+
await start("basics.evcc.yaml", null, [
10+
"--demo",
11+
"--custom-css",
12+
"recipes/white-label.css",
13+
]);
14+
});
15+
16+
test.afterAll(async () => {
17+
await stop();
18+
});
19+
20+
loop((screenshot) => {
21+
test("custom css changes color and font", async ({ page }) => {
22+
await page.goto(`/`);
23+
page.setViewportSize({ width: 1280, height: 680 });
24+
await page.locator(".loadpoint").first().waitFor();
25+
// ensure the Google font is loaded before taking the screenshot
26+
await page.evaluate(() => document.fonts.ready);
27+
28+
await screenshot(page, `${BASE_PATH}/white-label-css`, null, { all: 0 });
29+
});
30+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&display=swap");
2+
3+
:root {
4+
--evcc-dark-green: #22d3ee;
5+
--evcc-darker-green: #0891b2;
6+
--bs-body-font-family: "Space Grotesk", sans-serif;
7+
}

0 commit comments

Comments
 (0)