You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by ww...@apache.org on 2021/07/14 16:24:59 UTC
[incubator-yunikorn-site] branch master updated: [Yunikorn 701] Add
search box to the website (#62)
This is an automated email from the ASF dual-hosted git repository.
wwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-yunikorn-site.git
The following commit(s) were added to refs/heads/master by this push:
new 94663a0 [Yunikorn 701] Add search box to the website (#62)
94663a0 is described below
commit 94663a0c42f8ed407d331d9d0d4a552dc8e68295
Author: 0yukali0 <45...@users.noreply.github.com>
AuthorDate: Thu Jul 15 00:24:50 2021 +0800
[Yunikorn 701] Add search box to the website (#62)
---
Dockerfile | 1 +
docusaurus.config.js | 4 ++++
src/css/custom.css | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
diff --git a/Dockerfile b/Dockerfile
index be644a4..31de517 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,5 +19,6 @@ ADD . /incubator-yunikorn-site
WORKDIR /incubator-yunikorn-site
RUN yarn install
+RUN yarn add @docusaurus/theme-search-algolia
RUN yarn build
ENTRYPOINT yarn start --host 0.0.0.0
\ No newline at end of file
diff --git a/docusaurus.config.js b/docusaurus.config.js
index ba3545a..c2014e5 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -219,5 +219,9 @@ Copyright © ${new Date().getFullYear()} <a href="http://www.apache.org/">The Ap
</div>
`
},
+ algolia: {
+ apiKey: '4e3b9e554923fe089858c5896fdeac85',
+ indexName: 'yunikorn-docsearch',
+ },
}
};
diff --git a/src/css/custom.css b/src/css/custom.css
index 6d11b37..0b4f312 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -158,3 +158,43 @@ html[data-theme='dark'] .header-github-link:before {
height: auto;
width: 50px;
}
+
+html[data-theme='light'] .DocSearch {
+ /* --docsearch-primary-color: var(--ifm-color-primary); */
+ /* --docsearch-text-color: var(--ifm-font-color-base); */
+ --docsearch-muted-color: var(--ifm-color-secondary-darkest);
+ --docsearch-container-background: rgba(94, 100, 112, 0.7);
+ /* Modal */
+ --docsearch-modal-background: var(--ifm-color-secondary-lighter);
+ /* Search box */
+ --docsearch-searchbox-background: var(--ifm-color-secondary);
+ --docsearch-searchbox-focus-background: var(--ifm-color-white);
+ /* Hit */
+ --docsearch-hit-color: var(--ifm-font-color-base);
+ --docsearch-hit-active-color: var(--ifm-color-white);
+ --docsearch-hit-background: var(--ifm-color-white);
+ /* Footer */
+ --docsearch-footer-background: var(--ifm-color-white);
+}
+
+html[data-theme='dark'] .DocSearch {
+ --docsearch-text-color: var(--ifm-font-color-base);
+ --docsearch-muted-color: var(--ifm-color-secondary-darkest);
+ --docsearch-container-background: rgba(47, 55, 69, 0.7);
+ /* Modal */
+ --docsearch-modal-background: var(--ifm-background-color);
+ /* Search box */
+ --docsearch-searchbox-background: var(--ifm-background-color);
+ --docsearch-searchbox-focus-background: var(--ifm-color-black);
+ /* Hit */
+ --docsearch-hit-color: var(--ifm-font-color-base);
+ --docsearch-hit-active-color: var(--ifm-color-white);
+ --docsearch-hit-background: var(--ifm-color-emphasis-100);
+ /* Footer */
+ --docsearch-footer-background: var(--ifm-background-surface-color);
+ --docsearch-key-gradient: linear-gradient(
+ -26.5deg,
+ var(--ifm-color-emphasis-200) 0%,
+ var(--ifm-color-emphasis-100) 100%
+ );
+}
\ No newline at end of file