Skip to content

Commit 9a141d0

Browse files
committed
fix: Add decorative svg search icon
1 parent 9812ae7 commit 9a141d0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/.vuepress/theme/components/TheHeader.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
class="flex items-center flex-grow-0 w-3/5 h-16 md:pl-4 lg:pl-0 md:pr-0 md:w-auto md:flex-grow"
3131
:class="{ 'w-4/5': !hasSidebar }"
3232
>
33-
<form class="w-full lg:pl-10">
33+
<form class="relative w-full lg:pl-10">
34+
<vp-icon
35+
name="search"
36+
class="absolute z-20 ml-3 pin-c-y"
37+
/>
3438
<SearchBox
3539
role="search"
3640
class="w-full"

src/.vuepress/theme/styles/_override.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
div.search-box {
66
input {
77
@apply w-full py-5 pl-10 rounded-md;
8+
background: none;
89
background-color: var(--bg-input);
910
border-color: var(--border-color);
11+
color: var(--color);
12+
font-size: 16px;
1013
left: 0;
11-
background-image: url('~@/theme/assets/sprite/svg/search.svg');
12-
background-position: 16px center;
14+
z-index: 10;
1315

1416
&:focus {
1517
outline: auto;

0 commit comments

Comments
 (0)