Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions i18n/zh-CN/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"message": "版本发布",
"description": "The label for category Releases in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "使用教程",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.category.Building lakehouse": {
"message": "构建 lakehouse",
"description": "The label for category Building lakehouse in sidebar docs"
},
"sidebar.docs.category.Quick Start": {
"message": "快速体验",
"description": "The label for category Quick Start in sidebar docs"
Expand Down
8 changes: 8 additions & 0 deletions i18n/zh-CN/docusaurus-plugin-content-docs/version-1.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"message": "Doris 介绍",
"description": "The label for category Doris Introduction in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "使用教程",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.category.Building lakehouse": {
"message": "构建 lakehouse",
"description": "The label for category Building lakehouse in sidebar docs"
},
"sidebar.docs.category.Install And Deploy": {
"message": "安装部署",
"description": "The label for category Install And Deploy in sidebar docs"
Expand Down
8 changes: 8 additions & 0 deletions i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"message": "快速体验",
"description": "The label for category Quick Start in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "使用教程",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.category.Building lakehouse": {
"message": "构建 lakehouse",
"description": "The label for category Building lakehouse in sidebar docs"
},
"sidebar.docs.category.Installation and Deployment": {
"message": "安装部署",
"description": "The label for category Installation and Deployment in sidebar docs"
Expand Down
8 changes: 8 additions & 0 deletions i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"message": "快速体验",
"description": "The label for category Quick Start in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "使用教程",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.category.Building lakehouse": {
"message": "构建 lakehouse",
"description": "The label for category Building lakehouse in sidebar docs"
},
"sidebar.docs.category.Installation and Deployment": {
"message": "安装部署",
"description": "The label for category Install and Deploy in sidebar docs"
Expand Down
8 changes: 8 additions & 0 deletions i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"message": "快速体验",
"description": "The label for category Quick Start in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "使用教程",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.category.Building lakehouse": {
"message": "构建 lakehouse",
"description": "The label for category Building lakehouse in sidebar docs"
},
"sidebar.docs.category.Installation and Deployment": {
"message": "安装部署",
"description": "The label for category Installation and Deployment in sidebar docs"
Expand Down
8 changes: 8 additions & 0 deletions shared/interfaces.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export var SearchDocumentType;
(function (SearchDocumentType) {
SearchDocumentType[SearchDocumentType["Title"] = 0] = "Title";
SearchDocumentType[SearchDocumentType["Heading"] = 1] = "Heading";
SearchDocumentType[SearchDocumentType["Description"] = 2] = "Description";
SearchDocumentType[SearchDocumentType["Keywords"] = 3] = "Keywords";
SearchDocumentType[SearchDocumentType["Content"] = 4] = "Content";
})(SearchDocumentType || (SearchDocumentType = {}));
3 changes: 3 additions & 0 deletions src/constant/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ export const BLOG_TAG_ICONS = {
'Top News': <TopNewsIcon />,
All: <AllBlogIcon />,
};

export const VERSIONS = ['1.2', '2.0', '2.1', '3.0', 'dev'];
export const DEFAULT_VERSION = '2.1';
1 change: 1 addition & 0 deletions src/scss/components/markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@

.theme-admonition {
padding: calc(var(--custom-leading) * 2);
box-shadow: none;
}

h2 {
Expand Down
3 changes: 0 additions & 3 deletions src/scss/components/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
display: flex !important;
align-items: center;
justify-content: center;
pointer-events: none;
padding: 5px 7px;
background-color: #fff;
border: none;
Expand Down Expand Up @@ -74,8 +73,6 @@
outline: none !important;
}
.navbar__search span span {
max-height: 580px !important;
overflow: scroll !important;
top: 2.5rem !important;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/scss/components/toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.toc-icon-content {
display: flex;
margin-bottom: 0.5rem;
align-items: center;
cursor: pointer;
}

Expand Down
8 changes: 8 additions & 0 deletions src/shared/interfaces.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export var SearchDocumentType;
(function (SearchDocumentType) {
SearchDocumentType[SearchDocumentType["Title"] = 0] = "Title";
SearchDocumentType[SearchDocumentType["Heading"] = 1] = "Heading";
SearchDocumentType[SearchDocumentType["Description"] = 2] = "Description";
SearchDocumentType[SearchDocumentType["Keywords"] = 3] = "Keywords";
SearchDocumentType[SearchDocumentType["Content"] = 4] = "Content";
})(SearchDocumentType || (SearchDocumentType = {}));
11 changes: 7 additions & 4 deletions src/theme/Admonition/Layout/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
}

.admonitionHeading {
font: var(--ifm-heading-font-weight) var(--ifm-h5-font-size) /
var(--ifm-heading-line-height) var(--ifm-heading-font-family);
font: var(--ifm-heading-font-weight) var(--ifm-h5-font-size) / var(--ifm-heading-line-height) var(--ifm-heading-font-family);
text-transform: uppercase;
font-size: 1rem;
color: #00000A;
margin-bottom: 0.75rem !important;
font-weight: 600;
}

/* Heading alone without content (does not handle fragment content) */
Expand All @@ -30,6 +33,6 @@
fill: var(--ifm-alert-foreground-color);
}

.admonitionContent > :last-child {
.admonitionContent> :last-child {
margin-bottom: 0;
}
}
2 changes: 1 addition & 1 deletion src/theme/DocSidebarItem/Category/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

.divider {
width: calc(100% - 0.625rem);
border: 0.5px solid #edf2fa;
border: 0.5px solid #DFE5F0;
margin: 1rem 0 1rem 0;
position: relative;
left: 0.625rem;
Expand Down
38 changes: 12 additions & 26 deletions src/theme/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ function Footer(): JSX.Element | null {
}
const { copyright, links, logo, style } = footer;

const [isDocsPage, setIsDocsPage] = useState(false);
const [isDocsPage, setIsDocsPage] = useState(false); // docs page or community page
useEffect(() => {
if (typeof window !== 'undefined') {
const pathname = location.pathname.split('/')[1];
const docsPage = pathname === 'docs' || location.pathname.includes('zh-CN/docs');
const docsPage =
pathname === 'docs' ||
location.pathname.includes('zh-CN/docs') ||
location.pathname.includes('community');
setIsDocsPage(docsPage);
}
}, [typeof window !== 'undefined' && location.pathname]);
Expand All @@ -39,30 +42,13 @@ function Footer(): JSX.Element | null {
if (isDocsPage) {
return (
<div className="docs-footer flex-col lg:flex-row">
<div className="logo w-full lg:w-[var(--doc-sidebar-width)] pt-28 lg:h-auto">
<FooterLogo logo={logo} />
</div>
<div className="content container">
<div className="my-7 text-[#8592A6] text-sm">
{/* border-b border-[#F7F9FE] */}
<div className="flex flex-col lg:flex-row pb-3 flex-wrap">
<div className=" w-40 mb-3 lg:mb-0 font-medium">RESOURCES</div>
{ResourcesItems.map(({ label, href }) => (
<Link className="w-40 no-underline mb-2" href={href}>
{label}
</Link>
))}
</div>
<div className="flex flex-col lg:flex-row pt-3 flex-wrap">
<div className="w-40 mb-3 lg:mb-0 font-medium">COMMUNITY</div>
{CommunityItems.map(({ label, href }) => (
<Link className="w-40 no-underline mb-2" href={href}>
{label}
</Link>
))}
</div>
</div>
</div>
<p className='docs-footer-p'>
The contents of this website are © 2024{' '}
<Link href="https://www.apache.org/">Apache Software Foundation</Link> under the terms of the{' '}
<Link href="https://www.apache.org/licenses/LICENSE-2.0.html">Apache License v2.</Link> Apache
Doris, Doris, and the Doris logo are either registered trademarks or trademarks of The Apache
Software Foundation in the United States and other countries.
</p>
</div>
);
}
Expand Down
29 changes: 13 additions & 16 deletions src/theme/Footer/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,23 +212,20 @@
}

.docs-footer {
height: 7.625rem;
height: 3.25rem;
background-color: #fff;
display: flex;
border-top: 1px solid #edf2fa;
.logo {
position: relative;
.footer__logo {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 8.5625rem;
height: 3.5rem;
margin-top: 0;
}
padding: 1rem 1.5rem;
border-top: 1px solid #EDF2FA;
.docs-footer-p {
text-align: center;
color: rgba(29, 29, 29, 0.4);
font-family: Inter;
font-size: 9px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}
.content {
flex: 1;
.docs-footer-p a {
text-decoration: underline;
}
}
16 changes: 7 additions & 9 deletions src/theme/Navbar/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ export default function NavbarContent(): JSX.Element {
const [isEN, setIsEN] = useState(true);
const docItems = isEN ? useThemeConfig().docNavbarEN.items : useThemeConfig().docNavbarZH.items;
const [leftItems, rightItems] = splitNavbarItems(items);
const [leftDocItems,rightDocItems] = splitNavbarItems(docItems);
const [isDocsPage, setIsDocsPage] = useState(false);
const [leftDocItems, rightDocItems] = splitNavbarItems(docItems);
const [isDocsPage, setIsDocsPage] = useState(
typeof window !== 'undefined' ? location.pathname.includes('docs') : false,
);
const [isCommunity, setIsCommunity] = useState(false);
const searchBarItem = items.find(item => item.type === 'search');

const [currentVersion, setCurrentVersion] = useState('');
useEffect(() => {
getGithubStar();
Expand Down Expand Up @@ -139,8 +141,7 @@ export default function NavbarContent(): JSX.Element {
function getNavItem(type: string) {
return items.find(item => item.type === type);
}



return (
<NavbarContentLayout
left={
Expand All @@ -166,10 +167,7 @@ export default function NavbarContent(): JSX.Element {
{!isDocsPage ? (
<NavbarItems items={leftItems} />
) : (
<NavbarItems
items={leftDocItems}
isDocsPage={isDocsPage}
/>
<NavbarItems items={leftDocItems} isDocsPage={isDocsPage} />
)}
</div>
{/* */}
Expand Down
12 changes: 12 additions & 0 deletions src/theme/SearchBar/EmptyTemplate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { translate } from "@docusaurus/Translate";
import { iconNoResults } from "./icons";
import styles from "./SearchBar.module.css";
export function EmptyTemplate() {
if (process.env.NODE_ENV === "production") {
return `<span class="${styles.noResults}"><span class="${styles.noResultsIcon}">${iconNoResults}</span><span>${translate({
id: "theme.SearchBar.noResultsText",
message: "No results",
})}</span></span>`;
}
return `<span class="${styles.noResults}">⚠️ The search index is only available when you run docusaurus build!</span>`;
}
Loading