From ae6f1e44156d6da99795ae00a8243850bd0605a1 Mon Sep 17 00:00:00 2001 From: lakejason0 Date: Mon, 20 Sep 2021 13:18:29 +0800 Subject: [PATCH] Improve search --- resources/skin.less | 26 ++++++++++++++++++++++++++ resources/variables.less | 13 +++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/resources/skin.less b/resources/skin.less index 2978d3d..c041035 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -170,6 +170,32 @@ a { } } +.suggestions { + background: @background-color-search-suggestions; + box-shadow: @elevation; + + .suggestions-special { + background-color: @background-color-search-suggestions; + border: 1px solid @border-color-search-suggestions; + padding: 0.75em 2em; + } + + .suggestions-results { + background-color: @background-color-search-suggestions; + border: 1px solid @border-color-search-suggestions; + } + + .suggestions-result { + color: @color-search-suggestions-text; + padding: 0.65em 2em 0.35em; + } + + .suggestions-result-current { + background-color: @background-color-search-suggestions-current; + color: @color-search-suggestions-text-current; + } +} + #p-logo { min-width: min-content; margin-left: 40px; diff --git a/resources/variables.less b/resources/variables.less index 0c61b21..d97a349 100644 --- a/resources/variables.less +++ b/resources/variables.less @@ -14,11 +14,16 @@ --background-color-portlet-item-hover: #eee; --background-color-portlet-item-focus: #ccc; --background-color-edit-options: #eee; + --background-color-search-suggestions: #fff; + --background-color-search-suggestions-current: #1d5492; --border-color-edit-options: #c8ccd1; --border-color-content: #ccc; --border-color-toggle-list: #ddd; + --border-color-search-suggestions: #c8ccd1; --subheader-color-toggle-list: rgba( 0, 0, 0, 0.6 ); --logo-text-color-toggle-list: inherit; + --color-search-suggestions-text: #000; + --color-search-suggestions-text-current: #fff; --color-header: white; --color-base: #54595d; --color-gray: #a2a9b1; @@ -39,14 +44,18 @@ @background-color-toggle-list-card: var( --background-color-toggle-list-card ); @background-color-toggle-list-item-hover: var( --background-color-toggle-list-item-hover ); @background-color-toggle-list-item-focus: var( --background-color-toggle-list-item-focus ); -@background-color-edit-options: var(--background-color-edit-options); -@border-color-edit-options: var(--border-color-edit-options); +@background-color-edit-options: var( --background-color-edit-options ); +@background-color-search-suggestions: var( --background-color-search-suggestions ); +@background-color-search-suggestions-current: var( --background-color-search-suggestions-current ); +@border-color-edit-options: var( --border-color-edit-options ); @background-color-portlet-item-hover: var( --background-color-portlet-item-hover ); @background-color-portlet-item-focus: var( --background-color-portlet-item-focus ); @border-color-content: var( --border-color-content ); @border-color-toggle-list: var( --border-color-toggle-list ); +@border-color-search-suggestions: var(--border-color-search-suggestions); @subheader-color-toggle-list: var( --subheader-color-toggle-list ); @logo-text-color-toggle-list: var( --logo-text-color-toggle-list ); +@color-search-suggestions-text: var( --color-search-suggestions-text ); @color-header: var( --color-header ); @color-base: var( --color-base ); @color-gray: var( --color-gray );