This is an automated email from the ASF dual-hosted git repository.
jeffreyh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 6fcf5f6ae5b [fix]:fix search box flickering && update markdown style
(#1534)
6fcf5f6ae5b is described below
commit 6fcf5f6ae5b24f1ec46bc57371ab5d157dbad28c
Author: yangon <[email protected]>
AuthorDate: Wed Dec 18 11:53:25 2024 +0800
[fix]:fix search box flickering && update markdown style (#1534)
Co-authored-by: liyang <[email protected]>
---
src/scss/components/markdown.scss | 14 +++++---------
src/scss/custom.scss | 2 +-
src/theme/Layout/index.tsx | 18 ++++++++++--------
3 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/src/scss/components/markdown.scss
b/src/scss/components/markdown.scss
index bd6dd7b99cc..ae5fc40f67e 100644
--- a/src/scss/components/markdown.scss
+++ b/src/scss/components/markdown.scss
@@ -24,7 +24,7 @@
h4,
h5,
h6 {
- color: #1d1d1d;
+ color: #00000a;
margin-bottom: 0.3125rem;
font-weight: 500;
}
@@ -58,14 +58,10 @@
h2,
h3,
h4,
- p {
- margin-bottom: calc(var(--custom-leading) *
var(--custom-heading-rhythm-bottom)) !important;
- }
-
+ p,
ol,
- ul,
- li {
- margin-bottom: calc(var(--custom-leading) *
var(--custom-list-rhythm-bottom));
+ ul {
+ margin-bottom: calc(var(--custom-leading) *
var(--custom-heading-rhythm-bottom)) !important;
}
.theme-code-block,
@@ -224,7 +220,7 @@
list-style-type: square;
}
- li>* {
+ li > * {
margin-bottom: calc(var(--custom-leading) *
var(--custom-list-rhythm-bottom)) !important;
}
diff --git a/src/scss/custom.scss b/src/scss/custom.scss
index 81686b78397..31adcc461b7 100644
--- a/src/scss/custom.scss
+++ b/src/scss/custom.scss
@@ -53,7 +53,7 @@ html[lang='en-US'] {
// }
.markdown :where(p, h1, h2, h3, h4, h5, h6, li, blockquote) {
font-family: var(--font-family-base);
- color: #2a2f34;
+ color: #1F1F26;
}
body {
diff --git a/src/theme/Layout/index.tsx b/src/theme/Layout/index.tsx
index a9c3a379a51..c67a1315d28 100644
--- a/src/theme/Layout/index.tsx
+++ b/src/theme/Layout/index.tsx
@@ -48,12 +48,11 @@ export default function Layout(props: Props): JSX.Element {
useEffect(() => {
if (showSearchPageMobile) {
- window.scroll(0, 0);
+ window.scroll(0,0)
document.body.style.overflow = 'hidden';
searchPageDom.current.style.height = '100vh';
- searchPageDom.current.style.display = 'block';
} else {
- searchPageDom.current.style.display = 'none';
+ window.scroll(0, 0);
document.body.style.overflow = 'auto';
}
}, [showSearchPageMobile]);
@@ -66,11 +65,14 @@ export default function Layout(props: Props): JSX.Element {
<SkipToContent />
<AnnouncementBar />
<Navbar />
- <div ref={searchPageDom}>
- <NavbarSearch>
- <SearchBar />
- </NavbarSearch>
- </div>
+ {showSearchPageMobile ? (
+ <div ref={searchPageDom}>
+ <NavbarSearch>
+ <SearchBar />
+ </NavbarSearch>
+ </div>
+ ) : null}
+
<div
id={SkipToContentFallbackId}
className={clsx(ThemeClassNames.wrapper.main,
styles.mainWrapper, wrapperClassName)}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]