+ roadmap.sh is a community effort
+ to create roadmaps, guides and other educational content to help guide developers
+ in picking up a path and guide their learnings.
+
+
+
+ Community created roadmaps, guides and articles to help developers grow in
+ their career.
+
+
+
+
diff --git a/src/components/HeroSection/ProgressList.tsx b/src/components/HeroSection/ProgressList.tsx
new file mode 100644
index 000000000..6b7ad471b
--- /dev/null
+++ b/src/components/HeroSection/ProgressList.tsx
@@ -0,0 +1,46 @@
+import type { UserProgressResponse } from './FavoriteRoadmaps';
+import { CheckIcon } from './CheckIcon';
+
+type ProgressListProps = {
+ progress: UserProgressResponse;
+};
+
+export function ProgressList(props: ProgressListProps) {
+ const { progress } = props;
+
+ return (
+
+
+
+ Your progress and favorite roadmaps.
+ Your progress and favorite roadmaps.
+
+ );
+}
diff --git a/src/components/PageSponsor.tsx b/src/components/PageSponsor.tsx
index f77f64251..9b09a1b3c 100644
--- a/src/components/PageSponsor.tsx
+++ b/src/components/PageSponsor.tsx
@@ -29,6 +29,18 @@ export function PageSponsor(props: PageSponsorProps) {
const [sponsor, setSponsor] = useState();
const loadSponsor = async () => {
+ const currentPath = window.location.pathname;
+ if (
+ currentPath === '/' ||
+ currentPath === '/best-practices' ||
+ currentPath === '/roadmaps' ||
+ currentPath.startsWith('/guides') ||
+ currentPath.startsWith('/videos') ||
+ currentPath.startsWith('/account')
+ ) {
+ return;
+ }
+
const { response, error } = await httpGet(
`${import.meta.env.PUBLIC_API_URL}/v1-get-sponsor`,
{
diff --git a/src/data/roadmaps/cpp/content/115-compilers/100-stages.md b/src/data/roadmaps/cpp/content/115-compilers/100-stages.md
index 84c986f27..cbe299a67 100644
--- a/src/data/roadmaps/cpp/content/115-compilers/100-stages.md
+++ b/src/data/roadmaps/cpp/content/115-compilers/100-stages.md
@@ -39,10 +39,10 @@ The third stage is converting the compiler's intermediate representation into as
**Code Example (x86 Assembly):**
-```assembly
- mov eax, 10
- mov ebx, 20
- add eax, ebx
+```
+mov eax, 10
+mov ebx, 20
+add eax, ebx
```
## Linking
@@ -55,4 +55,4 @@ The final stage is the linking of the object code with the necessary libraries a
$ g++ main.o -o main -lm
```
-In summary, the compilation process in C++ involves four primary stages: preprocessing, compilation, assembly, and linking. Each stage plays a crucial role in transforming the source code into an executable program.
\ No newline at end of file
+In summary, the compilation process in C++ involves four primary stages: preprocessing, compilation, assembly, and linking. Each stage plays a crucial role in transforming the source code into an executable program.
diff --git a/src/directives/client-authenticated.mjs b/src/directives/client-authenticated.mjs
new file mode 100644
index 000000000..f76d42f64
--- /dev/null
+++ b/src/directives/client-authenticated.mjs
@@ -0,0 +1,9 @@
+export default async (load, opts) => {
+ const isAuthenticated = document.cookie.toString().indexOf('__roadmapsh_jt__') !== -1;
+ if (isAuthenticated) {
+ console.log("loading");
+
+ const hydrate = await load();
+ await hydrate();
+ }
+};
diff --git a/src/lib/home-progress.ts b/src/lib/home-progress.ts
deleted file mode 100644
index 0eb8725e4..000000000
--- a/src/lib/home-progress.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { httpGet } from './http';
-import { isLoggedIn } from './jwt';
-
-export type UserProgressResponse = {
- resourceTitle: string;
- resourceId: string;
- resourceType: 'roadmap' | 'best-practice';
- done: number;
- learning: number;
- skipped: number;
- total: number;
- updatedAt: Date;
-}[];
-
-async function renderProgress() {
- if (!isLoggedIn()) {
- return;
- }
-
- const { response: progressList, error } = await httpGet(
- `${import.meta.env.PUBLIC_API_URL}/v1-get-user-all-progress`
- );
-
- if (error || !progressList) {
- return;
- }
-
- progressList.forEach((progress) => {
- const href =
- progress.resourceType === 'best-practice'
- ? `/best-practices/${progress.resourceId}`
- : `/${progress.resourceId}`;
- const element = document.querySelector(`a[href="${href}"]`);
- if (!element) {
- return;
- }
-
- const totalDone = progress.done + progress.skipped;
- const percentageDone = (totalDone / progress.total) * 100;
-
- const progressBar = document.createElement('div');
- progressBar.style.backgroundColor = 'rgb(23 42 58)';
- progressBar.style.position = 'absolute';
- progressBar.style.width = `${percentageDone}%`;
- progressBar.style.height = '100%';
- progressBar.style.bottom = '0';
- progressBar.style.left = '0';
- progressBar.style.top = '0';
- progressBar.style.zIndex = '1';
-
- element.appendChild(progressBar);
- });
-}
-
-// on DOM load
-window.addEventListener('DOMContentLoaded', () => {
- window.setTimeout(renderProgress, 0);
-});
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 3eefd7bbe..846d5384b 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,7 +1,8 @@
---
+import FeaturedVideos from '../components/FeaturedVideos.astro';
import FeaturedGuides from '../components/FeaturedGuides.astro';
import FeaturedItems from '../components/FeaturedItems/FeaturedItems.astro';
-import FeaturedVideos from '../components/FeaturedVideos.astro';
+import HeroSection from '../components/HeroSection/HeroSection.astro';
import BaseLayout from '../layouts/BaseLayout.astro';
import { getAllBestPractices } from '../lib/best-pratice';
import { getAllGuides } from '../lib/guide';
@@ -22,28 +23,7 @@ const videos = await getAllVideos();
permalink={'/'}
>
-
-
-
- Developer Roadmaps
-
-
-
- roadmap.sh is a community
- effort to create roadmaps, guides and other educational content to help
- guide developers in picking up the path and guide their learnings.
-
-
-
- Community created roadmaps, guides and articles to help developers
- grow in their career.
-