From 6cac0009e25bb83408a63831722e83b3b4265032 Mon Sep 17 00:00:00 2001
From: Yangshun
Date: Fri, 18 Mar 2022 07:20:47 +0800
Subject: [PATCH] website: change back to client-side nav
---
website/src/pages/index.js | 31 ++++++++++-----------
website/src/theme/DocSidebarItem/index.js | 6 ++--
website/src/theme/PaginatorNavLink/index.js | 5 ++--
3 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/website/src/pages/index.js b/website/src/pages/index.js
index 6e6edcf5..7f1e1fd3 100755
--- a/website/src/pages/index.js
+++ b/website/src/pages/index.js
@@ -3,6 +3,7 @@ import classnames from 'classnames';
import Layout from '@theme/Layout';
import BrowserOnly from '@docusaurus/BrowserOnly';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
+import Link from '@docusaurus/Link';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './styles.module.css';
@@ -144,11 +145,11 @@ function HeroSection() {
);
@@ -431,11 +430,9 @@ function FeaturesSection() {
{description}
{link && (
-
+
Read now →
-
+
)}
@@ -808,11 +805,11 @@ function SponsorshipSection() {
target="_blank">
Advertise with us!
-
+ to="/advertise">
Find out more
-
+
@@ -834,11 +831,11 @@ function PreFooterSection() {
It's free! Start improving your interview game today and get the
job at the company of your dreams.
-
+ to="/introduction">
Start reading now →
-
+
diff --git a/website/src/theme/DocSidebarItem/index.js b/website/src/theme/DocSidebarItem/index.js
index 854dd861..fba6f9ca 100644
--- a/website/src/theme/DocSidebarItem/index.js
+++ b/website/src/theme/DocSidebarItem/index.js
@@ -151,12 +151,12 @@ function DocSidebarItemLink({item, onItemClick, activePath, level, ...props}) {
className,
)}
key={label}>
-
)}
-
+
);
}
diff --git a/website/src/theme/PaginatorNavLink/index.js b/website/src/theme/PaginatorNavLink/index.js
index 1ec231a4..aa1e9fb8 100644
--- a/website/src/theme/PaginatorNavLink/index.js
+++ b/website/src/theme/PaginatorNavLink/index.js
@@ -1,14 +1,15 @@
import React from 'react';
import clsx from 'clsx';
+import Link from '@docusaurus/Link';
import styles from './styles.module.css';
function PaginatorNavLink({hasArrow, permalink, title, subLabel, ...rest}) {
return (
-
+
{subLabel && {subLabel}
}
{title}
{hasArrow && →}
-
+
);
}