-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c83f2ab
commit eff534f
Showing
9 changed files
with
132 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
video:active { | ||
scale:1.5; | ||
scale:2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Feed - OurTube</title> | ||
<link href="/navbar.css" rel="stylesheet" type="text/css" /> | ||
<link href="style.css" rel="stylesheet" type="text/css" /> | ||
</head> | ||
<body> | ||
<div class="navbar"> | ||
<a href="/" class="item"> | ||
Home | ||
</a> | ||
<a href="/feed" class="item"> | ||
Latest | ||
</a> | ||
<a href="/upload" class="item"> | ||
Upload | ||
</a> | ||
<a href="/login" class="item pushRight"> | ||
Login | ||
</a> | ||
<a href="/signup" class="item"> | ||
Sign up | ||
</a> | ||
</div> | ||
<center> | ||
<h1>Latest Videos</h1> | ||
<a href="/feed">Switch to Quick View</a> | ||
<div id="videos"></div> | ||
</center> | ||
<script type="module" src="script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.12.3/firebase-app.js"; | ||
import { getAuth } from "https://www.gstatic.com/firebasejs/10.12.3/firebase-auth.js"; | ||
import { getDatabase, ref, onValue } from "https://www.gstatic.com/firebasejs/10.12.3/firebase-database.js"; | ||
|
||
const firebaseConfig = { | ||
apiKey: "AIzaSyBntOXNr3A0xTbstz8d66CzSbgGNKgRkQg", | ||
authDomain: "clone-3a598.firebaseapp.com", | ||
projectId: "clone-3a598", | ||
storageBucket: "clone-3a598.appspot.com", | ||
messagingSenderId: "851750777511", | ||
appId: "1:851750777511:web:0aa9f90eb4961eef9d6182" | ||
}; | ||
|
||
const app = initializeApp(firebaseConfig); | ||
const auth = getAuth(); | ||
const db = getDatabase(); | ||
|
||
onValue(ref(db, "videos"), (snapshot) => { | ||
document.getElementById("videos").innerHTML='' | ||
snapshot.forEach(video => { | ||
let listElement = document.getElementById("videos").appendChild(document.createElement("a")) | ||
listElement.href=`/watch/?v=${video.key}` | ||
listElement.innerText=`${video.val().name} - ${video.val().views||0} views` | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#videos a { | ||
color:black; | ||
font-size:17pt; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters