-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
88 lines (84 loc) · 3.87 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="de-DE">
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/style.css">
<link rel="icon" href="assets/favicon.ico" type="image/x-icon">
<script type="text/javascript" src="movie-database.js"></script>
<script type="text/javascript" src="video-player.js"></script>
<script type="text/javascript" src="video-form.js"></script>
</head>
<body onLoad="database.loadMovieDatabase()">
<header>
<div class="container">
<h1><img src="assets/logo.png" width="30em" /> Video Archive</h1>
</div>
</header>
<div class="container">
<section id="main-content">
<h2 id="welcome-to-github-pages">Welcome to the video archive of yesterday!</h2>
<p>You can browse all available videos in the table below or add a new video <a href="#" onclick="addForm.open()">here</a></p>
<hr>
<div id="video-table">
<blockquote id="loading-indicator">Loading ... </blockquote>
</div>
</section>
</div>
<div id="player-overlay" class="popup-overlay">
<div class="popup">
<a class="close" onclick="player.close()" href="#">×</a>
<video id="player" controls>
<source id="player-src" src="" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</div>
<div id="form-overlay" class="popup-overlay">
<div class="popup">
<h1>Add new movie</h1>
<div class="form-content">
<form id="add-video" action="#" method="post">
<div class="form-group">
<label for="title">Title</label>
<input class="form-control" type="text" name="title" id="title" required/>
</div>
<div class="form-group">
<label for="description">Movie synposis</label>
<textarea class="form-control" name="description" rows="15" cols="30" required></textarea>
</div>
<div class="form-group">
<label for="rating">Rating</label>
<input class="form-control" id="rating" type="number" name="rating" step="1" min="0" max="5" placeholder="(x of 5)" required>
</div>
<div class="form-group">
<label for="thumbnail">Thumbnail</label>
<input class="form-control" id="thumbnail" type="url" name="thumbnail" list="defaultThumbs" placeholder="http://link-to-image.com/thumb.jpg" autocomplete="false" required>
<datalist id="defaultThumbs">
<option value="https://placeimg.com/300/168/any">
<option value="https://chaosd.github.io/study-mmi02/media/big_buck_bunny.jpg">
</datalist>
</div>
<div class="form-group">
<label for="link">Video URL</label>
<input class="form-control" id="link" type="url" name="link" list="defaultLinks" placeholder="http://link-to-video.com/movie.mp4" autocomplete="false" required>
<datalist id="defaultLinks">
<option value="https://chaosd.github.io/study-mmi02/media/big_buck_bunny.mp4">
</datalist>
</div>
<p>
<button onclick="addForm.close()"> Cancel </button>
<input type="submit" value="Submit" />
</p>
</form>
</div>
</div>
</div>
</body>
<script>
var player = new VideoPlayer(document.getElementById("player-overlay"));
var database = new MovieDatabase(document.getElementById("video-table"));
var addForm = new VideoForm(document.getElementById("form-overlay"), database);
</script>
</html>