From 14793c25942f2addab4940d5b8596a9c218c8b56 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:44:59 +0100 Subject: [PATCH] Shorten code and add more comments --- tasmota/tasmota_support/settings.ino | 2 +- .../tasmota_xdrv_driver/xdrv_01_9_webserver.ino | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tasmota/tasmota_support/settings.ino b/tasmota/tasmota_support/settings.ino index fd4c45708..254a0476d 100644 --- a/tasmota/tasmota_support/settings.ino +++ b/tasmota/tasmota_support/settings.ino @@ -1764,7 +1764,7 @@ void SettingsDelta(void) { } #if (LANGUAGE_LCID == 1049) if (Settings->version < 0x0D020003) { // 13.2.0.3 - SettingsUpdateText(SET_CANVAS, PSTR("linear-gradient(#FF0018 7%,#FFA52C,#FFFF41,#008018,#0000F9,#86007D 93%)")); + SettingsUpdateText(SET_CANVAS, PSTR("linear-gradient(#F02 7%,#F93,#FF4,#082,#00F,#708 93%)")); } #endif diff --git a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino index fccc1ad0e..7558245b3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino @@ -3772,13 +3772,18 @@ void CmndWebButton(void) void CmndWebCanvas(void) { /* - WebCanvas allows GUI body canvas configuration using either "url" or "gradient". + WebCanvas allows GUI body canvas configuration using a color, "url" or "gradient". The provided text overrules the body CSS background property "body{background: 0 0 / cover no-repeat fixed;}" - - WebCanvas " // Reset canvas - - WebCanvas 0 // Reset canvas - - WebCanvas linear-gradient(#FF0018 7%,#FFA52C,#FFFF41,#008018,#0000F9,#86007D 93%) // Gradient pride flag - - WebCanvas linear-gradient(#FF0018 16%,#FFA52C 16% 33%,#FFFF41 33% 50%,#008018 50% 67%,#0000F9 67% 84%,#86007D 84%) // Pride flag - - WebCanvas url(http://ota.tasmota.com/tasmota/images/prf.png) // Pride flag + - WebCanvas " // Set canvas to WebColor2 + - WebCanvas 0 // Set canvas to WebColor2 + - WebCanvas red // Red canvas + - WebCanvas linear-gradient(#F02 7%,#F93,#FF4,#082,#00F,#708 93%) // Gradient pride flag + - WebCanvas linear-gradient(#F02 16%,#F93 16% 33%,#FF4 33% 50%,#082 50% 67%,#00F 67% 84%,#708 84%) // Pride flag + - WebCanvas linear-gradient(90deg,#05A 33%,#FFF 33% 67%,#F43 67%) // Flag France + - WebCanvas linear-gradient(#FFF 33%,#07D 33% 67%,#F34 67%) // Flag The Netherlands + - WebCanvas linear-gradient(#05B 50%,#FD0 50%) // Flag Ukraine + - WebCanvas linear-gradient(#FFF 33%,#07D 33% 67%,#F34 67%) // Flag Russia + - WebCanvas url(http://ota.tasmota.com/tasmota/images/prf.png) // Pride flag - WebCanvas url(http://ota.tasmota.com/tasmota/images/tasmota_logo.png) // Tasmota logo */ if (XdrvMailbox.data_len > 0) {