From f533c6dc8971d27182905440a1f47e37d458cf4f Mon Sep 17 00:00:00 2001 From: zogodo <742782908@qq.com> Date: Fri, 21 Feb 2020 16:44:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=20js=20css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TC1/http_server/app_httpd.c | 40 +- TC1/http_server/web/demo.html | 93 +- TC1/http_server/web/icon.css | 22 + TC1/http_server/web_data.c | 15089 ++++++++++++++++---------------- TC1/main.h | 2 +- 5 files changed, 7649 insertions(+), 7597 deletions(-) create mode 100644 TC1/http_server/web/icon.css diff --git a/TC1/http_server/app_httpd.c b/TC1/http_server/app_httpd.c index c4acc58..f11a81d 100644 --- a/TC1/http_server/app_httpd.c +++ b/TC1/http_server/app_httpd.c @@ -126,45 +126,17 @@ static int HttpGetAssets(httpd_request_t *req) int total_sz = 0; const unsigned char* file_data = NULL; const char* content_type = HTTP_CONTENT_JS_ZIP; - if (strcmp(file_name + 8, "jquery.js") == 0) + if (strcmp(file_name + 8, "js_pack.js") == 0) { - total_sz = sizeof(web_jquery_min_js); - file_data = web_jquery_min_js; + total_sz = sizeof(js_pack); + file_data = js_pack; } - else if (strcmp(file_name + 8, "angular.js") == 0) + else if (strcmp(file_name + 8, "css_pack.css") == 0) { - total_sz = sizeof(web_angular_min_js); - file_data = web_angular_min_js; - } - if (strcmp(file_name + 8, "material.js") == 0) - { - total_sz = sizeof(web_material_min_js); - file_data = web_material_min_js; - } - else if (strcmp(file_name + 8, "styles.css") == 0) - { - total_sz = sizeof(web_styles_css); - file_data = web_styles_css; + total_sz = sizeof(css_pack); + file_data = css_pack; content_type = HTTP_CONTENT_CSS_ZIP; } - else if (strcmp(file_name + 8, "material.css") == 0) - { - total_sz = sizeof(web_material_cyan_light_blue_min_css); - file_data = web_material_cyan_light_blue_min_css; - content_type = HTTP_CONTENT_CSS_ZIP; - } - else if (strcmp(file_name + 8, "roboto.css") == 0) - { - total_sz = sizeof(web_roboto_css); - file_data = web_roboto_css; - content_type = HTTP_CONTENT_CSS_ZIP; - } - //else if (strcmp(file_name + 8, "icon.css") == 0) - //{ - // total_sz = sizeof(web_icon_css); - // file_data = web_icon_css; - // content_type = HTTP_CONTENT_CSS_ZIP; - //} if (total_sz == 0) return err; diff --git a/TC1/http_server/web/demo.html b/TC1/http_server/web/demo.html index bdb7136..90bc948 100644 --- a/TC1/http_server/web/demo.html +++ b/TC1/http_server/web/demo.html @@ -17,10 +17,13 @@ + + + --> +