From 6a074e339287849303008ca268f13c17d4e56845 Mon Sep 17 00:00:00 2001 From: HKUbooker Date: Wed, 21 Feb 2024 01:52:53 +0800 Subject: [PATCH 1/5] Version update Implemented React + flask version of solution. --- .gitignore | 1 + WebUI/JinJa2_version/.flaskenv | 1 + WebUI/{ => JinJa2_version}/app.py | 1 + WebUI/{ => JinJa2_version}/app_backup.py | 0 WebUI/{ => JinJa2_version}/static/footer.css | 0 WebUI/{ => JinJa2_version}/static/header.css | 0 WebUI/{ => JinJa2_version}/static/home.css | 0 .../static/imgs/login.png | Bin .../static/imgs/login2.png | Bin WebUI/{ => JinJa2_version}/static/login.css | 0 WebUI/{ => JinJa2_version}/static/root.css | 0 WebUI/{ => JinJa2_version}/static/search.css | 0 .../static/video/test_video.mp4 | Bin .../{ => JinJa2_version}/templates/about.html | 0 .../templates/footer.html | 2 +- .../templates/header.html | 6 +- .../{ => JinJa2_version}/templates/home.html | 0 .../{ => JinJa2_version}/templates/login.html | 0 .../{ => JinJa2_version}/templates/root.html | 0 .../templates/search.html | 2 +- .../find-my-prof-web/public/favicon.ico | Bin 3870 -> 0 bytes .../find-my-prof-web/public/logo192.png | Bin 5347 -> 0 bytes .../find-my-prof-web/public/logo512.png | Bin 9664 -> 0 bytes .../find-my-prof-web/public/manifest.json | 25 - .../find-my-prof-web/public/robots.txt | 3 - .../find-my-prof-web/src/App.css | 229 ------- .../React version/find-my-prof-web/src/App.js | 83 --- .../find-my-prof-web/src/index.css | 0 .../find-my-prof-web/src/logo.svg | 1 - .../find-my-prof}/.flaskenv | 0 .../find-my-prof}/.gitignore | 0 .../find-my-prof}/README.md | 0 .../__pycache__/portal.cpython-38.pyc | Bin 0 -> 988 bytes WebUI/React_version/find-my-prof/app.py | 68 +++ .../React_version/find-my-prof/dev_notes.txt | 19 + .../find-my-prof}/package-lock.json | 577 +++++++++++------- .../find-my-prof}/package.json | 3 +- .../find-my-prof}/public/index.html | 7 +- .../find-my-prof/public/static/imgs/login.png | Bin 0 -> 379243 bytes .../public/static/imgs/login2.png | Bin 0 -> 134619 bytes .../public/static/video/test_video.mp4 | Bin 0 -> 518770 bytes .../find-my-prof}/src/App.test.js | 0 .../find-my-prof/src/css/Home.css | 186 ++++++ .../find-my-prof/src/css/Search.css | 222 +++++++ .../find-my-prof/src/css/basic.css | 67 ++ .../find-my-prof/src/css/index.css | 19 + .../find-my-prof}/src/index.js | 6 +- .../React_version/find-my-prof/src/js/Home.js | 80 +++ .../find-my-prof/src/js/Search.js | 117 ++++ .../find-my-prof/src/js/basic.js | 31 + .../find-my-prof}/src/reportWebVitals.js | 0 .../find-my-prof}/src/setupTests.js | 0 .../find-my-prof/static/css/main.ae1d3faf.css | 2 + .../static/css/main.ae1d3faf.css.map | 1 + .../find-my-prof/static/imgs/login.png | Bin 0 -> 379243 bytes .../find-my-prof/static/imgs/login2.png | Bin 0 -> 134619 bytes .../static/js/453.8ac75e00.chunk.js | 2 + .../static/js/453.8ac75e00.chunk.js.map | 1 + .../find-my-prof/static/js/main.8f936f7d.js | 3 + .../static/js/main.8f936f7d.js.LICENSE.txt | 39 ++ .../static/js/main.8f936f7d.js.map | 1 + .../find-my-prof/static/video/test_video.mp4 | Bin 0 -> 518770 bytes .../templates/asset-manifest.json | 15 + .../find-my-prof/templates/index.html | 1 + WebUI/{static => }/docs/0_2.webp | Bin ...velopment _ by Sofia Katzman _ Medium.pdf" | Bin test.py | 13 + 67 files changed, 1247 insertions(+), 587 deletions(-) create mode 100644 .gitignore create mode 100644 WebUI/JinJa2_version/.flaskenv rename WebUI/{ => JinJa2_version}/app.py (93%) rename WebUI/{ => JinJa2_version}/app_backup.py (100%) rename WebUI/{ => JinJa2_version}/static/footer.css (100%) rename WebUI/{ => JinJa2_version}/static/header.css (100%) rename WebUI/{ => JinJa2_version}/static/home.css (100%) rename WebUI/{ => JinJa2_version}/static/imgs/login.png (100%) rename WebUI/{ => JinJa2_version}/static/imgs/login2.png (100%) rename WebUI/{ => JinJa2_version}/static/login.css (100%) rename WebUI/{ => JinJa2_version}/static/root.css (100%) rename WebUI/{ => JinJa2_version}/static/search.css (100%) rename WebUI/{ => JinJa2_version}/static/video/test_video.mp4 (100%) rename WebUI/{ => JinJa2_version}/templates/about.html (100%) rename WebUI/{ => JinJa2_version}/templates/footer.html (64%) rename WebUI/{ => JinJa2_version}/templates/header.html (51%) rename WebUI/{ => JinJa2_version}/templates/home.html (100%) rename WebUI/{ => JinJa2_version}/templates/login.html (100%) rename WebUI/{ => JinJa2_version}/templates/root.html (100%) rename WebUI/{ => JinJa2_version}/templates/search.html (97%) delete mode 100644 WebUI/React version/find-my-prof-web/public/favicon.ico delete mode 100644 WebUI/React version/find-my-prof-web/public/logo192.png delete mode 100644 WebUI/React version/find-my-prof-web/public/logo512.png delete mode 100644 WebUI/React version/find-my-prof-web/public/manifest.json delete mode 100644 WebUI/React version/find-my-prof-web/public/robots.txt delete mode 100644 WebUI/React version/find-my-prof-web/src/App.css delete mode 100644 WebUI/React version/find-my-prof-web/src/App.js delete mode 100644 WebUI/React version/find-my-prof-web/src/index.css delete mode 100644 WebUI/React version/find-my-prof-web/src/logo.svg rename WebUI/{ => React_version/find-my-prof}/.flaskenv (100%) rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/.gitignore (100%) rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/README.md (100%) create mode 100644 WebUI/React_version/find-my-prof/__pycache__/portal.cpython-38.pyc create mode 100644 WebUI/React_version/find-my-prof/app.py create mode 100644 WebUI/React_version/find-my-prof/dev_notes.txt rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/package-lock.json (97%) rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/package.json (92%) rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/public/index.html (87%) create mode 100644 WebUI/React_version/find-my-prof/public/static/imgs/login.png create mode 100644 WebUI/React_version/find-my-prof/public/static/imgs/login2.png create mode 100644 WebUI/React_version/find-my-prof/public/static/video/test_video.mp4 rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/src/App.test.js (100%) create mode 100644 WebUI/React_version/find-my-prof/src/css/Home.css create mode 100644 WebUI/React_version/find-my-prof/src/css/Search.css create mode 100644 WebUI/React_version/find-my-prof/src/css/basic.css create mode 100644 WebUI/React_version/find-my-prof/src/css/index.css rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/src/index.js (87%) create mode 100644 WebUI/React_version/find-my-prof/src/js/Home.js create mode 100644 WebUI/React_version/find-my-prof/src/js/Search.js create mode 100644 WebUI/React_version/find-my-prof/src/js/basic.js rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/src/reportWebVitals.js (100%) rename WebUI/{React version/find-my-prof-web => React_version/find-my-prof}/src/setupTests.js (100%) create mode 100644 WebUI/React_version/find-my-prof/static/css/main.ae1d3faf.css create mode 100644 WebUI/React_version/find-my-prof/static/css/main.ae1d3faf.css.map create mode 100644 WebUI/React_version/find-my-prof/static/imgs/login.png create mode 100644 WebUI/React_version/find-my-prof/static/imgs/login2.png create mode 100644 WebUI/React_version/find-my-prof/static/js/453.8ac75e00.chunk.js create mode 100644 WebUI/React_version/find-my-prof/static/js/453.8ac75e00.chunk.js.map create mode 100644 WebUI/React_version/find-my-prof/static/js/main.8f936f7d.js create mode 100644 WebUI/React_version/find-my-prof/static/js/main.8f936f7d.js.LICENSE.txt create mode 100644 WebUI/React_version/find-my-prof/static/js/main.8f936f7d.js.map create mode 100644 WebUI/React_version/find-my-prof/static/video/test_video.mp4 create mode 100644 WebUI/React_version/find-my-prof/templates/asset-manifest.json create mode 100644 WebUI/React_version/find-my-prof/templates/index.html rename WebUI/{static => }/docs/0_2.webp (100%) rename "WebUI/static/docs/Business in the Front, Party in the Back\342\200\224 Combining Flask and React for Full-Stack Web Development _ by Sofia Katzman _ Medium.pdf" => "WebUI/docs/Business in the Front, Party in the Back\342\200\224 Combining Flask and React for Full-Stack Web Development _ by Sofia Katzman _ Medium.pdf" (100%) create mode 100644 test.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/WebUI/JinJa2_version/.flaskenv b/WebUI/JinJa2_version/.flaskenv new file mode 100644 index 0000000..2f7252c --- /dev/null +++ b/WebUI/JinJa2_version/.flaskenv @@ -0,0 +1 @@ +FLASK_ENV = 'development' diff --git a/WebUI/app.py b/WebUI/JinJa2_version/app.py similarity index 93% rename from WebUI/app.py rename to WebUI/JinJa2_version/app.py index 62d0b14..711d926 100644 --- a/WebUI/app.py +++ b/WebUI/JinJa2_version/app.py @@ -1,6 +1,7 @@ from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) +# app.config['STATIC_FOLDER'] = 'templates/build/static' @app.route("/hi") def hello_world(): diff --git a/WebUI/app_backup.py b/WebUI/JinJa2_version/app_backup.py similarity index 100% rename from WebUI/app_backup.py rename to WebUI/JinJa2_version/app_backup.py diff --git a/WebUI/static/footer.css b/WebUI/JinJa2_version/static/footer.css similarity index 100% rename from WebUI/static/footer.css rename to WebUI/JinJa2_version/static/footer.css diff --git a/WebUI/static/header.css b/WebUI/JinJa2_version/static/header.css similarity index 100% rename from WebUI/static/header.css rename to WebUI/JinJa2_version/static/header.css diff --git a/WebUI/static/home.css b/WebUI/JinJa2_version/static/home.css similarity index 100% rename from WebUI/static/home.css rename to WebUI/JinJa2_version/static/home.css diff --git a/WebUI/static/imgs/login.png b/WebUI/JinJa2_version/static/imgs/login.png similarity index 100% rename from WebUI/static/imgs/login.png rename to WebUI/JinJa2_version/static/imgs/login.png diff --git a/WebUI/static/imgs/login2.png b/WebUI/JinJa2_version/static/imgs/login2.png similarity index 100% rename from WebUI/static/imgs/login2.png rename to WebUI/JinJa2_version/static/imgs/login2.png diff --git a/WebUI/static/login.css b/WebUI/JinJa2_version/static/login.css similarity index 100% rename from WebUI/static/login.css rename to WebUI/JinJa2_version/static/login.css diff --git a/WebUI/static/root.css b/WebUI/JinJa2_version/static/root.css similarity index 100% rename from WebUI/static/root.css rename to WebUI/JinJa2_version/static/root.css diff --git a/WebUI/static/search.css b/WebUI/JinJa2_version/static/search.css similarity index 100% rename from WebUI/static/search.css rename to WebUI/JinJa2_version/static/search.css diff --git a/WebUI/static/video/test_video.mp4 b/WebUI/JinJa2_version/static/video/test_video.mp4 similarity index 100% rename from WebUI/static/video/test_video.mp4 rename to WebUI/JinJa2_version/static/video/test_video.mp4 diff --git a/WebUI/templates/about.html b/WebUI/JinJa2_version/templates/about.html similarity index 100% rename from WebUI/templates/about.html rename to WebUI/JinJa2_version/templates/about.html diff --git a/WebUI/templates/footer.html b/WebUI/JinJa2_version/templates/footer.html similarity index 64% rename from WebUI/templates/footer.html rename to WebUI/JinJa2_version/templates/footer.html index 2e632dd..a8f36ee 100644 --- a/WebUI/templates/footer.html +++ b/WebUI/JinJa2_version/templates/footer.html @@ -1,5 +1,5 @@ - +