Skip to content

Commit

Permalink
Resolved transition error from landing to search page
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi2019194 committed Oct 16, 2023
1 parent a48f92a commit 37e083e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/recommenderapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ def landing_page():
return render_template("landing_page.html")


@app.route("/get_started", methods=["POST"])
def get_started():
"""
Handle the Get Started button click and redirect to search_page.
"""
return redirect(url_for("search_page.html"))


@app.route("/search_page")
def search_page():
"""
Expand Down
11 changes: 11 additions & 0 deletions src/recommenderapp/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ $(document).ready(function () {
});
});

// Function to handle Get Started button click
function getStarted() {
// Navigate to the search page
window.location.href = "/search_page"; // Replace with the actual URL of your search page
}

// Bind the getStarted function to the Get Started button click
$("#getStartedButton").click(function () {
getStarted();
});

var FeedbackData;

$("#feedback").click(function () {
Expand Down
4 changes: 2 additions & 2 deletions src/recommenderapp/templates/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ <h2><center>🎬 PopcornPicks: Pick a Movie! 🎬</center></h2>
<br>
Enjoy movies at your own pace, on your terms.
</p>
<a href="search_page.html" class="btn btn-primary mx-auto">Get Started!</a>

<!-- Add the Get Started button here -->
<button id="getStartedButton" onclick="getStarted()" class="btn btn-primary">Get Started</button>
<p style="text-align: center; color: azure; font-size: 16px;"><br><br><br><br><br><br><br><br>
Made with ❤️ by <a href="https://github.com/adipai/PopcornPicks" target="_blank">PopcornPicks</a><br>
<a href="https://github.com/adipai/PopcornPicks/blob/master/LICENSE.md" target="_blank">MIT License Copyright (c) 2023 PopcornPicks</a>
Expand Down

0 comments on commit 37e083e

Please sign in to comment.