Initial commit
This commit is contained in:
18
templates/download.html
Normal file
18
templates/download.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Download Video</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Download Video</h1>
|
||||
<form method="POST">
|
||||
<input type="url" name="url" placeholder="Video URL" required>
|
||||
<button type="submit">Download</button>
|
||||
</form>
|
||||
<a href="/videos">View Downloaded Videos</a>
|
||||
<a href="/logout">Logout</a>
|
||||
</body>
|
||||
|
||||
</html>
|
14
templates/home.html
Normal file
14
templates/home.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Video Downloader</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Welcome to Video Downloader</h1>
|
||||
<a href="/login">Login</a>
|
||||
<a href="/register">Register</a>
|
||||
</body>
|
||||
|
||||
</html>
|
17
templates/login.html
Normal file
17
templates/login.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Login</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Login</h1>
|
||||
<form method="POST">
|
||||
<input type="text" name="username" placeholder="Username" required>
|
||||
<input type="password" name="password" placeholder="Password" required>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|
17
templates/register.html
Normal file
17
templates/register.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Register</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Register</h1>
|
||||
<form method="POST">
|
||||
<input type="text" name="username" placeholder="Username" required>
|
||||
<input type="password" name="password" placeholder="Password" required>
|
||||
<button type="submit">Register</button>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|
64
templates/videos.html
Normal file
64
templates/videos.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Downloaded Videos</title>
|
||||
<meta http-equiv="refresh" content="5">
|
||||
<style>
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Downloaded Videos</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<th>Title</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{{range .videos}}
|
||||
<tr>
|
||||
<td>{{.URL}}</td>
|
||||
<td>{{.Title}}</td>
|
||||
<td>{{.Status}}</td>
|
||||
<td>
|
||||
{{if eq .Status "completed"}}
|
||||
<a href="/downloads/video/{{.VideoFilename}}">Download Video</a> |
|
||||
<a href="/downloads/audio/{{.AudioFilename}}">Download Audio</a>
|
||||
{{else if eq .Status "failed"}}
|
||||
<form action="/video/{{.ID}}/restart" method="post" style="display:inline;">
|
||||
<button type="submit">Restart</button>
|
||||
</form>
|
||||
{{else if eq .Status "downloading"}}
|
||||
<form action="/video/{{.ID}}/cancel" method="post" style="display:inline;">
|
||||
<button type="submit">Cancel</button>
|
||||
</form>
|
||||
{{end}}
|
||||
<form action="/video/{{.ID}}/delete" method="post" style="display:inline;">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<p><a href="/download">Download New Video</a></p>
|
||||
<p><a href="/logout">Logout</a></p>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user