This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
forked from algolia/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docsearch): introduce DocSearch.js v3 (#56)
- Loading branch information
0 parents
commit 86a6a5d
Showing
4 changed files
with
787 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "@docsearch/css", | ||
"version": "1.0.0-alpha.21", | ||
"license": "MIT", | ||
"homepage": "https://github.com/algolia/autocomplete.js", | ||
"repository": "algolia/autocomplete.js", | ||
"author": { | ||
"name": "Algolia, Inc.", | ||
"url": "https://www.algolia.com" | ||
}, | ||
"sideEffects": false, | ||
"files": [ | ||
"dist/" | ||
], | ||
"main": "dist/style.css", | ||
"unpkg": "dist/style.css", | ||
"jsdelivr": "dist/style.css", | ||
"scripts": { | ||
"build": "yarn build:clean && yarn build:css", | ||
"build:css": "mkdir dist && cp src/_variables.css dist/ && cp src/modal.css dist/ && cp src/search-button.css dist/ && cat src/*.css > dist/style.css", | ||
"build:css:watch": "chokidar src/*.css --command \"yarn build:css\"", | ||
"build:clean": "rm -rf ./dist", | ||
"watch": "concurrently \"yarn build:css:watch\"" | ||
} | ||
} |
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,74 @@ | ||
/* Variables */ | ||
|
||
:root { | ||
--docsearch-primary-color: rgb(84, 104, 255); | ||
--docsearch-text-color: rgb(28, 30, 33); | ||
--docsearch-spacing: 12px; | ||
--docsearch-icon-stroke-width: 1.4; | ||
--docsearch-highlight-color: var(--docsearch-primary-color); | ||
--docsearch-muted-color: rgb(150, 159, 175); | ||
--docsearch-container-background: rgba(101, 108, 133, 0.8); | ||
--docsearch-logo-color: rgba(84, 104, 255); | ||
|
||
/* modal */ | ||
--docsearch-modal-width: 560px; | ||
--docsearch-modal-height: 600px; | ||
--docsearch-modal-background: rgb(245, 246, 247); | ||
--docsearch-modal-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.5), | ||
0 3px 8px 0 rgba(85, 90, 100, 1); | ||
|
||
/* searchbox */ | ||
--docsearch-searchbox-height: 56px; | ||
--docsearch-searchbox-background: rgb(235, 237, 240); | ||
--docsearch-searchbox-focus-background: #fff; | ||
--docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color); | ||
|
||
/* hit */ | ||
--docsearch-hit-height: 56px; | ||
--docsearch-hit-color: rgb(68, 73, 80); | ||
--docsearch-hit-active-color: #fff; | ||
--docsearch-hit-background: #fff; | ||
--docsearch-hit-shadow: 0 1px 3px 0 rgb(212, 217, 225); | ||
|
||
/* key */ | ||
--docsearch-key-gradient: linear-gradient( | ||
-225deg, | ||
rgb(213, 219, 228) 0%, | ||
rgb(248, 248, 248) 100% | ||
); | ||
--docsearch-key-shadow: inset 0 -2px 0 0 rgb(205, 205, 230), | ||
inset 0 0 1px 1px #fff, 0 1px 2px 1px rgba(30, 35, 90, 0.4); | ||
|
||
/* footer */ | ||
--docsearch-footer-height: 44px; | ||
--docsearch-footer-background: #fff; | ||
--docsearch-footer-shadow: 0 -1px 0 0 rgb(224, 227, 232), | ||
0 -3px 6px 0 rgba(69, 98, 155, 0.12); | ||
} | ||
|
||
/* Darkmode */ | ||
|
||
html[data-theme='dark'] { | ||
--docsearch-text-color: rgb(245, 246, 247); | ||
--docsearch-container-background: rgba(9, 10, 17, 0.8); | ||
--docsearch-modal-background: rgb(21, 23, 42); | ||
--docsearch-modal-shadow: inset 1px 1px 0 0 rgb(44, 46, 64), | ||
0 3px 8px 0 rgb(0, 3, 9); | ||
--docsearch-searchbox-background: rgb(9, 10, 17); | ||
--docsearch-searchbox-focus-background: #000; | ||
--docsearch-hit-color: rgb(190, 195, 201); | ||
--docsearch-hit-shadow: none; | ||
--docsearch-hit-background: rgb(9, 10, 17); | ||
--docsearch-key-gradient: linear-gradient( | ||
-26.5deg, | ||
rgb(86, 88, 114) 0%, | ||
rgb(49, 53, 91) 100% | ||
); | ||
--docsearch-key-shadow: inset 0 -2px 0 0 rgb(40, 45, 85), | ||
inset 0 0 1px 1px rgb(81, 87, 125), 0 2px 2px 0 rgba(3, 4, 9, 0.3); | ||
--docsearch-footer-background: rgb(30, 33, 54); | ||
--docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, 0.5), | ||
0 -4px 8px 0 rgba(0, 0, 0, 0.2); | ||
--docsearch-logo-color: rgb(255, 255, 255); | ||
--docsearch-muted-color: rgb(127, 132, 151); | ||
} |
Oops, something went wrong.