Video-search / templates /video.html
Aarifkhan's picture
Upload 3 files
f75c377 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>InfoHive - Video Search</title>
<meta name="description" content="InfoHive is a search engine that provides the latest videos on various topics.">
<meta property="og:title" content="InfoHive - Video Search">
<meta property="og:description" content="InfoHive is a search engine that provides the latest videos on various topics.">
<meta property="og:image" content="https://your_image_url_here.jpg">
<meta property="og:url" content="https://your_website_url_here.com">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<style>
body {
font-family: sans-serif;
margin: 0;
background: #000;
color: #fff;
}
.container {
padding-top: 50px;
}
.jumbotron {
background-color: #007bff;
color: #fff;
padding: 2rem 2rem;
margin-bottom: 30px;
}
.card {
border: none;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: transform 0.3s;
}
.card:hover {
transform: translateY(-5px);
}
.card-title {
font-size: 20px;
font-weight: bold;
color: #333;
}
.card-text {
color: #666;
}
.card-footer {
background-color: #f9f9f9;
border-top: none;
}
.btn-primary {
background-color: #007bff;
border-color: #007bff;
}
.btn-primary:hover {
background-color: #0056b3;
border-color: #0056b3;
}
.btn-outline-primary {
color: #007bff;
border-color: #007bff;
}
.btn-outline-primary:hover {
background-color: #007bff;
color: #fff;
}
.no-results {
text-align: center;
font-style: italic;
margin-top: 20px;
}
.search-input {
border-radius: 24px;
}
.logo {
max-width: 200px;
}
.subscribe-btn {
background-color: #ff0000;
border-color: #ff0000;
}
.subscribe-btn:hover {
background-color: #cc0000;
border-color: #cc0000;
}
</style>
</head>
<body>
<div class="container">
<div class="jumbotron" style="margin-top: 100px;">
<h1 class="display-4 text-center mb-4">Explore the Latest video</h1>
<p class="lead text-center">InfoHive is your source for up-to-date news on technology, sports, and more.</p>
<div class="text-center">
<a href="https://youtube.com/@OEvortex" class="btn btn-primary subscribe-btn" target="_blank">Subscribe to OEvortex on YouTube</a>
</div>
</div>
<div class="card mb-4">
<div class="card-body">
<form method="GET" action="/">
<div class="form-row">
<div class="col-md-8">
<input type="text" class="form-control search-input" name="keywords" placeholder="Enter keywords" value="{{ keywords }}">
<!-- </div> -->
<!-- <div class="col-md-2">
<select name="timelimit" class="form-control search-input">
<option value="d" {% if timelimit == 'd' %}selected{% endif %}>Day</option>
<option value="w" {% if timelimit == 'w' %}selected{% endif %}>Week</option>
<option value="m" {% if timelimit == 'm' %}selected{% endif %}>Month</option>
<option value="y" {% if timelimit == 'y' %}selected{% endif %}>year</option>
</select> -->
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-primary btn-block">Search</button>
</div>
</div>
</form>
</div>
</div>
{% if video %}
<div class="row">
{% for video_item in video %}
<div class="col-md-6 mb-4">
<div class="card">
<!-- Video Embed -->
<div class="embed-responsive embed-responsive-16by9">
{{ video_item['embed_html'] | safe }}
</div>
<!-- Video Description -->
<div class="card-body">
<h5 class="card-title">{{ video_item['title'] }}</h5>
<p class="card-text">{{ video_item['description'] }}</p>
<p class="card-text"><strong>Duration:</strong> {{ video_item['duration'] }}</p>
<p class="card-text"><strong>Published by:</strong> {{ video_item['publisher'] }}</p>
<p class="card-text"><strong>Views:</strong> {{ video_item['statistics']['viewCount'] }}</p>
<!-- <p class="card-text"><strong>Uploader:</strong> {{ video_item['uploader'] }}</p> -->
<small class="text-muted">
{{ video_item['published'] }} - {{ video_item['uploader'] }}
</small>
</div>
</div>
</div>
{% endfor %}
</div>
{% else %}
<p class="no-results">No results found.</p>
{% endif %}
</div>
</body>
</html>