Search/templates/results.html
2024-03-28 08:19:29 +01:00

133 lines
4.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Title }}</title>
<link rel="stylesheet" type="text/css" href="/static/style.css">
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif; /* Change the font family to your preference */
background-color: #f5f5f5; /* Change the background color to your preference */
}
.results-search-container {
text-align: center;
background-color: #fff; /* Change the background color to your preference */
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow effect */
margin: 20px auto;
max-width: 600px; /* Adjust the max-width to your preference */
}
.results-search-container h1 {
font-size: 24px;
color: #333; /* Change the title color to your preference */
margin-bottom: 20px;
}
.results-search-container input[type="text"] {
width: calc(100% - 120px); /* Adjust the width to leave space for the button */
padding: 10px;
border: 1px solid #ccc; /* Add a border */
border-radius: 4px;
font-size: 16px;
margin-bottom: 20px;
}
.results-search-container .sub-search-button-wrapper {
display: flex;
justify-content: center;
}
.results-search-container .sub-search-button-wrapper button {
padding: 10px 20px;
margin: 0 10px;
font-size: 16px;
background-color: #007bff; /* Change the button background color to your preference */
color: #fff; /* Change the button text color to your preference */
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.results-search-container .sub-search-button-wrapper button img {
vertical-align: middle;
margin-right: 5px; /* Adjust the margin between the icon and text */
}
.results-search-container .sub-search-button-wrapper button:hover {
background-color: #0056b3; /* Change the button hover background color to your preference */
}
.fetched {
text-align: center;
margin-top: 20px;
}
.snip,
.snipp {
text-align: center;
margin-top: 20px;
}
.results {
background-color: #fff; /* Change the background color to your preference */
padding: 20px;
margin: 20px auto;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow effect */
max-width: 600px; /* Adjust the max-width to your preference */
}
.results a {
text-decoration: none;
color: #007bff; /* Change the link color to your preference */
font-weight: bold;
}
.results h3 {
font-size: 20px;
margin-top: 10px;
margin-bottom: 5px;
}
.results p {
font-size: 16px;
margin-bottom: 0;
}
</style>
</head>
<body>
<form action="/search" class="results-search-container" method="post" autocomplete="off">
<h1 class="logomobile"><a class="no-decoration" href="./">Tails<span class="X">Go</span></a></h1>
<input type="text" name="q" value="{{ .Query }}" />
<div class="sub-search-button-wrapper">
<button name="t"><img src="/static/searchicon.png" alt="text result" />General</button>
</div>
</form>
<p class="fetched">{{ .Fetched }}</p>
{{ if ne .KnoRdesc "" }}
<p class="snip">{{ .KnoRdesc }} <a target="_blank" href="{{ .RdescLink }}">{{ .RdescLink }}</a></p>
{{ end }}
{{ if ne .Snippet "" }}
<p class="snipp">{{ .Snippet }} <a target="_blank" href="{{ index .Results 0 0 }}">{{ index .Results 0 0 }}</a></p>
{{ end }}
{{ if .Results }}
{{ range .Results }}
<div class="results">
<a href="{{ . }}">{{ . }}<h3>{{ . }}</h3></a>
<p>{{ . }}</p>
</div>
{{ end }}
{{ end }}
</body>
</html>