From 11e4b78c70cb47896d4dd770f583eda7ebd89fcb Mon Sep 17 00:00:00 2001 From: Stefan Ostermann Date: Sun, 26 Nov 2023 22:09:57 +0100 Subject: [PATCH] utf-8, css --- src/WebContent.h | 5 +++-- src/css.h | 1 + src/main.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/WebContent.h b/src/WebContent.h index 9fd646f..ee98487 100644 --- a/src/WebContent.h +++ b/src/WebContent.h @@ -4,10 +4,11 @@ const char index_html[] PROGMEM = R"rawliteral( HannaBox + -

HannaBox

+

🎵 HannaBox 🎵





@@ -36,7 +37,7 @@ const char index_html[] PROGMEM = R"rawliteral( -->

-

Inhalt

+

🎶 Playlist 🎶

%DIRECTORY%

diff --git a/src/css.h b/src/css.h index bda6086..128a16b 100644 --- a/src/css.h +++ b/src/css.h @@ -9,6 +9,7 @@ body { li { cursor: pointer; + list-style-type: none; } .play-button, .next-button, .prev-button { diff --git a/src/main.cpp b/src/main.cpp index bd60c2a..0b1bb5f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -469,7 +469,7 @@ void setup() if (wifiManager.autoConnect("HannaBox")) { server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) - { request->send_P(200, "text/html", index_html, processor); }); + { request->send_P(200, "text/html charset=UTF-8", index_html, processor); }); server.on("/style.css", HTTP_GET, [](AsyncWebServerRequest *request) { request->send_P(200, "text/css", css); }); @@ -477,18 +477,18 @@ void setup() server.on("/state", HTTP_GET, [](AsyncWebServerRequest *request) { String state = getState(); - request->send(200, "application/json", state.c_str()); }); + request->send(200, "application/json charset=UTF-8", state.c_str()); }); server.on("/start", HTTP_GET, [](AsyncWebServerRequest *request) { - request->send(200, "text/plain", "start"); + request->send(200, "text/plain charset=UTF-8", "start"); start(); }); server.on("/toggleplaypause", HTTP_GET, [](AsyncWebServerRequest *request) { - request->send(200, "text/plain", "toggleplaypause"); + request->send(200, "text/plain charset=UTF-8", "toggleplaypause"); togglePlayPause(); }); server.on("/stop", HTTP_GET, [](AsyncWebServerRequest *request)