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

View File

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

View File

@ -13,38 +13,24 @@
<body>
{{>search/parts/search-header}}
<article>
{{>search/parts/search-form}}
{{>search/parts/search-form}}
<section class="cards">
<div class="infobox">
{{#if focusDomain}}
<section class="card semantic">
<h2>Similar Domains</h2>
<p class="description">
Showing domains similar to <tt>{{focusDomain}}</tt>.
</p>
</section>
Showing domains similar to <tt>{{focusDomain}}</tt>.
{{/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}}
{{#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>
</article>
{{>search/parts/search-footer}}
</body>

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<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">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
@ -12,26 +12,12 @@
<body>
{{>search/parts/search-header}}
{{>search/parts/search-form}}
<article>
{{>search/parts/search-form}}
<div class="infobox">
{{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}}
</body>

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<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">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
@ -12,37 +12,29 @@
<body>
{{>search/parts/search-header}}
{{>search/parts/search-form}}
<article>
{{>search/parts/search-form}}
<div class="infobox">
{{#unless entries}}
No definitions were found for that word
{{/unless}}
<section class="cards">
{{#unless entries}}
<div class="card problems">
<h2>No Results</h2>
<div class="description">No definitions were found for that word</div>
</div>
{{/unless}}
{{#if entries}}
<ul>
{{#each entries}}
<li>{{word}}, {{type}}: {{definition}}<br></li>
{{/each}}
</ul>
{{/if}}
</div>
{{#each entries}}
<div class="card definition">
<h2>{{type}} - {{word}}</h2>
<div class="description">{{definition}}</div>
</div>
{{/each}}
{{#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>
{{#if entries}}
<div class="infobox">
<h2>Legal</h2>
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>.
</div>
{{/if}}
{{>search/parts/search-footer}}
</body>

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<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">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
@ -13,17 +13,12 @@
<body>
{{>search/parts/search-header}}
<article>
{{>search/parts/search-form}}
<div class="cards big">
<div class="card problems">
<h2> {{ title }} </h2>
<div class="info"> {{{message}}} </div>
</div>
<div class="infobox">
<h2> {{ title }} </h2>
<div class="info"> {{{message}}} </div>
</div>
</article>
{{>search/parts/search-footer}}
</body>

View File

@ -1,11 +1,11 @@
<html>
<head>
<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">
</head>
<body>
<article>
<div class="infobox">
<h1>Error</h1>
<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
@ -15,6 +15,6 @@
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>
</article>
</div>
</body>
</html>

View File

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

View File

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