forked from Tencent/wujie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(doc): add algolia search (Tencent#447)
* feat: add algolia search * feat: add algolia search * feat: algolia search style * feat: algolia search style * feat: algolia search style
- Loading branch information
Showing
8 changed files
with
640 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ coverage | |
.history | ||
|
||
# Log files | ||
.pnpm-debug.log* | ||
.pnpm-debug.log* | ||
cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
:root { | ||
--vp-z-index-doc-search: 1000 !important; | ||
--vp-doc-search-background-color: linear-gradient(45deg, var(--color1), var(--color1), var(--color2), var(--color1)); | ||
} | ||
|
||
.DocSearch { | ||
--docsearch-primary-color: var(--vp-c-brand) !important; | ||
} | ||
|
||
.DocSearch-Container { | ||
z-index: var(--vp-z-index-doc-search); | ||
} | ||
|
||
.DocSearch-Button { | ||
font-weight: bold; | ||
width: 18vw; | ||
display: flex; | ||
justify-content: space-between; | ||
border: none; | ||
outline: none; | ||
color: #fff; | ||
cursor: pointer; | ||
position: relative; | ||
background-color: var(--vp-c-bg-soft-mute); | ||
z-index: 0; | ||
border-radius: 10px; | ||
} | ||
|
||
.DocSearch-Button:before { | ||
content: ""; | ||
background: var(--vp-doc-search-background-color); | ||
position: absolute; | ||
top: -2px; | ||
left: -2px; | ||
background-size: 400%; | ||
z-index: -1; | ||
filter: blur(4px); | ||
width: calc(100% + 4px); | ||
height: calc(100% + 4px); | ||
animation: RhyshaKachari-glowing 20s linear infinite; | ||
opacity: 1; | ||
transition: opacity 0.3s ease-in-out; | ||
border-radius: 10px; | ||
} | ||
|
||
.DocSearch-Button:after { | ||
z-index: -1; | ||
content: ""; | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background-color: var(--vp-c-bg-soft-mute); | ||
left: 0; | ||
top: 0; | ||
border-radius: 10px; | ||
} | ||
|
||
@keyframes RhyshaKachari-glowing { | ||
0% { | ||
background-position: 0 0; | ||
} | ||
|
||
50% { | ||
background-position: 400% 0; | ||
} | ||
|
||
100% { | ||
background-position: 0 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.