Shortly before finishing
This commit is contained in:
parent
6c1d6762b5
commit
8ec5eb69ab
15 changed files with 511 additions and 15 deletions
server-implementation/templates
101
server-implementation/templates/index.html
Normal file
101
server-implementation/templates/index.html
Normal file
|
@ -0,0 +1,101 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>xkcd-finder</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1 class="head">xkcd-finder</h1>
|
||||
<h2 class="sub">Find me an xkcd for the topic ...</h2>
|
||||
<form action="/search" method="POST">
|
||||
{{form.csrf_token}}
|
||||
{{form.ids}}
|
||||
{{form.submit}}
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<style>
|
||||
* {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #1b1b1b;
|
||||
margin: 0px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: 12.5rem;
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
width: 45%;
|
||||
height: auto;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
form > input[type=text] {
|
||||
font-weight: 500;
|
||||
color: #eee;
|
||||
padding: 0.5rem 0.75rem;
|
||||
text-decoration: none;
|
||||
background-color: #333;
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: #b86cff;
|
||||
height: 2rem;
|
||||
width: 100%;
|
||||
font-size: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
form > input[type=submit] {
|
||||
font-weight: 500;
|
||||
font-size: 1.5rem;
|
||||
color: #eee;
|
||||
margin: 1rem 0px 0px;
|
||||
padding: 0.5rem 0.75rem;
|
||||
text-decoration: none;
|
||||
background-color: #333;
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: #333;
|
||||
text-transform: capitalize;
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
form > input[type=submit]:hover {
|
||||
border-color: #b86cff;
|
||||
}
|
||||
|
||||
.head {
|
||||
margin: 0 .5rem;
|
||||
hyphens: auto;
|
||||
padding-top: 2rem;
|
||||
font-size: 3.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sub {
|
||||
margin: 0 .5rem;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 500;
|
||||
color: #eee;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.head {
|
||||
color: #b86cff;
|
||||
}
|
||||
|
||||
</style>
|
151
server-implementation/templates/results.html
Normal file
151
server-implementation/templates/results.html
Normal file
|
@ -0,0 +1,151 @@
|
|||
<!doctype html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>xkcd-finder - results for {{ topic }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<section>
|
||||
<h1 class="head">Results</h1>
|
||||
<span class="sub">These are the top 5 results for the topic "{{ topic }}"</span>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="title">{{ results[0]["title"] }}</span>
|
||||
<span class="id">xkdc {{ results[0]["id"] }}</span>
|
||||
<a target="_blank" rel="noopener noreferrer" class="xkcdlink" href={{ results[0]["url"] }}>Link >></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="title">{{ results[1]["title"] }}</span>
|
||||
<span class="id">xkdc {{ results[1]["id"] }}</span>
|
||||
<a target="_blank" rel="noopener noreferrer" class="xkcdlink" href={{ results[1]["url"] }}>Link >></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="title">{{ results[2]["title"] }}</span>
|
||||
<span class="id">xkdc {{ results[2]["id"] }}</span>
|
||||
<a target="_blank" rel="noopener noreferrer" class="xkcdlink" href={{ results[2]["url"] }}>Link >></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="title">{{ results[3]["title"] }}</span>
|
||||
<span class="id">xkdc {{ results[3]["id"] }}</span>
|
||||
<a target="_blank" rel="noopener noreferrer" class="xkcdlink" href={{ results[3]["url"] }}>Link >></a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="title">{{ results[4]["title"] }}</span>
|
||||
<span class="id">xkdc {{ results[4]["id"] }}</span>
|
||||
<a target="_blank" rel="noopener noreferrer" class="xkcdlink" href={{ results[4]["url"] }}>Link >></a>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="/" class="backbutton"><< Back to Home</a>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
<style>
|
||||
* {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #1b1b1b;
|
||||
margin: 0px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
width: 220px;
|
||||
height: 250px;
|
||||
border: 2px solid #b86cff;
|
||||
margin: 1rem;
|
||||
justify-items: flex-start;
|
||||
align-items: center;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
span {
|
||||
text-wrap: wrap;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding-top: 10px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
color: #eee;
|
||||
font-size: 2.1rem;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.id {
|
||||
position: absolute;
|
||||
bottom: 56px;
|
||||
width: 70%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
font-size: 1.2rem;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.xkcdlink {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: #eee;
|
||||
padding: 0.5rem 0.75rem;
|
||||
text-decoration: none;
|
||||
background-color: #333;
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: #333;
|
||||
text-transform: capitalize;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
border-color: #b86cff;
|
||||
}
|
||||
|
||||
.head {
|
||||
margin: 0 .5rem;
|
||||
hyphens: auto;
|
||||
padding-top: 5rem;
|
||||
font-size: 3.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sub {
|
||||
margin: 0 .5rem;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 500;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.head {
|
||||
color: #b86cff;
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue