Skip to content

Commit

Permalink
Redesign page
Browse files Browse the repository at this point in the history
  • Loading branch information
Akash Singh committed Mar 28, 2024
1 parent 56ce2dd commit 0003e88
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 38 deletions.
20 changes: 10 additions & 10 deletions documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -97,6 +95,8 @@ const siteConfig = {
},
exclude: ["**/**/_*.md"],
// remarkPlugins: [thumbsUpDownFeedbackWidget.plugin],
remarkPlugins: [math],
rehypePlugins: [katex, {strict: false}],
},
blog: false,
theme: {
Expand Down Expand Up @@ -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",
Expand All @@ -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"],
Expand All @@ -179,6 +177,8 @@ const siteConfig = {
"simple",
],
},
remarkPlugins: [math],
rehypePlugins: [katex, {strict: false}],
},
],
...(process.env.DISABLE_BLOG
Expand All @@ -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: ":::",
Expand All @@ -214,6 +212,8 @@ const siteConfig = {
"simple",
],
},
remarkPlugins: [math],
rehypePlugins: [katex, {strict: false}],
},
],
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import clsx from "clsx";
export const FeaturedBlogPostItems = ({ items }) => {
return (
<div
className={clsx(
"w-screen",
"bg-refine-react-1 dark:bg-gray-800",
)}
// className={clsx(
// "w-screen",
// "bg-refine-react-1 dark:bg-gray-800",
// )}
>
<div
className={clsx(
Expand Down
20 changes: 10 additions & 10 deletions documentation/src/context/CommunityStats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export const CommunityStatsProvider: FC = ({ children }) => {
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<String[]>([]);
const [githubAvatarPageUrl, setGithubAvatarPageUrl] = useState<String[]>([]);
const [githubAvatarName, setGithubAvatarName] = useState<String[]>([]);
Expand All @@ -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}`,
},
}),
]);
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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}`,
},
}),
]);
Expand Down Expand Up @@ -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: `
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/prepverse-theme/blog-hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const BlogHero: FC<Props> = ({ 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,
)}
Expand Down
6 changes: 3 additions & 3 deletions documentation/src/prepverse-theme/common-header/menu-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export const MenuItem: React.FC<MenuItemProps> = ({
"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",
)}
>
<div className="shrink-0">
Expand Down
22 changes: 12 additions & 10 deletions documentation/src/prepverse-theme/landing-rainbow-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export const LandingRainbowButton = ({
<div
className={clsx(
"absolute",
"-left-0.5",
"-top-0.5",
"blur",
"-left-1",
"-top-1",
// "blur",
"overflow-hidden",
"rounded-lg",
"w-[calc(100%+0.25rem)] h-[calc(100%+0.25rem)]",
"rounded-full",
"w-[calc(100%+0.5rem)] h-[calc(100%+0.5rem)]",
"z-[-1]",
)}
>
Expand All @@ -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",
)}
/>
</div>
<div
className={clsx(
"dark:bg-cyan-200 bg-orange-800",
"dark:bg-green-400 bg-orange-600",
"rounded-full",
"px-10 py-3",
buttonClassname,
Expand All @@ -84,8 +86,8 @@ export const LandingRainbowButton = ({
children
) : (
<>
<AccountPin className="dark:text-black text-white font-semibold" />
<span className="dark:text-black text-white font-semibold">
<AccountPin className="dark:text-gray-800 text-white font-semibold" />
<span className="dark:text-gray-800 text-white font-semibold">
About Me
</span>
</>
Expand Down

0 comments on commit 0003e88

Please sign in to comment.