From 433aba839ccd43002295113ec2fae536f63f8e3b Mon Sep 17 00:00:00 2001 From: Mark Zegarelli Date: Thu, 21 Sep 2023 11:05:07 -0700 Subject: [PATCH] Move Algolia CSS --- docs/stylesheets/extra.css | 44 +++++++++++++++++++++++++++++++++++ overrides/main.html | 47 +------------------------------------- 2 files changed, 45 insertions(+), 46 deletions(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index c9636c9a5..82d98cb44 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -562,4 +562,48 @@ textarea.at-field { table code { white-space : pre-wrap !important; +} + +/* Algolia DocSearch Styles */ + + +.DocSearch-Hit-content-wrapper { + font-size: 1.25em; +} + +.DocSearch-Button { + align-items: center; + background: rgba(0, 0, 0, 0.26); + border: 0; + border-radius: 2px; + color: rgba(255,255,255,0.8); + cursor: pointer; + display: flex; + font-weight: 500; + height: 1.8rem; + justify-content: space-between; + margin: 0 0 0 16px; + padding: 0 8px; + user-select: none; + transition: color .25s, background-color .25s; +} + +.DocSearch-Button:hover, .DocSearch-Button:active { + background-color: #ffffff1f; + box-shadow: none; + color: rgba(255,255,255,0.8); + outline: none; +} + +.DocSearch-Button .DocSearch-Search-Icon { + color: rgba(255,255,255,0.8); +} + +.DocSearch-Button-Placeholder { + font-size: .8rem; + margin-right:1.5rem; +} + +.DocSearch-Hit-source { + font-size: .5rem; } \ No newline at end of file diff --git a/overrides/main.html b/overrides/main.html index b9d9c5b7f..cd4bab0d3 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -5,51 +5,6 @@ {% block styles %} {{ super() }} - - - {% endblock %} {% block site_meta %} @@ -66,7 +21,7 @@ indexName: 'developers-amplitude', insights: true, // Optional, automatically send insights when user interacts with search result container: '#docsearch', - debug: true, // Set debug to true if you want to inspect the modal + debug: false, // Set debug to true if you want to inspect the modal transformItems(items) { return items.map((item) => ({ ...item,