| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Recommendations - BookNest</title> |
| <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}"> |
| |
| <link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet"> |
| </head> |
| <body class="index-page"> |
| |
| {% include 'navbar.html' %} |
|
|
| |
| {% with messages = get_flashed_messages(with_categories=true) %} |
| {% if messages %} |
| <div class="flash-messages"> |
| {% for category, message in messages %} |
| <div class="alert alert-{{ category }}">{{ message }}</div> |
| {% endfor %} |
| </div> |
| {% endif %} |
| {% endwith %} |
|
|
| |
| <div class="container"> |
| <h1>Get Book Recommendations</h1> |
| <form action="{{ url_for('index') }}" method="POST" class="auth-form"> |
| <label for="book1">Book 1:</label> |
| <input type="text" name="book1" id="book1" placeholder="Enter book title" required> |
|
|
| <label for="book2">Book 2:</label> |
| <input type="text" name="book2" id="book2" placeholder="Enter book title"> |
|
|
| <label for="book3">Book 3:</label> |
| <input type="text" name="book3" id="book3" placeholder="Enter book title"> |
|
|
| <button type="submit">Get Recommendations</button> |
| </form> |
| </div> |
|
|
| |
| {% if recommendations %} |
| <div class="container"> |
| <h2>Recommended Books:</h2> |
| <div class="recommendations"> |
| {% for book in recommendations %} |
| <div class="book-card"> |
| <img src="{{ book.image_url }}" alt="{{ book.title }}" class="book-image"> |
| <h3>{{ book.title }}</h3> |
| <p><strong>Authors:</strong> {{ book.authors | join(', ') }}</p> |
| <a href="{{ url_for('book_detail', title=book.title|url_encode) }}" class="btn">View Details</a> |
| </div> |
| {% endfor %} |
| </div> |
| </div> |
| {% endif %} |
|
|
| |
| {% include 'footer.html' %} |
| </body> |
| </html> |