Fixed errors in merge

This commit is contained in:
squidfunk 2020-09-27 09:47:23 +02:00
parent 8f61fd3b56
commit 5be0004bcc
8 changed files with 9 additions and 33 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,12 @@
{ {
"assets/javascripts/bundle.js": "assets/javascripts/bundle.10eaee41.min.js", "assets/javascripts/bundle.js": "assets/javascripts/bundle.97a86bda.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.10eaee41.min.js.map", "assets/javascripts/bundle.js.map": "assets/javascripts/bundle.97a86bda.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.141042ad.min.js", "assets/javascripts/vendor.js": "assets/javascripts/vendor.141042ad.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.141042ad.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.141042ad.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.cbc634e2.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.cbc634e2.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.cbc634e2.min.js.map", "assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.cbc634e2.min.js.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.b6d72156.min.css", "assets/stylesheets/main.css": "assets/stylesheets/main.827fc144.min.css",
"assets/stylesheets/main.css.map": "assets/stylesheets/main.b6d72156.min.css.map", "assets/stylesheets/main.css.map": "assets/stylesheets/main.827fc144.min.css.map",
"assets/stylesheets/overrides.css": "assets/stylesheets/overrides.9514a156.min.css", "assets/stylesheets/overrides.css": "assets/stylesheets/overrides.9514a156.min.css",
"assets/stylesheets/overrides.css.map": "assets/stylesheets/overrides.9514a156.min.css.map", "assets/stylesheets/overrides.css.map": "assets/stylesheets/overrides.9514a156.min.css.map",
"assets/stylesheets/palette.css": "assets/stylesheets/palette.6b892c47.min.css", "assets/stylesheets/palette.css": "assets/stylesheets/palette.6b892c47.min.css",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.b6d72156.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.827fc144.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.6b892c47.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.6b892c47.min.css' | url }}">
@ -173,7 +173,7 @@
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/vendor.141042ad.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/vendor.141042ad.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.10eaee41.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.97a86bda.min.js' | url }}"></script>
{%- set translations = {} -%} {%- set translations = {} -%}
{%- for key in [ {%- for key in [
"clipboard.copy", "clipboard.copy",

View File

@ -75,22 +75,13 @@ function renderArticleDocument(
{ location, title, text, terms, score }: SearchDocument & SearchMetadata, { location, title, text, terms, score }: SearchDocument & SearchMetadata,
teaser: boolean teaser: boolean
) { ) {
const highlight: string[] = []
for (const [value, found] of Object.entries(terms))
if (found)
highlight.push(value)
const url = new URL(location)
url.searchParams.append("h", highlight.join(" "))
const miss = Object.keys(terms) const miss = Object.keys(terms)
// tslint:disable-next-line: array-type // tslint:disable-next-line: array-type
.reduce<Array<Element | string>>((list, key) => [ .reduce<Array<Element | string>>((list, key) => [
...list, ...!terms[key] ? [<del>{key}</del>, " "] : [] ...list, ...!terms[key] ? [<del>{key}</del>, " "] : []
], []) ], [])
return ( return (
<a href={url.toString().replace(/%20/g, "+")} class={css.link} tabIndex={-1}> <a href={location.toString().replace(/%20/g, "+")} class={css.link} tabIndex={-1}>
<article class={css.article} data-md-score={score.toFixed(2)}> <article class={css.article} data-md-score={score.toFixed(2)}>
<div class="md-search-result__icon md-icon"> <div class="md-search-result__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
@ -121,22 +112,13 @@ function renderArticleDocument(
function renderSection( function renderSection(
{ location, title, text, terms, score }: SearchDocument & SearchMetadata { location, title, text, terms, score }: SearchDocument & SearchMetadata
) { ) {
const highlight: string[] = []
for (const [value, found] of Object.entries(terms))
if (found)
highlight.push(value)
const url = new URL(location)
url.searchParams.append("h", highlight.join(" "))
const miss = Object.keys(terms) const miss = Object.keys(terms)
// tslint:disable-next-line: array-type // tslint:disable-next-line: array-type
.reduce<Array<Element | string>>((list, key) => [ .reduce<Array<Element | string>>((list, key) => [
...list, ...!terms[key] ? [<del>{key}</del>, " "] : [] ...list, ...!terms[key] ? [<del>{key}</del>, " "] : []
], []) ], [])
return ( return (
<a href={url.toString().replace(/%20/g, "+")} class={css.link} tabIndex={-1}> <a href={location.toString().replace(/%20/g, "+")} class={css.link} tabIndex={-1}>
<article class={css.section} data-md-score={score.toFixed(2)}> <article class={css.section} data-md-score={score.toFixed(2)}>
<h1 class={css.title}>{title}</h1> <h1 class={css.title}>{title}</h1>
{text.length > 0 && {text.length > 0 &&

View File

@ -716,5 +716,6 @@ $md-toggle__search--checked:
// Search term highlighting // Search term highlighting
mark { mark {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
background-color: transparent;
} }
} }