Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f5cc4be

Browse filesBrowse files
committed
docs: improve layout
1 parent 280b126 commit f5cc4be
Copy full SHA for f5cc4be

File tree

2 files changed

+14
-3
lines changed
Filter options

2 files changed

+14
-3
lines changed

‎packages/docs/src/styles/_scrolling.scss

Copy file name to clipboardExpand all lines: packages/docs/src/styles/_scrolling.scss
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,19 @@ main {
66
h2,
77
h3,
88
h4,
9-
[tabindex="0"] {
9+
[tabindex='0'] {
1010
scroll-margin-top: 80px;
1111
scroll-margin-bottom: 100px;
1212
}
1313
}
14+
15+
.component-sub-nav-wrapper + .container-lg .docs-main {
16+
a,
17+
button,
18+
h2,
19+
h3,
20+
h4,
21+
[tabindex='0'] {
22+
scroll-margin-top: 130px;
23+
}
24+
}

‎packages/docs/src/templates/DocsLayout.tsx

Copy file name to clipboardExpand all lines: packages/docs/src/templates/DocsLayout.tsx
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const humanize = (text: string): string => {
5858
.join(' ')
5959
}
6060

61-
const DocsLayout: FC<DocsLayoutProps> = ({ children, data, pageContext, path }) => {
61+
const DocsLayout: FC<DocsLayoutProps> = ({ children, data, location, pageContext, path }) => {
6262
const docsNavRef = useRef<HTMLDivElement>(null)
6363
const headerRef = useRef<HTMLDivElement>(null)
6464
const [docsNavHeight, setDocsNavHeigh] = useState<number>(0)
@@ -131,7 +131,7 @@ const DocsLayout: FC<DocsLayoutProps> = ({ children, data, pageContext, path })
131131
)}
132132
<Banner pro={proComponent} />
133133
<p className="docs-lead">{description}</p>
134-
<Ads code="CEAICKJY" location={route} placement="coreuiio" />
134+
<Ads code="CEAICKJY" location={location.pathname} placement="coreuiio" />
135135
{frameworks.length > 0 && (
136136
<>
137137
<h2>Other Frameworks</h2>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.