Messed with API and had to do background change again
parent
319a7ba7f6
commit
1cbdb51e62
|
@ -35,6 +35,10 @@ def create_app(test_config=None):
|
|||
def about():
|
||||
return render_template('about.html')
|
||||
|
||||
@app.route('/results')
|
||||
def results():
|
||||
return render_template('results.html')
|
||||
|
||||
|
||||
# a simple page that says hello
|
||||
@app.route('/registration-classes')
|
||||
|
|
|
@ -15,31 +15,25 @@ def index():
|
|||
term = None
|
||||
paging=None
|
||||
search_type = "ft"
|
||||
print("TEST HERE")
|
||||
print(request.args)
|
||||
print(request.method)
|
||||
|
||||
print("DONE PRINTING")
|
||||
title = request.form.get('title')
|
||||
print(title)
|
||||
print("----------------------------------------------------------")
|
||||
if request.args:
|
||||
term = request.args['term']
|
||||
if request.args['type'] == 'ft':
|
||||
response = search(request.args['term'], request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
elif request.args['type'] == 'reg':
|
||||
search_type = "reg"
|
||||
term = term.strip().upper()
|
||||
response = reg_search(term,
|
||||
request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
else:
|
||||
search_type = "ren"
|
||||
term = term.strip().upper()
|
||||
response = ren_search(term,
|
||||
request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
term = request.args['title']
|
||||
response = search(request.args['type'], request.args.get('page'),
|
||||
request.args.get('per_page'))
|
||||
|
||||
paging = proc_pagination(response['data']['paging'],
|
||||
request.args.get('page'))
|
||||
results = proc_results(response)
|
||||
|
||||
|
||||
return render_template('search/index.html', results=results, term=term,
|
||||
paging=paging, search_type=search_type)
|
||||
return render_template('base.html', title=title)
|
||||
|
||||
|
||||
def proc_results(r):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
.bg{
|
||||
/* background-image: url("background-gray.png"); */
|
||||
background-image: url("books.jpg");
|
||||
height: 100%;
|
||||
background: url('books.jpg') no-repeat center center fixed;
|
||||
height:100vh;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
||||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
||||
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
||||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="/static/styles.css">
|
||||
|
@ -17,12 +18,10 @@
|
|||
<title>Copyright Renewals</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<body >
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="#">Copyright Renewals</a>
|
||||
<a class="navbar-brand">Copyright Renewals</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>
|
||||
|
@ -37,31 +36,15 @@
|
|||
<a class="nav-link" href="about">About Us <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">Copyrights <span class="sr-only">(current)</span></a>
|
||||
<a class="nav-link" href="#">Copyrights <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">NYPL <span class="sr-only">(current)</span></a>
|
||||
<a class="nav-link" href="#">NYPL <span class="sr-only"></span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<!---
|
||||
<div class="header">
|
||||
<div class ="totheleft">
|
||||
<a>Copyright Renewals</a>
|
||||
</div>
|
||||
<div class = "totheright">
|
||||
<a href="#">Search</a>
|
||||
<a href="about">About Us</a>
|
||||
<a href="#">Copyrights</a>
|
||||
<a href="#">NYPL</a>
|
||||
</div>
|
||||
</div>
|
||||
--->
|
||||
|
||||
<div class="bg">
|
||||
<div class="py-5 text-center">
|
||||
<div class="search">
|
||||
|
@ -69,12 +52,12 @@
|
|||
<p>Search for copyright registrations and renewals on books from the Catalog of Copyright Entries.</p>
|
||||
<p>Find a book:</p>
|
||||
<form>
|
||||
<input type="text" name="title" placeholder="Title"><br>
|
||||
<input type="text" name="title" id="title" placeholder="Title"><br>
|
||||
<input type="text" name="author" placeholder="Author"><br>
|
||||
<input type="text" name="publisher" placeholder="Publisher"><br>
|
||||
<input type="text" name="registration" placeholder="Registration Number"><br>
|
||||
<input type="text" name="renewal" placeholder="Renewal Number"><br>
|
||||
<button type="submit">Search</button>
|
||||
<input type="submit" value="Search" class="btn">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
||||
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
||||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="/static/styles.css">
|
||||
|
||||
<head>
|
||||
<title>Copyright Renewals</title>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand">Copyright Renewals</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 mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/">Search <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="about">About Us <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">Copyrights <span class="sr-only"></span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">NYPL <span class="sr-only"></span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="bg">
|
||||
<div class="results">
|
||||
<h1>Static Results page</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue