diff --git a/app.py b/app.py index f5e5a74..a71a12c 100644 --- a/app.py +++ b/app.py @@ -16,9 +16,13 @@ app = Flask(__name__) -# Register all routes defined in the main Blueprint +# Load config settings into Flask's internal config manager properly +app.config.from_object(Config) + +# Register all routes defined in the main Blueprint (This handles your '/' route!) app.register_blueprint(main) + @app.after_request def add_security_headers(response): """Add basic security headers to all responses.""" @@ -35,26 +39,28 @@ def add_security_headers(response): @app.errorhandler(404) def page_not_found(error): """Render a friendly 404 page instead of the raw Flask error.""" - return render_template("404.html", config=Config), 404 + return render_template("404.html", config=app.config), 404 @app.errorhandler(500) def internal_server_error(error): """Render a friendly 500 page for unexpected server errors.""" - return render_template("500.html", config=Config), 500 + return render_template("500.html", config=app.config), 500 @app.errorhandler(405) def method_not_allowed(error): """Render a friendly 405 page when the wrong HTTP method is used.""" - return render_template("405.html", config=Config), 405 + return render_template("405.html", config=app.config), 405 @app.errorhandler(403) def forbidden(error): """Render a friendly 403 page when access is denied.""" - return render_template("403.html", config=Config), 403 + return render_template("403.html", config=app.config), 403 if __name__ == "__main__": + import os debug_mode = os.environ.get("FLASK_DEBUG", "False").lower() in ("true", "1") app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000)), debug=debug_mode) + diff --git a/static/script.js b/static/script.js index 28dbbeb..634afbb 100644 --- a/static/script.js +++ b/static/script.js @@ -231,6 +231,7 @@ function updateProfileWidgets() { } } + function recordSearch() { progress.searches += 1; computeProgressPoints(); @@ -453,6 +454,7 @@ updateProfileWidgets(); return valid; } + function setLoadingState(isLoading) { submitBtn.disabled = isLoading; submitBtn.setAttribute("aria-busy", isLoading ? "true" : "false"); @@ -550,6 +552,7 @@ updateProfileWidgets(); resultsSection.scrollIntoView({ behavior: "smooth" }); } + skillsInput.setAttribute("role", "combobox"); skillsInput.setAttribute("aria-expanded", "false"); suggestions.setAttribute("role", "listbox"); @@ -574,6 +577,7 @@ updateProfileWidgets(); renderSuggestionState(); return; } + if (event.key === "Escape") { hideSuggestions(); return; diff --git a/templates/project.html b/templates/project.html index 86dbf11..2e4f261 100644 --- a/templates/project.html +++ b/templates/project.html @@ -395,8 +395,10 @@