From 0003e88cd9db6216e365bd672c5fe883a2faf6fb Mon Sep 17 00:00:00 2001 From: Akash Singh Date: Thu, 28 Mar 2024 19:55:49 +0530 Subject: [PATCH] Redesign page --- documentation/docusaurus.config.js | 20 ++++++++--------- .../blog/featured-blog-post-items/index.js | 8 +++---- .../src/context/CommunityStats/index.tsx | 20 ++++++++--------- .../src/prepverse-theme/blog-hero.tsx | 2 +- .../common-header/menu-item.tsx | 6 ++--- .../landing-rainbow-button.tsx | 22 ++++++++++--------- 6 files changed, 40 insertions(+), 38 deletions(-) diff --git a/documentation/docusaurus.config.js b/documentation/docusaurus.config.js index 1b81f40..38d6bb8 100644 --- a/documentation/docusaurus.config.js +++ b/documentation/docusaurus.config.js @@ -9,7 +9,7 @@ require("dotenv").config(); const redirectJson = require("./redirects.json"); const tutorialData = require("./tutorial-units"); -const thumbsUpDownFeedbackWidget = require("./plugins/thumbs-up-down-feedback-widget"); +// const thumbsUpDownFeedbackWidget = require("./plugins/thumbs-up-down-feedback-widget"); const math = require('remark-math'); const katex = require('rehype-katex'); @@ -68,8 +68,6 @@ const siteConfig = { sidebarPath: require.resolve("./sidebars.js"), editUrl: "https://github.com/PrepVerse/PrepVerse/tree/master/documentation", - remarkPlugins: [math], - rehypePlugins: [katex, {strict: false}], showLastUpdateAuthor: true, showLastUpdateTime: true, disableVersioning: @@ -97,6 +95,8 @@ const siteConfig = { }, exclude: ["**/**/_*.md"], // remarkPlugins: [thumbsUpDownFeedbackWidget.plugin], + remarkPlugins: [math], + rehypePlugins: [katex, {strict: false}], }, blog: false, theme: { @@ -148,9 +148,9 @@ const siteConfig = { "./plugins/checklist.js", "./plugins/docgen.js", "./plugins/examples.js", - "./plugins/intercom.js", "./plugins/featureRequests/FeatureRequestsPlugin.js", - // "./plugins/templates.js", + "./plugins/intercom.js", + "./plugins/templates.js", "./plugins/tutorial-navigation.js", [ "@docusaurus/plugin-content-docs", @@ -159,8 +159,6 @@ const siteConfig = { path: "tutorial", routeBasePath: "tutorial", sidebarPath: false, - remarkPlugins: [math], - rehypePlugins: [katex, {strict: false}], docLayoutComponent: "@theme/TutorialPage", docItemComponent: "@theme/TutorialItem", include: ["**/index.md"], @@ -179,6 +177,8 @@ const siteConfig = { "simple", ], }, + remarkPlugins: [math], + rehypePlugins: [katex, {strict: false}], }, ], ...(process.env.DISABLE_BLOG @@ -190,14 +190,12 @@ const siteConfig = { blogTitle: "Blog", blogDescription: "A Docusaurus powered blog!", routeBasePath: "/blog", - remarkPlugins: [math], - rehypePlugins: [katex, {strict: false}], postsPerPage: 12, blogSidebarTitle: "All posts", blogSidebarCount: 0, feedOptions: { type: "all", - copyright: `Copyright © ${new Date().getFullYear()} Akash Singh.`, + copyright: `Copyright © ${new Date().getFullYear()} PrepVerse`, }, admonitions: { tag: ":::", @@ -214,6 +212,8 @@ const siteConfig = { "simple", ], }, + remarkPlugins: [math], + rehypePlugins: [katex, {strict: false}], }, ], ] diff --git a/documentation/src/components/blog/featured-blog-post-items/index.js b/documentation/src/components/blog/featured-blog-post-items/index.js index 9c3da10..2592110 100644 --- a/documentation/src/components/blog/featured-blog-post-items/index.js +++ b/documentation/src/components/blog/featured-blog-post-items/index.js @@ -7,10 +7,10 @@ import clsx from "clsx"; export const FeaturedBlogPostItems = ({ items }) => { return (
{ const { siteConfig } = useDocusaurusContext(); const followersAccessKey = siteConfig.customFields.REACT_APP_FOLLOWERS_ACCESS_KEY; const [loading, setLoading] = useState(true); - const [githubStarCount, setGithubStarCount] = useState(9940); - const [githubFollowersCount, setGithubFollowersCount] = useState(788); + const [githubStarCount, setGithubStarCount] = useState(0); + const [githubFollowersCount, setGithubFollowersCount] = useState(0); const [githubAvatarUrl, setGithubAvatarUrl] = useState([]); const [githubAvatarPageUrl, setGithubAvatarPageUrl] = useState([]); const [githubAvatarName, setGithubAvatarName] = useState([]); @@ -65,12 +65,12 @@ export const CommunityStatsProvider: FC = ({ children }) => { const [starCountsResponse, followerCountsResponse] = await Promise.all([ fetch(`https://api.github.com/repos/AkashSingh3031/The-Complete-FAANG-Preparation`, { headers: { - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, }), fetch(`https://api.github.com/users/AkashSingh3031`, { headers: { - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, }), ]); @@ -92,7 +92,7 @@ export const CommunityStatsProvider: FC = ({ children }) => { while (page <= totalPages) { const response = await fetch(`https://api.github.com/users/AkashSingh3031/followers?per_page=100&page=${page}`, { headers: { - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, }); const followers = await response.json(); @@ -112,7 +112,7 @@ export const CommunityStatsProvider: FC = ({ children }) => { (await fetchFollowers()).map(async (follower: any) => { const response = await fetch(follower.url, { headers: { - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, }); const followerDetails = await response.json(); @@ -136,17 +136,17 @@ export const CommunityStatsProvider: FC = ({ children }) => { const [badgeDetailsResponse, solvedProblemsResponse, totalLCProblemResponse] = await Promise.all([ fetch(`https://alfa-leetcode-api.onrender.com/akashsingh3031/badges`, { headers: { - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, }), fetch(`https://alfa-leetcode-api.onrender.com/akashsingh3031/solved`, { headers: { - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, }), fetch(`https://alfa-leetcode-api.onrender.com/problems?limit=4000`, { headers: { - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, }), ]); @@ -198,7 +198,7 @@ export const CommunityStatsProvider: FC = ({ children }) => { method: 'POST', headers: { 'Content-Type': 'application/json', - // Authorization: `token ${followersAccessKey}`, + Authorization: `token ${followersAccessKey}`, }, body: JSON.stringify({ query: ` diff --git a/documentation/src/prepverse-theme/blog-hero.tsx b/documentation/src/prepverse-theme/blog-hero.tsx index 9f73658..bd91a85 100644 --- a/documentation/src/prepverse-theme/blog-hero.tsx +++ b/documentation/src/prepverse-theme/blog-hero.tsx @@ -12,7 +12,7 @@ export const BlogHero: FC = ({ className }) => { "w-full", "landing-md:mx-auto", "w-full", - "pt-4 blog-md:pt-12 pb-16 px-6", + "pt-4 blog-md:pt-12 pb-6 px-6", "bg-white dark:bg-gray-800", className, )} diff --git a/documentation/src/prepverse-theme/common-header/menu-item.tsx b/documentation/src/prepverse-theme/common-header/menu-item.tsx index eb98a29..a36759d 100644 --- a/documentation/src/prepverse-theme/common-header/menu-item.tsx +++ b/documentation/src/prepverse-theme/common-header/menu-item.tsx @@ -23,9 +23,9 @@ export const MenuItem: React.FC = ({ "p-4", "transition duration-150 ease-in-out", "rounded-lg", - "hover:bg-gray-50", - variant === "landing" && "dark:hover:bg-gray-700", - variant === "blog" && "dark:hover:bg-gray-700", + "hover:bg-gray-100", + variant === "landing" && "dark:hover:bg-gray-800", + variant === "blog" && "dark:hover:bg-refine-react-8", )} >
diff --git a/documentation/src/prepverse-theme/landing-rainbow-button.tsx b/documentation/src/prepverse-theme/landing-rainbow-button.tsx index b331075..04eb5f8 100644 --- a/documentation/src/prepverse-theme/landing-rainbow-button.tsx +++ b/documentation/src/prepverse-theme/landing-rainbow-button.tsx @@ -41,12 +41,12 @@ export const LandingRainbowButton = ({
@@ -59,14 +59,16 @@ export const LandingRainbowButton = ({ "bg-landing-rainbow", "animate-spin-slow", "animation-slower-speed", - "animation-paused", - "group-hover:animation-running", + "animation-running", + "group-hover:animation-paused", + // "animation-paused", + // "group-hover:animation-running", )} />
- - + + About Me