-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement algolia docsearch (#15)
* feat: implement algolia docsearch * feat: update docsearch primary color
- Loading branch information
Showing
7 changed files
with
315 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import "docsearch.css"; | ||
|
||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
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,41 @@ | ||
:root { | ||
--docsearch-primary-color: #65a30d !important; | ||
} | ||
|
||
.DocSearch.DocSearch-Button { | ||
@apply inline-flex w-auto lg:w-[16rem] items-center ml-0 px-3 p-5 lg:py-[1.3rem] transition bg-amber-400 hover:bg-amber-400 ring-1 hover:ring-1 ring-amber-300 hover:ring-amber-200 rounded-full font-semibold | ||
} | ||
|
||
.DocSearch-Search-Icon { | ||
@apply stroke-2 w-[17px] h-[17px] !important | ||
} | ||
|
||
.DocSearch-Button-Placeholder { | ||
@apply hidden lg:block text-black p-0 font-medium !important | ||
} | ||
|
||
.DocSearch-Button-Container { | ||
@apply inline-flex gap-2 | ||
} | ||
|
||
.DocSearch-Button-Keys { | ||
all: unset !important; | ||
@apply hidden lg:block !important | ||
} | ||
|
||
.DocSearch-Button-Key { | ||
all: unset !important; | ||
@apply text-black font-exception font-medium text-lg !important | ||
} | ||
|
||
.DocSearch-Button-Key--pressed { | ||
@apply translate-x-0 !important | ||
} | ||
|
||
.DocSearch-Form { | ||
@apply ring-2 ring-lime-600 !important | ||
} | ||
|
||
.DocSearch-MagnifierLabel, .DocSearch-Reset { | ||
@apply text-lime-600 !important | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
import './bootstrap'; | ||
import './docsearch'; |
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,11 @@ | ||
import docsearch from '@docsearch/js'; | ||
|
||
import '@docsearch/css'; | ||
|
||
docsearch({ | ||
container: '#search', | ||
appId: 'ZZSBJRTP9N', | ||
indexName: 'laravel-errors', | ||
apiKey: 'afe4b786abd24d3123d50c7ff21e544d', | ||
placeholder: 'Search' | ||
}); |
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