forked from adipai/PopcornPicks
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added profile page for users (Issue #12)
- Loading branch information
Showing
4 changed files
with
127 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stylesheet.css') }}"> | ||
<title>PopcornPicks</title> | ||
<link rel="icon" href="{{ url_for('static', filename='Popcorn-icon.png') }}" /> | ||
<script src="{{ url_for('static', filename='script.js') }}"></script> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" /> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous" /> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | ||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" | ||
crossorigin="anonymous"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
</head> | ||
|
||
<body class="Profile"> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark topNavBar fixed-top" id="profileTopNav"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="#">PopcornPicks🍿</a> <button type="button" id="signOut" onclick="signOut()" | ||
style="background-color: transparent; color:white; width: 5%;">Sign Out</button> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" | ||
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" | ||
aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
</div> | ||
</nav> | ||
|
||
<div class="wrapper" | ||
style="margin-top: 20px; margin-bottom: 20px; height: 80%; width: 80%; background-color: rgba(83, 83, 83, 0.5); orientation: portrait;" | ||
id="centralDivLanding"> | ||
<div class="heading1" style="background-color: transparent; color: white;"><br><br><br><br> | ||
<center> | ||
<h2 id="profBanner" style="top:5%; margin-top: 5px;"></h2> | ||
</center> | ||
<div class="wrapper" style="flex-direction: row;"> | ||
<div style="flex-direction: column; left: 50%; top: 30%; margin-right: 25%;"> | ||
<h3 style="text-align: center;">Recently Rated Movies:</h2> | ||
<ul class="list-group" id="recentMoviesProf"></ul> | ||
</div> | ||
<div style="flex-direction: column; right: 50%; top: 30%; margin-left: 25%;"> | ||
<center><input class="form-control mr-sm-2" type="text" placeholder="Enter Your Friend's Username" | ||
aria-label="FriendId" id="addFriend" | ||
style="width:120%; align-items: center; border-radius: 40px; margin-bottom: 20px;" /> | ||
</center> | ||
<center><button id="friendButton" onclick="friend()" class="btn btn-primary mx-auto">Add | ||
Friend</button></center> | ||
<h3 style="text-align: center;">Friends List:</h2> | ||
<ul class="list-group" id="friendsList"></ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
<script> | ||
window.onload = function () { | ||
getRecentMoviesProfile(); | ||
getUserName(); | ||
} | ||
function getRecentMoviesProfile() { | ||
$.ajax({ | ||
type: 'GET', | ||
url: '/getRecentMovies', | ||
contentType: "application/json;charset=UTF-8", | ||
success: function (response) { | ||
response.forEach(element => { | ||
const resp = element.name + ": " + element.score + " stars"; | ||
$("#recentMoviesProf").append(resp); | ||
}); | ||
}, | ||
error: function (error) { | ||
} | ||
}); | ||
} | ||
function getUserName() { | ||
$.ajax({ | ||
type: 'GET', | ||
url: '/getUserName', | ||
contentType: "application/json;charset=UTF-8", | ||
success: function (response) { | ||
console.log(response) | ||
const resp = "Welcome " + response + "!"; | ||
$("#profBanner").append(resp); | ||
}, | ||
error: function (error) { | ||
} | ||
}); | ||
} | ||
</script> | ||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script> | ||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" crossorigin="anonymous"></script> | ||
<script src="{{ url_for('static', filename='script.js') }}"></script> | ||
|
||
</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