-
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
c757daa
commit 5bbb5a1
Showing
9 changed files
with
1,636 additions
and
106 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,62 +1,45 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Cocktail Club App</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Cocktail Club App</title> | ||
|
||
<link rel="stylesheet" | ||
<link rel="stylesheet" | ||
href="https://unpkg.com/bootstrap/dist/css/bootstrap.css"> | ||
<script src="https://unpkg.com/jquery"></script> | ||
<script src="https://unpkg.com/popper"></script> | ||
<script src="https://unpkg.com/bootstrap"></script> | ||
|
||
<link rel="stylesheet" | ||
href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"> | ||
<link rel="stylesheet" href="/static/stylesheets/style.css"> | ||
<link rel="shortcut icon" href="/static/favicon.ico"> | ||
<script src="https://unpkg.com/jquery"></script> | ||
<script src="https://unpkg.com/popper"></script> | ||
<script src="https://unpkg.com/bootstrap"></script> | ||
</head> | ||
|
||
<body class="{% block body_class %}{% endblock %}"> | ||
<nav class="navbar navbar-expand"> | ||
<div class="container-fluid"> | ||
<div class="navbar-header"> | ||
<a href="/" class="navbar-brand"> | ||
<span>Cocktail</span> | ||
</a> | ||
</div> | ||
<ul class="nav navbar-nav navbar-right"> | ||
{% if request.endpoint != None %} | ||
<!-- <li> | ||
<form class="navbar-form navbar-right" action="/users"> | ||
<input name="q" class="form-control" placeholder="Search" id="search"> | ||
<button class="btn btn-default"> | ||
<span class="fa fa-search"></span> | ||
</button> | ||
</form> | ||
</li> --> | ||
{% endif %} | ||
{% if not g.user %} | ||
<li><a href="/signup">Sign up</a></li> | ||
<li><a href="/login">Log in</a></li> | ||
{% else %} | ||
<li> | ||
<a href="/users/{{ g.user.id }}"> | ||
</a> | ||
</li> | ||
<li><a href="/logout">Log out</a></li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</nav> | ||
<!-- <div class="container"> | ||
{% for category, message in get_flashed_messages(with_categories=True) %} | ||
<div class="alert alert-{{ category }}">{{ message }}</div> | ||
{% endfor %} | ||
{% block content %} | ||
{% endblock %} | ||
</div> --> | ||
<nav class="navbar navbar-expand"> | ||
<div class="container-fluid"> | ||
<ul class="nav navbar-nav navbar-right"> | ||
{% if request.endpoint != None %} | ||
<li> | ||
<form class="navbar-form navbar-right" action="/users"> | ||
<input name="q" class="form-control" placeholder="Search" id="search"> | ||
<button class="btn btn-default"> | ||
<span class="fa fa-search"></span> | ||
</button> | ||
</form> | ||
</li> | ||
{% endif %} | ||
{% if not g.user %} | ||
<li><a href="/register">Sign up</a></li> | ||
<li><a href="/login">Log in</a></li> | ||
{% else %} | ||
<li> | ||
<a href="/users/{{ g.user.id }}"> | ||
<img src="{{ g.user.image_url }}" alt="{{ g.user.username }}"> | ||
</a> | ||
</li> | ||
<li><a href="/logout">Log out</a></li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</nav> | ||
<h1>Cocktail Club App</h1> | ||
<p>Please remember to drink responsibly, that means don't waste any alcohol.</p> | ||
</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,31 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block body_class %}onboarding{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<div class="row justify-content-md-center"> | ||
<div class="col-md-7 col-lg-5"> | ||
<h2 class="join-message">Welcome back.</h2> | ||
|
||
<form method="POST" id="login"> | ||
<label for="username">Username:</label><br> | ||
<input type="text" name="username"><br><br> | ||
<label for="password">Password:</label><br> | ||
<input type="text" name="password"><br><br> | ||
<input type="submit" id="login-button" value="'Login"> | ||
</form> | ||
|
||
<form action="/register" id="register"> | ||
<label for="registration">New to the club?</label> | ||
<input type="submit" id="reg-button" value="Sign Up Today"> | ||
</form> | ||
</div> | ||
{% if error: %} | ||
<div id="error-box"> | ||
<p>{{error}}</p> | ||
</div> | ||
{% endif %} | ||
</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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{% extends 'base.html' %} | ||
|
||
<div class="wrapper"> | ||
<div id="h1-wrapper"> | ||
<h1>Hello, {{username}}</h1> | ||
<div id="stored"> | ||
<form action="stored"> | ||
<input type="submit" value="Your saved drinks"> | ||
</form> | ||
</div> | ||
<div id="logout"> | ||
<form action="/profile/logout"> | ||
<input type="submit" value="logout"> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="content"> | ||
|
||
<div id="forms-wrapper"> | ||
<div id="search"> | ||
<form action="profile" method="post"> | ||
<input type="text" name="search" onfocus="this.value = ''" value="Select a cocktail name or ingredient of choice"><br> | ||
<label for="">* 3 characters or more</label><br><br> | ||
</form> | ||
</div> | ||
|
||
<div id="random"> | ||
<form action="profile" method="post"> | ||
<input type="submit" name="random" value="Get random drink."> | ||
</form> | ||
</div> | ||
<br> | ||
</div> | ||
|
||
<div id="search-display"> | ||
<form action="profile" method="post"> | ||
{% for name in names: %} | ||
<input type="submit" name="select" value="{{name}}"><br> | ||
{% endfor %} | ||
</form> | ||
</div> | ||
|
||
<div id="info-display"> | ||
{% if content %} | ||
<div class="main-wrapper"> | ||
<h2>Drink:</h2> | ||
{% for item in content[0]: %} | ||
{% if item == content[0][0]: %} | ||
<p>Name: {{item}}</p> | ||
{% elif item == content[0][1]: %} | ||
<p>Instructions: {{item}}</p> | ||
{% end if %} | ||
{% endfor %} | ||
</div> | ||
<div class="ingredients-wrapper"> | ||
<h3>Ingredients</h3> | ||
{% for item in content[1]: %} | ||
<ul> | ||
<li>{{item}}</li> | ||
</ul> | ||
{% endfor %} | ||
</div> | ||
|
||
<form id="store" action="profile" method="post"> | ||
<input type="submit" name="store" value="Save"> | ||
</form> | ||
{% endif %} | ||
</div> | ||
<p id="store-info">*go to 'your cocktails' to see what you have saved</p> | ||
</div> | ||
</div> |
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,17 @@ | ||
{% extends 'base.html' %} | ||
|
||
<div id="main-box"> | ||
<form method="post"> | ||
<label for="new_username">Username:</label><br> | ||
<input type="text" name="new_username" id="new_username"><br><br> | ||
<label for="new_password">Password:</label><br> | ||
<input type="password" name="new_password" id="new_password"><br><br> | ||
<input type="submit" id="reg-button" value="Register New User"> | ||
</form> | ||
</div> | ||
|
||
{% if error: %} | ||
<div id="error-box"> | ||
<p>{{error}}</p> | ||
</div> | ||
{% endif %} |
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,29 @@ | ||
{% extends 'base.html' %} | ||
|
||
<div class="wrapper"> | ||
<h1>Your cocktails:</h1> | ||
{% if not delete_mode: %} | ||
<div id="display"> | ||
{% for c in cocktails: %} | ||
<form action="profile" id="cocktails" method="post"> | ||
<input type="submit" name="select" value="{{c.name}}"> | ||
</form><br> | ||
{% endfor %} | ||
</div> | ||
<form id="delete" method="post"> | ||
<input type="submit" name="delete" value="delete cocktail"> | ||
</form> | ||
{% endif %} | ||
|
||
{% if delete_mode: %} | ||
<div id="delete-display"> | ||
{% for c in cocktails: %} | ||
<form id="cocktail" method="post"> | ||
<input type="checkbox" name="delete" value="{{c.name}}"> | ||
<label>{{c.name}}</label><br> | ||
{% endfor %} | ||
<input type="submit" id="submit-delete" value="Delete"> | ||
</form> | ||
</div> | ||
{% endif %} | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.