[git commit] httpd_indexcgi.c: minimize style CSS

Denys Vlasenko vda.linux at googlemail.com
Fri Jul 31 15:53:48 UTC 2020


commit: https://git.busybox.net/busybox/commit/?id=197ae0f9ae71c2c313a56f7ce8807411f8a2562a
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Remove new lines \n and some semicolons ;. This minimize page style size from 655 to 604

Signed-off-by: Sergey Ponomarev <stokito at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/httpd_indexcgi.c | 74 ++++++++++++++++++++++-----------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index 562cd7fbe..f5f18959d 100644
--- a/networking/httpd_indexcgi.c
+++ b/networking/httpd_indexcgi.c
@@ -52,43 +52,43 @@ httpd_indexcgi.c -o index.cgi
  * to elements. Edit stylesheet to your liking and recompile. */
 
 #define STYLE_STR \
-"<style>"                                               "\n"\
-"table {"                                               "\n"\
-  "width:100%;"                                         "\n"\
-  "background-color:#fff5ee;"                           "\n"\
-  "border-width:1px;" /* 1px 1px 1px 1px; */            "\n"\
-  "border-spacing:2px;"                                 "\n"\
-  "border-style:solid;" /* solid solid solid solid; */  "\n"\
-  "border-color:black;" /* black black black black; */  "\n"\
-  "border-collapse:collapse;"                           "\n"\
-"}"                                                     "\n"\
-"th {"                                                  "\n"\
-  "border-width:1px;" /* 1px 1px 1px 1px; */            "\n"\
-  "padding:1px;" /* 1px 1px 1px 1px; */                 "\n"\
-  "border-style:solid;" /* solid solid solid solid; */  "\n"\
-  "border-color:black;" /* black black black black; */  "\n"\
-"}"                                                     "\n"\
-"td {"                                                  "\n"\
-             /* top right bottom left */                    \
-  "border-width:0px 1px 0px 1px;"                       "\n"\
-  "padding:1px;" /* 1px 1px 1px 1px; */                 "\n"\
-  "border-style:solid;" /* solid solid solid solid; */  "\n"\
-  "border-color:black;" /* black black black black; */  "\n"\
-  "white-space:nowrap;"                                 "\n"\
-"}"                                                     "\n"\
-"tr.hdr { background-color:#eee5de; }"                  "\n"\
-"tr.o { background-color:#ffffff; }"                    "\n"\
-/* tr.e { ... } - for even rows (currently none) */         \
-"tr.foot { background-color:#eee5de; }"                 "\n"\
-"th.cnt { text-align:left; }"                           "\n"\
-"th.sz { text-align:right; }"                           "\n"\
-"th.dt { text-align:right; }"                           "\n"\
-"td.sz { text-align:right; }"                           "\n"\
-"td.dt { text-align:right; }"                           "\n"\
-"col.nm { width:98%; }"                                 "\n"\
-"col.sz { width:1%; }"                                  "\n"\
-"col.dt { width:1%; }"                                  "\n"\
-"</style>"                                              "\n"\
+"<style>"                                              \
+"table {"                                              \
+  "width:100%;"                                        \
+  "background-color:#fff5ee;"                          \
+  "border-width:1px;" /* 1px 1px 1px 1px; */           \
+  "border-spacing:2px;"                                \
+  "border-style:solid;" /* solid solid solid solid; */ \
+  "border-color:black;" /* black black black black; */ \
+  "border-collapse:collapse"                           \
+"}"                                                    \
+"th {"                                                 \
+  "border-width:1px;" /* 1px 1px 1px 1px; */           \
+  "padding:1px;" /* 1px 1px 1px 1px; */                \
+  "border-style:solid;" /* solid solid solid solid; */ \
+  "border-color:black" /* black black black black; */  \
+"}"                                                    \
+"td {"                                                 \
+             /* top right bottom left */               \
+  "border-width:0 1px 0 1px;"                          \
+  "padding:1px;" /* 1px 1px 1px 1px; */                \
+  "border-style:solid;" /* solid solid solid solid; */ \
+  "border-color:black;" /* black black black black; */ \
+  "white-space:nowrap"                                 \
+"}"                                                    \
+"tr.hdr { background-color:#eee5de }"                  \
+"tr.o { background-color:#ffffff }"                    \
+/* tr.e { ... } - for even rows (currently none) */    \
+"tr.foot { background-color:#eee5de }"                 \
+"th.cnt { text-align:left }"                           \
+"th.sz { text-align:right }"                           \
+"th.dt { text-align:right }"                           \
+"td.sz { text-align:right }"                           \
+"td.dt { text-align:right }"                           \
+"col.nm { width:98% }"                                 \
+"col.sz { width:1% }"                                  \
+"col.dt { width:1% }"                                  \
+"</style>"                                             \
 
 typedef struct dir_list_t {
 	char  *dl_name;


More information about the busybox-cvs mailing list