Skip to content

Commit b434bdb

Browse files
refactor(MeiliSearch): use search-dialog-icon match search icon (#4969)
* refactor: 更新依赖包 9.1.2 * style: 更新变量 Co-Authored-By: Alex chow <[email protected]> * style: 增加 MeiliSearch 组件样式 * style: 调整搜索栏颜色 * chore: bump version 9.1.3 Co-Authored-By: Alex chow <[email protected]> --------- Co-authored-by: Alex chow <[email protected]>
1 parent ff8d775 commit b434bdb

File tree

5 files changed

+46
-46
lines changed

5 files changed

+46
-46
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<PackageReference Include="BootstrapBlazor.Markdown" Version="9.0.0" />
4747
<PackageReference Include="BootstrapBlazor.MaterialDesign" Version="9.0.0" />
4848
<PackageReference Include="BootstrapBlazor.MaterialDesign.Extensions" Version="9.0.0" />
49-
<PackageReference Include="BootstrapBlazor.MeiliSearch" Version="9.1.1" />
49+
<PackageReference Include="BootstrapBlazor.MeiliSearch" Version="9.1.3" />
5050
<PackageReference Include="BootstrapBlazor.Mermaid" Version="9.0.3" />
5151
<PackageReference Include="BootstrapBlazor.MindMap" Version="9.0.0" />
5252
<PackageReference Include="BootstrapBlazor.MouseFollower" Version="9.0.1" />

src/BootstrapBlazor.Server/wwwroot/css/site.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@
4444
}
4545

4646
html .search-dialog-mask {
47-
--bb-global-search-placeholder-color: #a88dbc;
48-
--bb-global-search-item-bg: #6522cc;
4947
--bb-global-search-item-active-bg: rgba(var(--bb-primary-color-rgb), 0.5);
5048
--bb-global-search-item-hover-bg: rgba(var(--bb-primary-color-rgb), 0.4);
5149
--bb-global-search-dialog-input-focus-border-color: var(--bb-primary-color);
5250
--bb-global-search-highlight-color: var(--bb-primary-color);
51+
--bb-global-search-footer-kbd-bg: #6522cc;
5352
}
5453

5554
.navbar {

src/BootstrapBlazor/wwwroot/scss/components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,4 @@
106106
@import "../../Components/TreeView/TreeView.razor.scss";
107107
@import "../../Components/Marquee/Marquee.razor.scss";
108108
@import "../../Components/Waterfall/Waterfall.razor.scss";
109+
@import "./meilisearch.scss";
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.bb-g-search {
2+
--bb-global-search-input-margin-left: .5rem;
3+
--bb-global-search-border-color: rgba(255,255,255,.5);
4+
--bb-global-search-color: rgba(255,255,255,.5);
5+
--bb-global-search-border-hover-color: rgba(255,255,255);
6+
--bb-global-search-padding: 0.25rem 0.75rem;
7+
--bb-global-search-width: 168px;
8+
display: flex;
9+
align-items: center;
10+
color: var(--bb-global-search-color);
11+
border: var(--bs-border-width) solid var(--bb-global-search-border-color);
12+
border-radius: var(--bs-border-radius);
13+
padding: var(--bb-global-search-padding);
14+
width: var(--bb-global-search-width);
15+
transition: border-color .3s linear;
16+
17+
&:hover {
18+
border: var(--bs-border-width) solid var(--bb-global-search-border-hover-color);
19+
}
20+
21+
> input {
22+
width: 100%;
23+
background-color: transparent;
24+
border: none;
25+
line-height: 1.5;
26+
padding: 0;
27+
margin-left: var(--bb-global-search-input-margin-left);
28+
cursor: pointer;
29+
30+
&::placeholder {
31+
color: var(--bb-global-search-border-color);
32+
}
33+
}
34+
35+
.search-dialog-icon {
36+
cursor: pointer;
37+
font-size: 18px;
38+
}
39+
}
40+
41+
.search-dialog-mask {
42+
display: none;
43+
}

src/BootstrapBlazor/wwwroot/scss/root.scss

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -76,49 +76,6 @@ a, a:hover, a:focus {
7676
--bs-popover-body-padding-y: 0.5rem;
7777
}
7878

79-
.bb-g-search {
80-
--bb-global-search-input-margin-left: .5rem;
81-
--bb-global-search-border-color: rgba(255,255,255,.5);
82-
--bb-global-search-color: rgba(255,255,255,.5);
83-
--bb-global-search-border-hover-color: rgba(255,255,255);
84-
--bb-global-search-padding: 0.25rem 0.75rem;
85-
--bb-global-search-width: 168px;
86-
display: flex;
87-
align-items: center;
88-
color: var(--bb-global-search-color);
89-
border: var(--bs-border-width) solid var(--bb-global-search-border-color);
90-
border-radius: var(--bs-border-radius);
91-
padding: var(--bb-global-search-padding);
92-
width: var(--bb-global-search-width);
93-
transition: border-color .3s linear;
94-
95-
&:hover {
96-
border: var(--bs-border-width) solid var(--bb-global-search-border-hover-color);
97-
}
98-
99-
> input {
100-
width: 100%;
101-
background-color: transparent;
102-
border: none;
103-
line-height: 1.5;
104-
padding: 0;
105-
margin-left: var(--bb-global-search-input-margin-left);
106-
cursor: pointer;
107-
108-
&::placeholder {
109-
color: var(--bb-global-search-border-color);
110-
}
111-
}
112-
113-
> i {
114-
cursor: pointer;
115-
}
116-
}
117-
118-
.search-dialog-mask {
119-
display: none;
120-
}
121-
12279
::view-transition-old(root) {
12380
animation: none;
12481
}

0 commit comments

Comments
 (0)