mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-30 17:46:21 -04:00
Moved search result icon to CSS for deduplication
This commit is contained in:
@@ -45,20 +45,6 @@ const css = {
|
||||
terms: "md-search-result__terms"
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Path of `content-copy` icon
|
||||
*/
|
||||
const path =
|
||||
"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H13C12.59,21.75 12.2,21.44 " +
|
||||
"11.86,21.1C11.53,20.77 11.25,20.4 11,20H6V4H13V9H18V10.18C18.71,10.34 " +
|
||||
"19.39,10.61 20,11V8L14,2M20.31,18.9C21.64,16.79 21,14 " +
|
||||
"18.91,12.68C16.8,11.35 14,12 12.69,14.08C11.35,16.19 12,18.97 " +
|
||||
"14.09,20.3C15.55,21.23 17.41,21.23 " +
|
||||
"18.88,20.32L22,23.39L23.39,22L20.31,18.9M16.5,19A2.5,2.5 0 0,1 " +
|
||||
"14,16.5A2.5,2.5 0 0,1 16.5,14A2.5,2.5 0 0,1 19,16.5A2.5,2.5 0 0,1 16.5,19Z"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Helper function
|
||||
* ------------------------------------------------------------------------- */
|
||||
@@ -83,11 +69,7 @@ function renderArticleDocument(
|
||||
return (
|
||||
<a href={location.toString().replace(/%20/g, "+")} class={css.link} tabIndex={-1}>
|
||||
<article class={css.article} data-md-score={score.toFixed(2)}>
|
||||
<div class="md-search-result__icon md-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d={path}></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="md-search-result__icon md-icon"></div>
|
||||
<h1 class={css.title}>{title}</h1>
|
||||
{teaser && text.length > 0 &&
|
||||
<p class={css.teaser}>{truncate(text, 320)}</p>
|
||||
|
||||
Reference in New Issue
Block a user