davidheineman
commited on
Commit
•
9027915
1
Parent(s):
6d0cba0
update style
Browse files- static/css/styles.css +25 -26
- templates/index.html +3 -5
- templates/results.html +36 -15
static/css/styles.css
CHANGED
@@ -1,55 +1,55 @@
|
|
1 |
-
/* Body background */
|
2 |
body {
|
3 |
background-color: #f4f4f4;
|
|
|
|
|
4 |
}
|
5 |
|
6 |
-
/* Custom fonts */
|
7 |
h1 {
|
8 |
-
text-align: center;
|
9 |
font-family: 'Droid Serif', Georgia, Times, serif;
|
10 |
}
|
11 |
-
|
12 |
-
p {
|
13 |
-
font-family: 'Droid Sans', Helvetica, Arial, sans-serif;
|
14 |
-
}
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
margin-bottom: 20px; /* Add some space below the message */
|
20 |
}
|
21 |
|
22 |
-
|
23 |
-
font-size: 36px;
|
24 |
-
color: #333;
|
25 |
}
|
26 |
|
27 |
-
|
28 |
-
font-size: 18px;
|
29 |
-
color: #666;
|
30 |
}
|
31 |
|
32 |
-
/* Style the form container */
|
33 |
form {
|
34 |
-
margin: 20px
|
35 |
padding: 20px;
|
36 |
border: 1px solid #ccc;
|
37 |
border-radius: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
width: 300px;
|
39 |
-
background-color: #fff; /* Form background color */
|
40 |
-
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
|
41 |
}
|
42 |
|
43 |
-
|
|
|
|
|
|
|
|
|
44 |
input[type="text"] {
|
45 |
-
width: calc(100% - 22px);
|
46 |
padding: 10px;
|
47 |
-
margin-bottom: 10px;
|
48 |
border: 1px solid #ccc;
|
49 |
border-radius: 5px;
|
50 |
}
|
51 |
|
52 |
-
/* Style the submit button */
|
53 |
input[type="submit"] {
|
54 |
width: 100%;
|
55 |
padding: 10px;
|
@@ -60,7 +60,6 @@ input[type="submit"] {
|
|
60 |
cursor: pointer;
|
61 |
}
|
62 |
|
63 |
-
/* Change the submit button color on hover */
|
64 |
input[type="submit"]:hover {
|
65 |
background-color: #45a049;
|
66 |
}
|
|
|
|
|
1 |
body {
|
2 |
background-color: #f4f4f4;
|
3 |
+
padding-top: 20px;
|
4 |
+
font-family: 'Droid Sans', Helvetica, Arial, sans-serif;
|
5 |
}
|
6 |
|
|
|
7 |
h1 {
|
8 |
+
text-align: center;
|
9 |
font-family: 'Droid Serif', Georgia, Times, serif;
|
10 |
}
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
.welcome-message {
|
13 |
+
text-align: center;
|
14 |
+
margin-bottom: 20px;
|
|
|
15 |
}
|
16 |
|
17 |
+
.welcome-message h1 {
|
18 |
+
font-size: 36px;
|
19 |
+
color: #333;
|
20 |
}
|
21 |
|
22 |
+
.welcome-message p {
|
23 |
+
font-size: 18px;
|
24 |
+
color: #666;
|
25 |
}
|
26 |
|
|
|
27 |
form {
|
28 |
+
margin-bottom: 20px;
|
29 |
padding: 20px;
|
30 |
border: 1px solid #ccc;
|
31 |
border-radius: 5px;
|
32 |
+
background-color: #fff;
|
33 |
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
34 |
+
}
|
35 |
+
|
36 |
+
.welcome-form {
|
37 |
+
margin: auto;
|
38 |
width: 300px;
|
|
|
|
|
39 |
}
|
40 |
|
41 |
+
.welcome-form input[type="text"] {
|
42 |
+
margin-top: 5px;
|
43 |
+
margin-bottom: 20px;
|
44 |
+
}
|
45 |
+
|
46 |
input[type="text"] {
|
47 |
+
width: calc(100% - 22px);
|
48 |
padding: 10px;
|
|
|
49 |
border: 1px solid #ccc;
|
50 |
border-radius: 5px;
|
51 |
}
|
52 |
|
|
|
53 |
input[type="submit"] {
|
54 |
width: 100%;
|
55 |
padding: 10px;
|
|
|
60 |
cursor: pointer;
|
61 |
}
|
62 |
|
|
|
63 |
input[type="submit"]:hover {
|
64 |
background-color: #45a049;
|
65 |
}
|
templates/index.html
CHANGED
@@ -1,22 +1,20 @@
|
|
1 |
<html>
|
2 |
<head>
|
3 |
-
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/styles.css') }}">
|
4 |
<link href="https://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet">
|
5 |
<link href="https://fonts.googleapis.com/css?family=Droid+Sans" rel="stylesheet">
|
6 |
|
7 |
</head>
|
8 |
<body>
|
9 |
-
<div id="welcome-message">
|
10 |
<h1>Welcome!</h1>
|
11 |
<p>Please enter your search terms below</p>
|
12 |
</div>
|
13 |
|
14 |
-
<form action="/query" method="post">
|
15 |
-
<!-- Label and input field for Query -->
|
16 |
<label for="query">Query:</label>
|
17 |
<input type="text" id="query" name="query" placeholder="Enter your search query">
|
18 |
|
19 |
-
<!-- Label and input field for Year -->
|
20 |
<label for="year">Year:</label>
|
21 |
<input type="text" id="year" name="year" placeholder="Enter the year">
|
22 |
|
|
|
1 |
<html>
|
2 |
<head>
|
3 |
+
<link rel="stylesheet" type="text/css" class='welcome-form' href="{{ url_for('static', filename='css/styles.css') }}">
|
4 |
<link href="https://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet">
|
5 |
<link href="https://fonts.googleapis.com/css?family=Droid+Sans" rel="stylesheet">
|
6 |
|
7 |
</head>
|
8 |
<body>
|
9 |
+
<div id="welcome-message" class="welcome-message">
|
10 |
<h1>Welcome!</h1>
|
11 |
<p>Please enter your search terms below</p>
|
12 |
</div>
|
13 |
|
14 |
+
<form class='welcome-form' action="/query" method="post">
|
|
|
15 |
<label for="query">Query:</label>
|
16 |
<input type="text" id="query" name="query" placeholder="Enter your search query">
|
17 |
|
|
|
18 |
<label for="year">Year:</label>
|
19 |
<input type="text" id="year" name="year" placeholder="Enter the year">
|
20 |
|
templates/results.html
CHANGED
@@ -1,23 +1,44 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html>
|
|
|
3 |
<head>
|
4 |
<title>Search Results</title>
|
|
|
5 |
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/styles.css') }}">
|
6 |
</head>
|
|
|
7 |
<body>
|
8 |
-
<
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
<
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
</body>
|
23 |
-
|
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
+
|
4 |
<head>
|
5 |
<title>Search Results</title>
|
6 |
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
7 |
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/styles.css') }}">
|
8 |
</head>
|
9 |
+
|
10 |
<body>
|
11 |
+
<div class="container">
|
12 |
+
<!-- <h1>Search Results for "{{ query }}" in {{ year }}</h1> -->
|
13 |
+
<form action="/query" method="post" class="form-inline">
|
14 |
+
<div class="form-group mr-2 col-md-6">
|
15 |
+
<input style="width: 600px;" type="text" class="form-control mr-2" id="query" name="query" value="{{ query }}">
|
16 |
+
</div>
|
17 |
+
|
18 |
+
<div class="form-group mr-2">
|
19 |
+
<label for="year" class="mr-2">Year:</label>
|
20 |
+
<input type="text" class="form-control mr-2" id="year" name="year" value="{{ year }}" placeholder="Enter the year">
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<button type="submit" class="btn btn-primary">Search</button>
|
24 |
+
</form>
|
25 |
+
|
26 |
+
<div class="row">
|
27 |
+
{% for result in results %}
|
28 |
+
<div class="col-md-12">
|
29 |
+
<div class="card mb-3">
|
30 |
+
<div class="card-body">
|
31 |
+
<h4 class="card-title"><a href="{{ result.url }}" target="_blank">{{ result.title }}</a></h4>
|
32 |
+
<h5 class="card-text">{{ result.authors }}</h5>
|
33 |
+
<p class="card-text">{{ result.year }} | {{ result.venue }}</p>
|
34 |
+
<!-- <p class="card-text"><strong>Type:</strong> {{ result.type }}</p> -->
|
35 |
+
<p class="card-text">{{ result.abstract }}</p>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
{% endfor %}
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
</body>
|
43 |
+
|
44 |
+
</html>
|