From 67ad327cd46f59b3f23d8ffea1349a4f8111cfa6 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Sun, 25 Oct 2020 02:17:45 +0300 Subject: [PATCH] feat(v2): add skip to content link --- .../src/theme/Layout/index.tsx | 6 +++ .../src/theme/SkipToContent/index.tsx | 38 +++++++++++++++++++ .../src/theme/SkipToContent/styles.module.css | 16 ++++++++ 3 files changed, 60 insertions(+) create mode 100644 packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx create mode 100644 packages/docusaurus-theme-classic/src/theme/SkipToContent/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx index 108f03e47d77..1af3915bfa1c 100644 --- a/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx @@ -7,6 +7,7 @@ import React from 'react'; import clsx from 'clsx'; +import SkipToContent from '@theme/SkipToContent'; import AnnouncementBar from '@theme/AnnouncementBar'; import Navbar from '@theme/Navbar'; import Footer from '@theme/Footer'; @@ -17,12 +18,17 @@ import './styles.css'; function Layout(props: Props): JSX.Element { const {children, noFooter, wrapperClassName} = props; + return ( + + + +
{children}
{!noFooter &&