-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from jcharistech/develop
Update Login with Base
- Loading branch information
Showing
10 changed files
with
290 additions
and
47 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,54 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Password Master</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous"> | ||
</head> | ||
|
||
<body> | ||
<nav class="navbar navbar-expand-lg navbar-light bg-light"> | ||
<a class="navbar-brand" href="{{url_for('home_page')}}">Password Manager</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav"> | ||
{% if not current_user.is_authenticated %} | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="{{url_for('home_page')}}">Home</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{url_for('auth.login')}}">Login</a> | ||
</li> | ||
|
||
<li class="nav-item"> | ||
<a class="nav-link" href="{{url_for('auth.signup')}}">SignUp</a> | ||
</li> | ||
{% endif %} | ||
|
||
{% if current_user.is_authenticated %} | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="{{url_for('index')}}">Manager</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{url_for('auth.logout')}}">Logout</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</nav> | ||
|
||
<div class="container"> | ||
{% block content %} | ||
{% endblock %} | ||
</div> | ||
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></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,33 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block content %} | ||
<div> | ||
<h3 class="display-3 text-center my-3">Password Manager</h3> | ||
</div> | ||
|
||
<div class="container"> | ||
<!-- RESPONSIVE CLASSES --> | ||
<div class="row"> | ||
<!-- stacks the columns on small screen sizes --> | ||
<div class="col-md-6"> | ||
<h3></h3> | ||
<p></p> | ||
</div> | ||
<!--FORMS HERE--> | ||
<div class="col-md-4"> | ||
<ul> | ||
<li> | ||
<a class="" href="{{url_for('auth.login')}}">Login</a> | ||
</li> | ||
|
||
<li> | ||
<a class="" href="{{url_for('auth.signup')}}">SignUp</a> | ||
</li> | ||
</ul> | ||
|
||
|
||
</div> | ||
|
||
</div> | ||
|
||
{% endblock %} |
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,15 +1,6 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Password Master</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous"> | ||
{% extends "base.html" %} | ||
|
||
</head> | ||
|
||
<body> | ||
{% block content %} | ||
<div> | ||
<h3 class="display-3 text-center my-3">Password Manager</h3> | ||
</div> | ||
|
@@ -97,7 +88,4 @@ <h3>Password Register</h3> | |
} | ||
} | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script> | ||
|
||
</body> | ||
</html> | ||
{% endblock %} |
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,103 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Password Master</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous"> | ||
|
||
</head> | ||
|
||
<body> | ||
<div> | ||
<h3 class="display-3 text-center my-3">Password Manager</h3> | ||
</div> | ||
|
||
<div class="container"> | ||
<!-- RESPONSIVE CLASSES --> | ||
<div class="row"> | ||
<!-- stacks the columns on small screen sizes --> | ||
<div class="col-md-6"> | ||
<h3></h3> | ||
<p></p> | ||
</div> | ||
<!--FORMS HERE--> | ||
<div class="col-md-4"> | ||
<h3>Password Register</h3> | ||
<!--FORMS HERE--> | ||
<form method="POST" action="/add"> | ||
<label for="profile-url">Email</label> | ||
<div class="input-group"> | ||
<input type="email" class="form-control" name="email" placeholder="Email"> | ||
</div> | ||
<label for="profile-url">Site URL</label> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" name="site_url" placeholder="Site URL"> | ||
</div> | ||
<label for="site_password">Password</label> | ||
<div class="input-group"> | ||
<input type="password" class="form-control" name="site_password" id="profile-url"> | ||
</div> | ||
<br> | ||
<button type="submit" class="btn btn-primary mb-3">Add Password</button> | ||
</form> | ||
<!--FORMS HERE--> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
|
||
|
||
<div class="container"> | ||
<table class="table"> | ||
<!-- gives only the heading a black background --> | ||
<thead class="thead-inverse"> | ||
<tr> | ||
<th>Email</th> | ||
<th>Site Address</th> | ||
<th>Site Password</th> | ||
<th>Actions</th> | ||
<th>Visibility</th> | ||
|
||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for task in passwordlist %} | ||
<tr> | ||
<td>{{ task.email }}</td> | ||
<td>{{ task.site_url }}</td> | ||
<td><input type="password" value="{{ task.site_password }}" id="{{ task.id}}"></td> | ||
<td> | ||
<a class="btn btn-outline-danger btn-sm" role="button" href="/delete/{{task.id}}">Delete</a> | ||
<br> | ||
<a class="btn btn-outline-success btn-sm" role="button" href="/update/{{task.id}}">Update</a> | ||
</td> | ||
<td> | ||
<input type="checkbox" onclick="myFunction({{ task.id}})">Show Password | ||
</td> | ||
</tr> | ||
</tbody> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
<div class="container"> | ||
<a href="{{url_for('export_data')}}" type="button" class="btn btn-primary mb-3">Export as CSV</a> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
function myFunction(pid) { | ||
var x = document.getElementById(pid); | ||
if (x.type === "password") { | ||
x.type = "text"; | ||
} else { | ||
x.type = "password"; | ||
} | ||
} | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.