Skip to content

Commit 934c2a3

Browse files
committed
Add modern theme & refactor content generator
Introduce a new 'modern' UI/content set and reorganize content handling. Makefile: add common/include and lib-remoteconfig includes, introduce CONTENT variable, pixeltype target (parse_pixeltype.py) and run generate_content with the selected directory. generate_content.cpp: refactor and extend feature guard system (many new guards for node/output features), improve file path handling, content-type logic, and H-file conversion; add support for multiple content directories (e.g. light/ and modern/). content.h: reorder and update includes and file table entries to match the reorganized content. Remove legacy DSA files and add many modern/ content assets (HTML/JS/CSS/json) and pixeltype.json for the modern/light content sets.
1 parent 6f1bf01 commit 934c2a3

57 files changed

Lines changed: 3055 additions & 283 deletions

Some content is hidden

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

lib-remoteconfig/http/content/Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@ LD = $(PREFIX)ld
77
AR = $(PREFIX)ar
88

99
ROOT = ./../../..
10-
INCLUDES := -I$(ROOT)/lib-httpd/include -I$(ROOT)/lib-hal/include -I$(ROOT)/lib-network/include
10+
INCLUDES := -I$(ROOT)/common/include -I$(ROOT)/lib-remoteconfig/include -I$(ROOT)/lib-hal/include -I$(ROOT)/lib-network/include
1111
COPS := -std=c++20 -Wall -Werror
1212

13+
CONTENT ?= light
14+
1315
all : content
1416

1517
clean :
1618
rm -rf generate_content
1719
rm -rf *.h
20+
rm -rf ._*.*
21+
rm -rf ._*
1822

1923
generate_content : Makefile generate_content.cpp
20-
$(CPP) generate_content.cpp $(INCLUDES) $(COPS) -o generate_content
24+
$(CPP) generate_content.cpp $(INCLUDES) $(COPS) -o generate_content
25+
26+
pixeltype : $(ROOT)/lib-pixel/include/pixeltype.h
27+
./parse_pixeltype.py $(ROOT)/lib-pixel/include/pixeltype.h -o pixeltype.json
2128

22-
content : generate_content
23-
./generate_content
29+
content : generate_content pixeltype
30+
@echo "Running with directory $(CONTENT)"
31+
./generate_content $(CONTENT)

lib-remoteconfig/http/content/content.h

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@
55
#include "httpd/httpd.h"
66
#if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
77
#include "dmx.js.h"
8-
#endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */
8+
#endif // !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
9+
#include "index.html.h"
10+
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER) || defined (RDM_RESPONDER))
11+
#include "rdm.html.h"
12+
#endif // !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER || defined (RDM_RESPONDER))
13+
#include "styles.css.h"
14+
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
15+
#include "time.js.h"
16+
#endif // !defined (CONFIG_HTTP_HTML_NO_TIME)
917
#if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
1018
#include "rtc.html.h"
11-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */
12-
#include "static.js.h"
13-
#include "styles.css.h"
19+
#endif // !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
1420
#include "index.js.h"
15-
#include "date.js.h"
21+
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
22+
#include "time.html.h"
23+
#endif // !defined (CONFIG_HTTP_HTML_NO_TIME)
24+
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER) || defined (RDM_RESPONDER))
25+
#include "rdm.js.h"
26+
#endif // !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER || defined (RDM_RESPONDER))
27+
#if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
28+
#include "dmx.html.h"
29+
#endif // !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
1630
#if defined (NODE_SHOWFILE)
1731
#include "showfile.html.h"
18-
#endif /* (NODE_SHOWFILE) */
32+
#endif // (NODE_SHOWFILE)
33+
#include "date.js.h"
1934
#include "default.js.h"
20-
#if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
21-
#include "rtc.js.h"
22-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */
23-
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER)
24-
#include "rdm.js.h"
25-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */
26-
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
27-
#include "time.js.h"
28-
#endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */
2935
#if !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI))
3036
#include "pixeltype.json.h"
31-
#endif /* !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI)) */
32-
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER)
33-
#include "rdm.html.h"
34-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */
35-
#include "index.html.h"
37+
#endif // !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI))
3638
#if defined (NODE_SHOWFILE)
3739
#include "showfile.js.h"
38-
#endif /* (NODE_SHOWFILE) */
39-
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
40-
#include "time.html.h"
41-
#endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */
42-
#if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
43-
#include "dmx.html.h"
44-
#endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */
40+
#endif // (NODE_SHOWFILE)
41+
#include "static.js.h"
42+
#if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
43+
#include "rtc.js.h"
44+
#endif // !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
4545

4646
struct FilesContent {
4747
uint32_t hash;
@@ -54,43 +54,43 @@ struct FilesContent {
5454
inline constexpr struct FilesContent kHttpContent[] = {
5555
#if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
5656
{ 449885855,"dmx.js", dmx_js, 1357, static_cast<http::ContentTypes>(2) },
57-
#endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */
57+
#endif // !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
58+
{ 4024653090,"index.html", index_html, 669, static_cast<http::ContentTypes>(0) },
59+
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER) || defined (RDM_RESPONDER))
60+
{ 3794898249,"rdm.html", rdm_html, 1142, static_cast<http::ContentTypes>(0) },
61+
#endif // !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER || defined (RDM_RESPONDER))
62+
{ 2557875310,"styles.css", styles_css, 409, static_cast<http::ContentTypes>(1) },
63+
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
64+
{ 1797555997,"time.js", time_js, 402, static_cast<http::ContentTypes>(2) },
65+
#endif // !defined (CONFIG_HTTP_HTML_NO_TIME)
5866
#if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
5967
{ 4194541735,"rtc.html", rtc_html, 1013, static_cast<http::ContentTypes>(0) },
60-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */
61-
{ 2932864356,"static.js", static_js, 1252, static_cast<http::ContentTypes>(2) },
62-
{ 2557875310,"styles.css", styles_css, 409, static_cast<http::ContentTypes>(1) },
68+
#endif // !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
6369
{ 247271700,"index.js", index_js, 1168, static_cast<http::ContentTypes>(2) },
64-
{ 1602327546,"date.js", date_js, 716, static_cast<http::ContentTypes>(2) },
70+
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
71+
{ 3879424355,"time.html", time_html, 599, static_cast<http::ContentTypes>(0) },
72+
#endif // !defined (CONFIG_HTTP_HTML_NO_TIME)
73+
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER) || defined (RDM_RESPONDER))
74+
{ 3336539475,"rdm.js", rdm_js, 1001, static_cast<http::ContentTypes>(2) },
75+
#endif // !defined (CONFIG_HTTP_HTML_NO_RDM) && (defined (RDM_CONTROLLER || defined (RDM_RESPONDER))
76+
#if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
77+
{ 1521353325,"dmx.html", dmx_html, 538, static_cast<http::ContentTypes>(0) },
78+
#endif // !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
6579
#if defined (NODE_SHOWFILE)
6680
{ 92830953,"showfile.html", showfile_html, 1386, static_cast<http::ContentTypes>(0) },
67-
#endif /* (NODE_SHOWFILE) */
81+
#endif // (NODE_SHOWFILE)
82+
{ 1602327546,"date.js", date_js, 716, static_cast<http::ContentTypes>(2) },
6883
{ 135667591,"default.js", default_js, 261, static_cast<http::ContentTypes>(2) },
69-
#if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
70-
{ 2872131065,"rtc.js", rtc_js, 843, static_cast<http::ContentTypes>(2) },
71-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */
72-
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER)
73-
{ 3336539475,"rdm.js", rdm_js, 1001, static_cast<http::ContentTypes>(2) },
74-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */
75-
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
76-
{ 1797555997,"time.js", time_js, 402, static_cast<http::ContentTypes>(2) },
77-
#endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */
7884
#if !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI))
7985
{ 2632765249,"pixeltype.json", pixeltype_json, 1665, static_cast<http::ContentTypes>(3) },
80-
#endif /* !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI)) */
81-
#if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER)
82-
{ 3794898249,"rdm.html", rdm_html, 1142, static_cast<http::ContentTypes>(0) },
83-
#endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */
84-
{ 4024653090,"index.html", index_html, 669, static_cast<http::ContentTypes>(0) },
86+
#endif // !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI))
8587
#if defined (NODE_SHOWFILE)
8688
{ 4266521075,"showfile.js", showfile_js, 1425, static_cast<http::ContentTypes>(2) },
87-
#endif /* (NODE_SHOWFILE) */
88-
#if !defined (CONFIG_HTTP_HTML_NO_TIME)
89-
{ 3879424355,"time.html", time_html, 599, static_cast<http::ContentTypes>(0) },
90-
#endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */
91-
#if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI))
92-
{ 1521353325,"dmx.html", dmx_html, 538, static_cast<http::ContentTypes>(0) },
93-
#endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */
89+
#endif // (NODE_SHOWFILE)
90+
{ 2932864356,"static.js", static_js, 1252, static_cast<http::ContentTypes>(2) },
91+
#if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
92+
{ 2872131065,"rtc.js", rtc_js, 843, static_cast<http::ContentTypes>(2) },
93+
#endif // !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC)
9494
};
9595

9696

lib-remoteconfig/http/content/dsa.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

lib-remoteconfig/http/content/dsa.html.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

lib-remoteconfig/http/content/dsa.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

lib-remoteconfig/http/content/dsa.js.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)