mirror of
https://github.com/wavetermdev/docusaurus-og.git
synced 2026-08-05 13:46:35 -07:00
Merge branch 'main' into min-height
This commit is contained in:
@@ -3,6 +3,19 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.0.0-alpha.34](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2023-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- set text-decoration of TOCCollapsible links to none ([7922783](https://github.com/acid-info/logos-docusaurus-plugins/commit/792278395192e3dcef7c9157a313e2b48025b02b))
|
||||
|
||||
# [1.0.0-alpha.33](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2023-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- render mobile toc after page title ([88cc89f](https://github.com/acid-info/logos-docusaurus-plugins/commit/88cc89fceea0cd4401750fe49238c40108248da6))
|
||||
- update search result icons ([bee5df3](https://github.com/acid-info/logos-docusaurus-plugins/commit/bee5df33fbb664d48f3d65dfa14e56694031041a))
|
||||
|
||||
# [1.0.0-alpha.32](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.31...v1.0.0-alpha.32) (2023-06-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.0-alpha.32",
|
||||
"version": "1.0.0-alpha.34",
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.0.0-alpha.34](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2023-06-09)
|
||||
|
||||
**Note:** Version bump only for package @acid-info/logos-docusaurus-preset
|
||||
|
||||
# [1.0.0-alpha.33](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2023-06-09)
|
||||
|
||||
**Note:** Version bump only for package @acid-info/logos-docusaurus-preset
|
||||
|
||||
# [1.0.0-alpha.32](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.31...v1.0.0-alpha.32) (2023-06-07)
|
||||
|
||||
**Note:** Version bump only for package @acid-info/logos-docusaurus-preset
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@acid-info/logos-docusaurus-preset",
|
||||
"version": "1.0.0-alpha.32",
|
||||
"version": "1.0.0-alpha.34",
|
||||
"description": "Docusaurus preset for Logos documentation websites",
|
||||
"main": "lib/index.js",
|
||||
"types": "src/preset.d.ts",
|
||||
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@acid-info/logos-docusaurus-search-local": "^1.0.0-alpha.19",
|
||||
"@acid-info/logos-docusaurus-theme": "^1.0.0-alpha.32",
|
||||
"@acid-info/logos-docusaurus-theme": "^1.0.0-alpha.34",
|
||||
"@docusaurus/core": "^2.4.1",
|
||||
"@docusaurus/module-type-aliases": "^2.4.1",
|
||||
"@docusaurus/preset-classic": "^2.4.1",
|
||||
|
||||
@@ -3,6 +3,19 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.0.0-alpha.34](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2023-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- set text-decoration of TOCCollapsible links to none ([7922783](https://github.com/acid-info/logos-docusaurus-plugins/commit/792278395192e3dcef7c9157a313e2b48025b02b))
|
||||
|
||||
# [1.0.0-alpha.33](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2023-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- render mobile toc after page title ([88cc89f](https://github.com/acid-info/logos-docusaurus-plugins/commit/88cc89fceea0cd4401750fe49238c40108248da6))
|
||||
- update search result icons ([bee5df3](https://github.com/acid-info/logos-docusaurus-plugins/commit/bee5df33fbb664d48f3d65dfa14e56694031041a))
|
||||
|
||||
# [1.0.0-alpha.32](https://github.com/acid-info/logos-docusaurus-plugins/compare/v1.0.0-alpha.31...v1.0.0-alpha.32) (2023-06-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@acid-info/logos-docusaurus-theme",
|
||||
"version": "1.0.0-alpha.32",
|
||||
"version": "1.0.0-alpha.34",
|
||||
"description": "A Docusaurus theme for Logos documentation websites",
|
||||
"main": "lib/index.js",
|
||||
"types": "src/theme.d.ts",
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
import React, { useContext, useMemo } from 'react'
|
||||
|
||||
export type MDXComponentType = 'heading'
|
||||
export type MDXEnhancementPosition = 'after'
|
||||
|
||||
export type MDXEnhancementItem = {
|
||||
component: MDXComponentType
|
||||
position: MDXEnhancementPosition
|
||||
render: (props: any) => React.ReactNode
|
||||
}
|
||||
|
||||
export type MDXEnhancementContextType = {
|
||||
items: MDXEnhancementItem[]
|
||||
}
|
||||
|
||||
export const MDXEnhancementContext =
|
||||
React.createContext<MDXEnhancementContextType>({
|
||||
items: [],
|
||||
})
|
||||
|
||||
export const useMDXEnhancementElements = <T = any>(
|
||||
component: MDXComponentType,
|
||||
position: MDXEnhancementPosition,
|
||||
props: T,
|
||||
): React.ReactNode => {
|
||||
const ctx = useContext(MDXEnhancementContext)
|
||||
if (!ctx) return []
|
||||
|
||||
return useMemo(() => {
|
||||
const items = ctx.items.filter(
|
||||
(item) => item.component === component && item.position === position,
|
||||
)
|
||||
|
||||
return items.map((item) => item.render(props))
|
||||
}, [component, position, props])
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './MDXEnhancement.context'
|
||||
@@ -231,6 +231,9 @@
|
||||
--desktop-footer-gap: 200px;
|
||||
--mobile-footer-gap: 144px;
|
||||
--doc-grid-gap: 16px;
|
||||
|
||||
--ifm-table-background: transparent !important;
|
||||
--ifm-table-stripe-background: transparent !important;
|
||||
|
||||
@include utils.responsive('xl', 'down') {
|
||||
--container-max-width: 912px;
|
||||
@@ -477,6 +480,19 @@ small {
|
||||
@include lsd.typography('body2');
|
||||
}
|
||||
|
||||
.menu__link--sublist-caret:after {
|
||||
content: url(/icons/chevron-up.svg);
|
||||
background: none;
|
||||
filter: unset;
|
||||
min-width: unset;
|
||||
width: unset;
|
||||
height: unset;
|
||||
}
|
||||
|
||||
.menu__list-item--collapsed > .menu__link--sublist-caret:after {
|
||||
transform: rotateZ(0deg) !important;
|
||||
}
|
||||
|
||||
.menu__link--active {
|
||||
border-left: 1px solid rgb(var(--lsd-border-primary));
|
||||
border-radius: 0;
|
||||
@@ -624,6 +640,48 @@ a[class^='sidebarLogo_'] {
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
@include lsd.typography('body2');
|
||||
thead > tr {
|
||||
border: 1px solid rgb(var(--lsd-border-primary));
|
||||
}
|
||||
|
||||
th {
|
||||
text-transform: uppercase;
|
||||
font-weight: 400 !important;
|
||||
border: 1px solid rgb(var(--lsd-border-primary));
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid rgb(var(--lsd-border-primary));
|
||||
strong {
|
||||
text-transform: uppercase;
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.theme-doc-footer {
|
||||
margin-bottom: 96px;
|
||||
}
|
||||
|
||||
.theme-doc-footer-edit-meta-row {
|
||||
div[class*='lastUpdated_'] {
|
||||
@include lsd.typography('body2');
|
||||
font-style: normal;
|
||||
opacity: 0.7;
|
||||
|
||||
small {
|
||||
display: none;
|
||||
}
|
||||
|
||||
b {
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-sidebar__item {
|
||||
padding-inline: var(--content-padding);
|
||||
padding-block: 0;
|
||||
@@ -1000,26 +1058,10 @@ a[class^='sidebarLogo_'] {
|
||||
}
|
||||
|
||||
.navbar-sidebar:not(.navbar-sidebar--show-secondary) {
|
||||
.navbar-sidebar__brand {
|
||||
button:first-of-type {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button.lsd-icon-button {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.menu {
|
||||
padding-inline: 0;
|
||||
}
|
||||
|
||||
.navbar-sidebar__items {
|
||||
}
|
||||
|
||||
.navbar-sidebar__item {
|
||||
}
|
||||
|
||||
.menu__list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -1054,12 +1096,17 @@ a[class^='sidebarLogo_'] {
|
||||
|
||||
.footer .container.container-fluid {
|
||||
margin-bottom: 16px !important;
|
||||
padding-inline: var(--content-padding);
|
||||
|
||||
> .footer__links {
|
||||
gap: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.footer > div[class*='secondRow'] {
|
||||
margin: var(--content-padding);
|
||||
}
|
||||
|
||||
.footer .footer__links {
|
||||
gap: 16px !important;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 9.53L4.94 10.47L8 7.41667L11.06 10.47L12 9.53L8 5.53L4 9.53Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 192 B |
@@ -1,3 +1,3 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.28257 14.7173V18.8233H6.48257V14.7173H13.5179V18.8233H14.7179V14.7173H18.8236V13.5173H14.7179V6.48201H18.8236V5.28201H14.7179V1.17627H13.5179V5.28201H6.48257V1.17627H5.28257V5.28201H1.17651L1.17651 6.48201H5.28257V13.5173H1.17651L1.17651 14.7173H5.28257ZM6.48257 13.5173L13.5179 13.5173V6.48201L6.48257 6.48201V13.5173Z" fill="black"/>
|
||||
</svg>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.99992 13.3333L4.66659 10.6667H2.33325L2.66659 9.33332H4.99992L5.66659 6.66666H2.99992L3.33325 5.33332H5.99992L6.66659 2.66666H7.99992L7.33325 5.33332H9.99992L10.6666 2.66666H11.9999L11.3333 5.33332H13.6666L13.3333 6.66666H10.9999L10.3333 9.33332H12.9999L12.6666 10.6667H9.99992L9.33325 13.3333H7.99992L8.66658 10.6667H5.99992L5.33325 13.3333H3.99992ZM6.33325 9.33332H8.99992L9.66658 6.66666H6.99992L6.33325 9.33332Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 491 B After Width: | Height: | Size: 548 B |
@@ -4,6 +4,7 @@ import { ThemeClassNames } from '@docusaurus/theme-common'
|
||||
import { useDoc } from '@docusaurus/theme-common/internal'
|
||||
import Heading from '@theme/Heading'
|
||||
import MDXContent from '@theme/MDXContent'
|
||||
import MDXHeading from '@theme/MDXComponents/Heading'
|
||||
/**
|
||||
Title can be declared inside md content or declared through
|
||||
front matter and added manually. To make both cases consistent,
|
||||
@@ -29,7 +30,7 @@ export default function DocItemContent({ children }) {
|
||||
<div className={clsx(ThemeClassNames.docs.docMarkdown, 'markdown')}>
|
||||
{syntheticTitle && (
|
||||
<header>
|
||||
<Heading as="h1">{syntheticTitle}</Heading>
|
||||
<MDXHeading as="h1">{syntheticTitle}</MDXHeading>
|
||||
</header>
|
||||
)}
|
||||
<MDXContent>{children}</MDXContent>
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
import React from 'react'
|
||||
import clsx from 'clsx'
|
||||
import { useWindowSize } from '@docusaurus/theme-common'
|
||||
import { useDoc } from '@docusaurus/theme-common/internal'
|
||||
import DocItemPaginator from '@theme/DocItem/Paginator'
|
||||
import DocVersionBanner from '@theme/DocVersionBanner'
|
||||
import DocVersionBadge from '@theme/DocVersionBadge'
|
||||
import DocItemFooter from '@theme/DocItem/Footer'
|
||||
import DocItemTOCMobile from '@theme/DocItem/TOC/Mobile'
|
||||
import DocItemTOCDesktop from '@theme/DocItem/TOC/Desktop'
|
||||
import DocItemContent from '@theme/DocItem/Content'
|
||||
import DocBreadcrumbs from '@theme/DocBreadcrumbs'
|
||||
import styles from './styles.module.scss'
|
||||
import DocItemContent from '@theme/DocItem/Content'
|
||||
import DocItemFooter from '@theme/DocItem/Footer'
|
||||
import DocItemPaginator from '@theme/DocItem/Paginator'
|
||||
import DocItemTOCDesktop from '@theme/DocItem/TOC/Desktop'
|
||||
import DocItemTOCMobile from '@theme/DocItem/TOC/Mobile'
|
||||
import DocVersionBadge from '@theme/DocVersionBadge'
|
||||
import DocVersionBanner from '@theme/DocVersionBanner'
|
||||
import { Props as HeadingProps } from '@theme/Heading'
|
||||
import clsx from 'clsx'
|
||||
import React from 'react'
|
||||
import { useMedia } from 'react-use'
|
||||
import { MDXEnhancementContext } from '../../../containers/MDXEnhacement/MDXEnhancement.context'
|
||||
import styles from './styles.module.scss'
|
||||
|
||||
/**
|
||||
* Decide if the toc should be rendered, on mobile or desktop viewports
|
||||
@@ -44,14 +46,26 @@ export default function DocItemLayout({ children }) {
|
||||
|
||||
return (
|
||||
<div className={clsx('row', styles.docItemGrid)}>
|
||||
<div className={clsx(!docTOC.hidden && styles.docItemCol)}>
|
||||
<div className={clsx(styles.docItemCol)}>
|
||||
<DocVersionBanner />
|
||||
<div className={styles.docItemContainer}>
|
||||
<article>
|
||||
<DocBreadcrumbs />
|
||||
<DocVersionBadge />
|
||||
{docTOC.mobile}
|
||||
<DocItemContent>{children}</DocItemContent>
|
||||
<MDXEnhancementContext.Provider
|
||||
value={{
|
||||
items: [
|
||||
{
|
||||
component: 'heading',
|
||||
position: 'after',
|
||||
render: (props: HeadingProps) =>
|
||||
props.as === 'h1' && docTOC.mobile,
|
||||
},
|
||||
],
|
||||
}}
|
||||
>
|
||||
<DocItemContent>{children}</DocItemContent>
|
||||
</MDXEnhancementContext.Provider>
|
||||
<DocItemFooter />
|
||||
</article>
|
||||
<DocItemPaginator />
|
||||
|
||||
@@ -20,8 +20,18 @@
|
||||
}
|
||||
|
||||
.tocMobile {
|
||||
margin-top: -0.5rem;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
& > div {
|
||||
display: block !important;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.docItemContainer {
|
||||
.tocMobile:not(:first-of-type) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import Heading from '@docusaurus/theme-classic/lib/theme/MDXComponents/Heading'
|
||||
import type { Props } from '@theme/MDXComponents/Heading'
|
||||
import React from 'react'
|
||||
import { useMDXEnhancementElements } from '../../containers/MDXEnhacement/MDXEnhancement.context'
|
||||
|
||||
export default function MDXHeading(props: Props): JSX.Element {
|
||||
const after = useMDXEnhancementElements('heading', 'after', props)
|
||||
|
||||
return (
|
||||
<>
|
||||
<Heading {...props} />
|
||||
{after}
|
||||
</>
|
||||
)
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ import styles from './SearchResultItem.module.scss'
|
||||
|
||||
const icons: Record<SearchDocumentType, React.ReactElement> = {
|
||||
[SearchDocumentType.Title]: (
|
||||
<DocumentIcon className={clsx(styles.icon, styles.l1, styles.stroke)} />
|
||||
<DocumentIcon className={clsx(styles.icon, styles.l1, styles.fill)} />
|
||||
),
|
||||
[SearchDocumentType.Heading]: (
|
||||
<BlockIcon className={clsx(styles.icon, styles.l2, styles.fill)} />
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
.tocCollapsibleContent a {
|
||||
display: block;
|
||||
text-decoration: var(--ifm-link-text-decoration);
|
||||
}
|
||||
|
||||
.tocCollapsibleExpanded {
|
||||
|
||||
Reference in New Issue
Block a user