diff --git a/routes/main_routes.py b/routes/main_routes.py index 658553ef..9bd5ffe4 100644 --- a/routes/main_routes.py +++ b/routes/main_routes.py @@ -33,6 +33,11 @@ def index(): stats = get_project_stats() return render_template("index.html", stats=stats) +@main.route("/contact") +def contact(): + """Render the Contact Us page.""" + return render_template("contact.html") + @main.route("/health") def health_check(): """ diff --git a/static/script.js b/static/script.js index 337fae1e..93271b99 100644 --- a/static/script.js +++ b/static/script.js @@ -731,16 +731,10 @@ if (clearFiltersBtn) { renderResults(data.projects || [], data.message); }) .catch(function () { - setLoadingState(false); - //combine form values into an object to send to server/api - var payload = { - // Prefer the hidden input value; fall back to raw text box if hidden input is empty - skills: skillsHidden.value.trim() || skillsTextInput.value.trim(), - level: document.getElementById("level").value, - interest: document.getElementById("interest").value, - time: document.getElementById("time").value - }; + showError("A network error occurred. Please try again."); + }); + }); }); // Manages the loading state of the form and results section(whats visible or not) @@ -778,12 +772,6 @@ if (clearFiltersBtn) { // Clear out any cards from a previous search before showing new ones resultsGrid.innerHTML = ""; - if (!projects || projects.length === 0) { - resultsGrid.style.display = "none"; - resultsEmptyEl.style.display = "block"; - resultsGrid.style.display = "none"; - resultsEmptyEl.style.display = "block"; - if (message && emptyMessageEl) emptyMessageEl.textContent = message; if (!projects || projects.length === 0) { //if no projects returned from api, show the "no results" message and hide the grid resultsGrid.style.display = "none"; resultsEmptyEl.style.display = "block"; @@ -1130,8 +1118,6 @@ if ( fetchBtn.textContent = 'Fetch Skills'; } }); -} - } // end github modal handlers /* ---- Scroll-to-top button ---- */ diff --git a/templates/contact.html b/templates/contact.html new file mode 100644 index 00000000..4412bd79 --- /dev/null +++ b/templates/contact.html @@ -0,0 +1,263 @@ + + + + + + + Contact Us — DevPath + + + + + + + + + + +
+ +
+ +
+ +

Contact Us

+ +

+ Have questions, suggestions, or want to contribute to DevPath? + Connect with the community and help improve the platform. +

+ +
+ +
+ +
+ +
+ 💻 +
+ +

GitHub Repository

+ +

+ Explore the project source code, contribute features, + and collaborate with contributors. +

+ + + Visit GitHub + + +
+ +
+ +
+ 🐛 +
+ +

Report Issues

+ +

+ Found a bug or have a feature request? + Open an issue and help improve DevPath. +

+ + + Open Issues + + +
+ +
+ +
+ 🚀 +
+ +

Community Support

+ +

+ Join the open-source community and connect + with other developers and contributors. +

+ + + Join Community + + +
+ +
+ +
+ +
+ + + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 9bd276b2..b19bf6a8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -25,6 +25,7 @@