Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: in dark mode, the background color of search results #67

Merged
merged 3 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/theme-default/components/Nav/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
padding-right: 32px;
-webkit-backdrop-filter: saturate(50%) blur(8px);
backdrop-filter: saturate(50%) blur(8px);
background: rgba(255, 255, 255, 0.7);
}

:global(.dark) .has-sidebar .content {
Expand Down
2 changes: 1 addition & 1 deletion src/theme-default/components/Nav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export function Nav() {
relative=""
p="l-8 sm:x-8"
transition="background-color duration-500"
className="divider-bottom lg:border-b-transparent"
className="divider-bottom sm:border-b-transparent lg:border-b-transparent"
nav-h="mobile lg:desktop"
>
<div
Expand Down
10 changes: 7 additions & 3 deletions src/theme-default/components/Search/Suggestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ export function SuggestionContent(props: {
};
return (
<div
border-1=""
border-b-1=""
border-t-1=""
table-cell=""
p="x-3 y-2"
hover="bg-[#f3f4f5]"
className={`border-right-none ${props.isCurrent ? 'bg-[#f3f4f5]' : ''}`}
hover="bg-[#f3f4f5] "
text="#2c3e50"
className={`border-right-none border-[#eaecef] ${
props.isCurrent ? 'bg-[#f3f4f5]' : 'bg-white'
}`}
transition="bg duration-200"
>
<div font="medium" text="sm">
Expand Down
22 changes: 15 additions & 7 deletions src/theme-default/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,34 @@ export function Search(
z="60"
pos="top-8"
border-1=""
border-rd-1=""
p="2"
list="none"
bg="bg-default"
className="min-w-500px max-w-700px"
className="min-w-500px max-w-700px bg-white"
>
{/* Show the suggestions */}
{suggestions.map((item, index) => (
<li key={item.title} rounded="sm" cursor="pointer" w="100%">
<li
key={item.title}
rounded="sm"
cursor="pointer"
w="100%"
className="border-collapse"
>
<a block="" href={item.link} className="whitespace-normal">
<div table="" w="100%" className="border-collapse">
<div
w="35%"
border-1=""
border-t-1=""
border-b-1=""
border-r-1=""
border-left="none"
table-cell=""
align="middle right"
p="1.2"
text="sm right"
text="sm right [#2c3e50]"
font="semibold"
className="bg-[#f5f5f5]"
className="bg-[#f5f5f5] border-[#eaecef]"
>
{item.title}
</div>
Expand All @@ -157,7 +165,7 @@ export function Search(
{/* Show the not found info */}
{showNotFound && (
<li flex="center">
<div p="2" text="sm gray-light">
<div p="2" text="sm #2c3e50">
No results found
</div>
</li>
Expand Down