(search) Update conversion results, error page, and dictionary results with new CSS.

This commit is contained in:
Viktor Lofgren 2023-11-19 16:03:44 +01:00
parent 7c8a60b8cf
commit 42ea87d637
9 changed files with 61 additions and 112 deletions

View File

@ -48,12 +48,6 @@ body {
display: inline-block; display: inline-block;
color: #000; color: #000;
} }
.link-unavailable {
display: inline-block;
text-decoration: line-through;
color: #888;
}
} }
li.current { li.current {
@ -154,6 +148,10 @@ header {
} }
.infobox { .infobox {
h2 {
@extend .heading;
}
background-color: #fff; background-color: #fff;
padding: 1ch; padding: 1ch;
margin: 1ch; margin: 1ch;
@ -177,17 +175,7 @@ section.cards {
box-shadow: #0008 0 0 5px; box-shadow: #0008 0 0 5px;
h2 { h2 {
color: #fff; @extend .heading;
background-color: $highlight-light;
border-bottom: 1px solid $border-color;
font-weight: normal;
font-size: 12pt;
padding: .5ch .5ch .5ch .5ch;
margin: 0 0 0 0;
word-break: break-word;
font-family: $heading-fonts;
text-decoration: none;
} }
h2 a { h2 a {
@ -289,12 +277,15 @@ footer {
margin: 0; margin: 0;
padding: 0.5ch; padding: 0.5ch;
background-color: $highlight-dark; background-color: $highlight-dark;
border-bottom: 1px solid $border-color;
font-family: $heading-fonts; font-family: $heading-fonts;
font-weight: normal; font-weight: normal;
color: $fg-light; color: $fg-light;
font-size: 12pt; font-size: 12pt;
word-break: break-word;
} }
.sidebar-narrow { .sidebar-narrow {
display: grid; display: grid;
grid-template-columns: auto max-content; grid-template-columns: auto max-content;

View File

@ -1,4 +1,4 @@
<section class="card browse-result"> <section class="card">
<h2>{{url.domain}}</h2> <h2>{{url.domain}}</h2>
<a href="{{url.proto}}://{{url.domain}}/"> <a href="{{url.proto}}://{{url.domain}}/">

View File

@ -13,38 +13,24 @@
<body> <body>
{{>search/parts/search-header}} {{>search/parts/search-header}}
{{>search/parts/search-form}}
<article>
{{>search/parts/search-form}}
<section class="cards"> <section class="cards">
<div class="infobox">
{{#if focusDomain}} {{#if focusDomain}}
<section class="card semantic"> Showing domains similar to <tt>{{focusDomain}}</tt>.
<h2>Similar Domains</h2>
<p class="description">
Showing domains similar to <tt>{{focusDomain}}</tt>.
</p>
</section>
{{/if}} {{/if}}
{{#unless focusDomain}}
This list of domains is random. <a href="https://search.marginalia.nu/explore/random">Refresh</a> to get
new domains, or click <b>Similar Domains</b> to
take the helm.
{{/unless}}
</div>
{{#each results}}{{>search/browse-result}}{{/each}} {{#each results}}{{>search/browse-result}}{{/each}}
{{#unless focusDomain}}
<section class="card semantic">
<h2>Random Domains</h2>
<p class="description">
This list of domains is random. <a href="/explore/random">Refresh</a> to get
new domains, or click <b>Similar Domains</b> to
take the helm.
</p>
</section>
{{/unless}}
</section> </section>
</article>
{{>search/parts/search-footer}} {{>search/parts/search-footer}}
</body> </body>

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Marginalia Search - {{query}}</title> <title>Marginalia Search - {{query}}</title>
<link rel="stylesheet" href="/style-new.css" /> <link rel="stylesheet" href="/serp.css" />
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Marginalia"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Marginalia">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" /> <meta name="robots" content="noindex" />
@ -12,26 +12,12 @@
<body> <body>
{{>search/parts/search-header}} {{>search/parts/search-header}}
{{>search/parts/search-form}}
<article> <div class="infobox">
{{>search/parts/search-form}} {{query}} = {{result}}
</div>
<section class="cards">
<div class="card semantic">
<h2>{{query}}</h2>
<p class="description">{{result}}</p>
</div>
<div class="card problem">
<h2>Warning</h2>
<p class="description">
These results use floating point calculations, and may not be accurate
for very large or very small numbers. Do not use for orbital calculations,
thesis projects, or other sensitive work.
</p>
</div>
</section>
</article>
{{>search/parts/search-footer}} {{>search/parts/search-footer}}
</body> </body>

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Marginalia Search - {{query}}</title> <title>Marginalia Search - {{query}}</title>
<link rel="stylesheet" href="/style-new.css" /> <link rel="stylesheet" href="/serp.css" />
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Marginalia"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Marginalia">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" /> <meta name="robots" content="noindex" />
@ -12,37 +12,29 @@
<body> <body>
{{>search/parts/search-header}} {{>search/parts/search-header}}
{{>search/parts/search-form}}
<article> <div class="infobox">
{{>search/parts/search-form}} {{#unless entries}}
No definitions were found for that word
{{/unless}}
<section class="cards"> {{#if entries}}
{{#unless entries}} <ul>
<div class="card problems"> {{#each entries}}
<h2>No Results</h2> <li>{{word}}, {{type}}: {{definition}}<br></li>
<div class="description">No definitions were found for that word</div> {{/each}}
</div> </ul>
{{/unless}} {{/if}}
</div>
{{#each entries}} {{#if entries}}
<div class="card definition"> <div class="infobox">
<h2>{{type}} - {{word}}</h2> <h2>Legal</h2>
<div class="description">{{definition}}</div> This data is derived from <a href="https://en.wiktionary.org/">wiktionary</a>,
</div> available under GFDL and CC BY-SA 3.0. <a href="https://dumps.wikimedia.org/legal.html">More Information</a>.
{{/each}} </div>
{{/if}}
{{#if entries}}
<div class="card problem">
<h2>Legal</h2>
<p class="description">
This data is derived from <a href="https://en.wiktionary.org/">wiktionary</a>,
available under GFDL and CC BY-SA 3.0. <a href="https://dumps.wikimedia.org/legal.html">More Information</a>.
</p>
</div>
{{/if}}
</section>
</article>
{{>search/parts/search-footer}} {{>search/parts/search-footer}}
</body> </body>

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Marginalia Search - {{title}}</title> <title>Marginalia Search - {{title}}</title>
<link rel="stylesheet" href="/style-new.css" /> <link rel="stylesheet" href="/serp.css" />
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Marginalia"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Marginalia">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" /> <meta name="robots" content="noindex" />
@ -13,17 +13,12 @@
<body> <body>
{{>search/parts/search-header}} {{>search/parts/search-header}}
<article>
{{>search/parts/search-form}} {{>search/parts/search-form}}
<div class="cards big"> <div class="infobox">
<div class="card problems"> <h2> {{ title }} </h2>
<h2> {{ title }} </h2> <div class="info"> {{{message}}} </div>
<div class="info"> {{{message}}} </div>
</div>
</div> </div>
</article>
{{>search/parts/search-footer}} {{>search/parts/search-footer}}
</body> </body>

View File

@ -1,11 +1,11 @@
<html> <html>
<head> <head>
<title>Error</title> <title>Error</title>
<link rel="stylesheet" href="https://www.marginalia.nu/style.css"> <link rel="stylesheet" href="serp.css">
<meta http-equiv="refresh" content="5"> <meta http-equiv="refresh" content="5">
</head> </head>
<body> <body>
<article> <div class="infobox">
<h1>Error</h1> <h1>Error</h1>
<p>Oops! It appears the index server is <span class="headline">{{indexState}}</span>.</p> <p>Oops! It appears the index server is <span class="headline">{{indexState}}</span>.</p>
<p>The server was probably restarted to bring online some changes. Restarting the index typically takes <p>The server was probably restarted to bring online some changes. Restarting the index typically takes
@ -15,6 +15,6 @@
on Twitter may have details, otherwise you can always send me an email at <tt>kontakt@marginalia.nu</tt>.</p> on Twitter may have details, otherwise you can always send me an email at <tt>kontakt@marginalia.nu</tt>.</p>
<p>This page will attempt to refresh automatically every few seconds.</p> <p>This page will attempt to refresh automatically every few seconds.</p>
</article> </div>
</body> </body>
</html> </html>

View File

@ -1,10 +1,10 @@
<section class="card"> <section class="card">
<h2>Updates</h2> <h2>Updates</h2>
<div class="info"> <div class="info">
<p>☛ It is possible to search by website generator.</p> <p>☛ It is possible to search by website generator.</p>
<p>☛ New filters for forums and wikis are added.</p> <p>☛ New filters for forums and wikis are added.</p>
</div> </div>
<div class="utils"> <div class="utils">
<a href="https://www.marginalia.nu/release-notes/">Release Notes</a> <a href="https://www.marginalia.nu/release-notes/">Release Notes</a>
</div> </div>
</section> </section>

View File

@ -15,7 +15,6 @@
<!-- Hi there, fellow human being :-) --> <!-- Hi there, fellow human being :-) -->
{{>search/parts/search-header}} {{>search/parts/search-header}}
{{>search/parts/search-form}} {{>search/parts/search-form}}
<section class="sidebar-narrow"> <section class="sidebar-narrow">