Updates
This commit is contained in:
parent
e86ab53de5
commit
095bf52a2f
29 changed files with 2494 additions and 758 deletions
|
@ -1,43 +1,65 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Search for Podcasts{% endblock %}
|
||||
{% block title %}Add New Podcast{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="search">
|
||||
<h2>Search for Podcasts</h2>
|
||||
<!-- Page Header -->
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">Add New Podcast</h1>
|
||||
</div>
|
||||
|
||||
<form method="post" class="search-form">
|
||||
<!-- Search Form -->
|
||||
<div class="form-container">
|
||||
<form action="{{ url_for('podcasts.search') }}" method="post">
|
||||
<div class="form-group">
|
||||
<input type="text" name="query" id="query" placeholder="Enter podcast name or keywords" required>
|
||||
<button type="submit" class="btn">Search</button>
|
||||
<label for="query">Search for podcasts:</label>
|
||||
<input type="text" id="query" name="query" value="{{ request.form.get('query', '') }}"
|
||||
placeholder="Enter podcast name, author, or keywords..." required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Search Results -->
|
||||
{% if results %}
|
||||
<div class="content-area">
|
||||
<div style="padding: 16px; border-bottom: 1px solid #30363d; background-color: #161b22;">
|
||||
<h3 style="color: #f0f6fc; margin: 0; font-size: 14px;">Search Results ({{ results|length }})</h3>
|
||||
</div>
|
||||
|
||||
{% if results %}
|
||||
<div class="search-results">
|
||||
<h3>Search Results</h3>
|
||||
<div class="podcast-grid">
|
||||
{% for podcast in results %}
|
||||
<div class="podcast-card">
|
||||
{% if podcast.image_url %}
|
||||
<img src="{{ podcast.image_url }}" alt="{{ podcast.title }}">
|
||||
{% for result in results %}
|
||||
<div class="search-result-item">
|
||||
<div class="search-result-image">
|
||||
{% if result.image_url %}
|
||||
<img src="{{ result.image_url }}" alt="{{ result.title }}">
|
||||
{% else %}
|
||||
<div class="no-image">No Image</div>
|
||||
No Image
|
||||
{% endif %}
|
||||
<h4>{{ podcast.title }}</h4>
|
||||
<p class="author">{{ podcast.author }}</p>
|
||||
<p class="genre">{{ podcast.genre }}</p>
|
||||
<form action="{{ url_for('podcasts.add', podcast_id=podcast.external_id) }}" method="post">
|
||||
<button type="submit" class="btn">Add to Library</button>
|
||||
</div>
|
||||
<div class="search-result-info">
|
||||
<div class="search-result-title">{{ result.title }}</div>
|
||||
<div class="search-result-author">{{ result.author or 'Unknown Author' }}</div>
|
||||
{% if result.description %}
|
||||
<div class="search-result-description">{{ result.description }}</div>
|
||||
{% endif %}
|
||||
{% if result.genre %}
|
||||
<div style="font-size: 10px; color: #7d8590; margin-top: 4px;">Genre: {{ result.genre }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="search-result-actions">
|
||||
<form action="{{ url_for('podcasts.add', podcast_id=result.external_id) }}" method="post">
|
||||
<button type="submit" class="btn btn-primary">Add Podcast</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% elif request.method == 'POST' %}
|
||||
<div class="no-results">
|
||||
<p>No podcasts found matching your search. Try different keywords.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
</div>
|
||||
{% elif request.method == 'POST' %}
|
||||
<div class="empty-state">
|
||||
<h3>No Results Found</h3>
|
||||
<p>No podcasts found for your search query. Try different keywords.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue