metasearch/src/web/assets/style.css

248 lines
3.8 KiB
CSS
Raw Normal View History

2023-12-20 08:03:29 +00:00
html {
height: 100%;
}
2023-12-20 06:18:09 +00:00
body {
font-family: monospace;
background-color: #0b0e14;
color: #bfbdb6;
margin: 0;
line-height: 1.2;
2023-12-20 08:03:29 +00:00
height: 100%;
2023-12-20 06:18:09 +00:00
}
.results-container {
/* enough space for the infobox */
max-width: 73.5rem;
margin: 0 auto;
}
2023-12-20 06:18:09 +00:00
main {
max-width: 40rem;
/* margin: 0 0 0 10rem; */
2023-12-20 06:18:09 +00:00
padding: 1rem 0.5rem;
background-color: #0d1017;
min-height: 100%;
}
2023-12-21 08:11:21 +00:00
@media screen and (max-width: 74rem) {
/* small screens */
.results-container {
margin: 0 auto;
max-width: 40rem;
}
2023-12-20 06:18:09 +00:00
}
input {
font-family: monospace;
background-color: #0d1017;
color: #bfbdb6;
border: 1px solid #234;
font-size: inherit;
padding: 0.25rem;
}
2023-12-21 08:11:21 +00:00
input:focus-visible {
2023-12-21 06:19:52 +00:00
outline: none;
border-color: #e6b450;
}
2023-12-21 08:11:21 +00:00
:focus-visible {
2023-12-21 06:19:52 +00:00
outline: 1px solid #e6b450;
}
2023-12-20 06:18:09 +00:00
input[type="submit"] {
cursor: pointer;
}
a {
color: #29e;
text-decoration: none;
}
a:visited {
color: #92e;
}
2023-12-21 09:00:18 +00:00
pre {
white-space: pre-wrap;
}
2023-12-20 06:18:09 +00:00
2023-12-20 08:03:29 +00:00
/* index page */
.main-container {
display: flex;
flex-direction: column;
min-height: 100%;
2023-12-20 08:03:29 +00:00
height: 100%;
justify-content: center;
margin: 0 auto;
2023-12-21 08:11:21 +00:00
padding: 0 0.5em;
2023-12-20 08:03:29 +00:00
text-align: center;
2023-12-21 08:11:21 +00:00
max-width: 30em;
2023-12-20 08:03:29 +00:00
}
h1 {
margin-top: 0;
}
/* header */
2023-12-20 06:18:09 +00:00
.search-form {
margin-bottom: 1rem;
2023-12-21 05:43:58 +00:00
display: flex;
gap: 0.5rem;
2023-12-20 06:18:09 +00:00
}
2023-12-20 09:28:38 +00:00
#search-input {
2023-12-21 05:43:58 +00:00
max-width: 30em;
flex: 1;
2023-12-20 08:03:29 +00:00
}
2023-12-21 08:11:21 +00:00
#search-input-suggestions {
position: absolute;
text-align: left;
margin-top: calc(1.9em + 1px);
background: #0f131a;
padding: 0.1em 0 0.3em 0;
border: 1px solid #234;
border-top: transparent;
z-index: 10;
2023-12-21 08:11:21 +00:00
}
.search-input-suggestion {
cursor: pointer;
padding: 0.3em 0.3em;
2023-12-21 08:11:21 +00:00
}
.search-input-suggestion.focused {
background: #234;
}
2023-12-20 06:18:09 +00:00
2023-12-20 08:03:29 +00:00
/* search result */
2023-12-20 06:18:09 +00:00
.search-result {
padding-top: 1rem;
border-top: 1px solid #234;
2023-12-20 08:03:29 +00:00
font-size: 1rem;
2023-12-20 06:18:09 +00:00
}
.search-result-anchor {
2023-12-20 08:03:29 +00:00
display: block;
2023-12-20 06:18:09 +00:00
}
.search-result-url {
margin: 0;
font-size: 0.8rem;
color: #998;
}
.search-result-title {
margin: 0;
2023-12-20 08:03:29 +00:00
font-size: 1rem;
2023-12-20 06:18:09 +00:00
}
.search-result-description {
margin: 0;
2023-12-20 08:03:29 +00:00
font-size: 0.8em;
2023-12-20 06:18:09 +00:00
color: #bba;
}
2023-12-20 08:03:29 +00:00
/* engine list */
.engine-list {
2023-12-20 06:18:09 +00:00
opacity: 0.5;
2023-12-20 08:03:29 +00:00
justify-content: end;
2023-12-20 06:18:09 +00:00
display: flex;
gap: 0.5em;
2023-12-20 08:03:29 +00:00
font-size: 0.8rem;
2023-12-20 06:18:09 +00:00
}
2023-12-20 08:03:29 +00:00
/* featured snippet */
.featured-snippet {
margin-bottom: 1rem;
border: 1px solid #234;
padding: 0.5rem;
font-size: 1.2rem;
}
.featured-snippet .search-result-description {
margin-bottom: 1rem;
}
/* progress update */
2023-12-20 06:18:09 +00:00
.progress-updates {
margin-bottom: 1rem;
border: 1px solid #234;
padding: 0.5rem;
2023-12-20 08:03:29 +00:00
min-height: 5em;
2023-12-20 06:18:09 +00:00
}
.progress-update {
margin: 0;
white-space: pre-wrap;
2023-12-20 08:03:29 +00:00
}
.progress-update-time {
opacity: 0.5;
2023-12-20 06:18:09 +00:00
}
2023-12-20 09:28:38 +00:00
.progress-update-done {
color: #7fd962;
font-weight: bold;
}
2023-12-20 23:17:46 +00:00
/* answer */
.answer {
margin-bottom: 1rem;
border: 1px solid #234;
padding: 0.5rem;
}
.answer h3 {
margin: 0;
font-weight: normal;
font-size: 1.2rem;
}
/* styles for specific answers */
.answer-calc-query {
margin: 0;
opacity: 0.5;
}
.answer-calc-constant {
color: #d2a6ff;
white-space: pre-wrap;
2023-12-20 23:17:46 +00:00
}
2023-12-20 23:45:16 +00:00
.answer-calc-string {
color: #aad94c;
}
.answer-calc-special {
color: #e6b673;
}
/* infobox */
.infobox {
margin-bottom: 1rem;
border: 1px solid #234;
padding: 0.5rem;
position: absolute;
top: 3.5rem;
max-width: 30rem;
margin-left: 42rem;
}
2023-12-21 08:11:21 +00:00
@media screen and (max-width: 74rem) {
/* small screens */
.infobox {
position: static;
margin: 0;
max-width: unset;
margin-bottom: 1rem;
}
.postsearch-infobox {
/* displaying these properly is too hard so don't */
display: none;
}
}
.infobox h2 {
margin-top: 0;
margin-bottom: 0.5em;
}
.infobox p {
margin: 0;
}
2023-12-21 09:57:49 +00:00
.infobox pre {
2023-12-21 06:19:52 +00:00
border: 1px solid #234;
padding: 0.5rem;
display: block;
2023-12-21 09:57:49 +00:00
}
.infobox pre > code {
2023-12-21 06:19:52 +00:00
font-weight: normal;
}
2023-12-21 09:57:49 +00:00
.infobox code {
2023-12-21 06:19:52 +00:00
font-weight: bold;
}
2023-12-31 06:15:18 +00:00
.infobox img {
max-width: 100%;
}
2023-12-21 09:57:49 +00:00
.infobox-docs_rs-version {
opacity: 0.5;
font-weight: normal;
font-size: 0.8em;
}
.postsearch-infobox p {
margin-bottom: 1em;
}