Add introductory paragraph on roadmaps

pull/4482/head
Kamran Ahmed 1 year ago
parent 846bbc1533
commit bc6b100c26
  1. 8
      src/components/ResourceProgressStats.astro
  2. 59
      src/components/RoadmapHeader.astro
  3. 66
      src/components/RoadmapHint.astro
  4. 63
      src/components/RoadmapTitleQuestion.tsx
  5. 15
      src/data/roadmaps/backend/backend.md
  6. 9
      src/data/roadmaps/devops/devops.md
  7. 13
      src/data/roadmaps/frontend/frontend.md
  8. 4
      src/data/roadmaps/full-stack/full-stack.md
  9. 4
      src/lib/roadmap.ts
  10. 1
      src/pages/[roadmapId]/index.astro
  11. 4
      src/styles/global.css

@ -5,10 +5,10 @@ import { ProgressShareButton } from './UserProgress/ProgressShareButton';
export interface Props { export interface Props {
resourceId: string; resourceId: string;
resourceType: ResourceType; resourceType: ResourceType;
isSecondaryBanner?: boolean; hasSecondaryBanner?: boolean;
} }
const { isSecondaryBanner = false, resourceId, resourceType } = Astro.props; const { hasSecondaryBanner = false, resourceId, resourceType } = Astro.props;
--- ---
<div <div
@ -16,8 +16,8 @@ const { isSecondaryBanner = false, resourceId, resourceType } = Astro.props;
class:list={[ class:list={[
'hidden sm:flex justify-between px-2 bg-white items-center py-1.5 relative striped-loader bg-white', 'hidden sm:flex justify-between px-2 bg-white items-center py-1.5 relative striped-loader bg-white',
{ {
'rounded-bl-md rounded-br-md': isSecondaryBanner, 'rounded-tl-md rounded-tr-md': hasSecondaryBanner,
'rounded-md': !isSecondaryBanner, 'rounded-md': !hasSecondaryBanner,
}, },
]} ]}
> >

@ -8,6 +8,7 @@ import YouTubeAlert from './YouTubeAlert.astro';
import ProgressHelpPopup from './ProgressHelpPopup.astro'; import ProgressHelpPopup from './ProgressHelpPopup.astro';
import { MarkFavorite } from './FeaturedItems/MarkFavorite'; import { MarkFavorite } from './FeaturedItems/MarkFavorite';
import { TeamVersions } from './TeamVersions/TeamVersions'; import { TeamVersions } from './TeamVersions/TeamVersions';
import { RoadmapFrontmatter } from '../lib/roadmap';
export interface Props { export interface Props {
title: string; title: string;
@ -17,6 +18,7 @@ export interface Props {
roadmapId: string; roadmapId: string;
isUpcoming?: boolean; isUpcoming?: boolean;
hasSearch?: boolean; hasSearch?: boolean;
question?: RoadmapFrontmatter['question'];
hasTopics?: boolean; hasTopics?: boolean;
} }
@ -29,25 +31,43 @@ const {
hasSearch = false, hasSearch = false,
note, note,
hasTopics = false, hasTopics = false,
question,
} = Astro.props; } = Astro.props;
const isRoadmapReady = !isUpcoming; const isRoadmapReady = !isUpcoming;
const roadmapTitle =
roadmapId === 'devops'
? 'DevOps'
: `${roadmapId.charAt(0).toUpperCase()}${roadmapId.slice(1)}`;
const hasTnsBanner = !!tnsBannerLink;
--- ---
<LoginPopup /> <LoginPopup />
<ProgressHelpPopup /> <ProgressHelpPopup />
<div class='border-b'> <div class='relative border-b'>
<div class='container relative py-5 sm:py-12'> <div
class:list={[
'container relative py-5',
{
'sm:py-16': hasTnsBanner,
'sm:py-12': !hasTnsBanner,
},
]}
>
<div class='mb-3 mt-0 sm:mb-4'> <div class='mb-3 mt-0 sm:mb-4'>
<h1 class='mb-0.5 text-2xl font-bold sm:mb-2 sm:text-4xl'> <h1 class='mb-0.5 text-2xl font-bold sm:mb-2 sm:text-4xl'>
{title} {title}
<MarkFavorite <span class='relative top-0 sm:-top-1'>
resourceId={roadmapId} <MarkFavorite
resourceType='roadmap' resourceId={roadmapId}
className='text-gray-500 !opacity-100 hover:text-gray-600 [&>svg]:stroke-[0.4] [&>svg]:stroke-gray-400 hover:[&>svg]:stroke-gray-600 [&>svg]:h-4 [&>svg]:w-4 sm:[&>svg]:h-5 sm:[&>svg]:w-5 ml-1.5 relative focus:outline-0' resourceType='roadmap'
client:only="react" className='text-gray-500 !opacity-100 hover:text-gray-600 [&>svg]:stroke-[0.4] [&>svg]:stroke-gray-400 hover:[&>svg]:stroke-gray-600 [&>svg]:h-4 [&>svg]:w-4 sm:[&>svg]:h-4 sm:[&>svg]:w-4 ml-1.5 relative focus:outline-0'
/> client:only='react'
/>
</span>
</h1> </h1>
<p class='text-sm text-gray-500 sm:text-lg'>{description}</p> <p class='text-sm text-gray-500 sm:text-lg'>{description}</p>
</div> </div>
@ -121,7 +141,7 @@ const isRoadmapReady = !isUpcoming;
<TeamVersions <TeamVersions
resourceType='roadmap' resourceType='roadmap'
resourceId={roadmapId} resourceId={roadmapId}
client:only="react" client:only='react'
/> />
{ {
@ -144,12 +164,31 @@ const isRoadmapReady = !isUpcoming;
<!-- Desktop: Roadmap Resources - Alert --> <!-- Desktop: Roadmap Resources - Alert -->
{ {
hasTopics && ( hasTopics && (
<RoadmapHint roadmapId={roadmapId} tnsBannerLink={tnsBannerLink} /> <RoadmapHint
tnsBannerLink={tnsBannerLink}
titleQuestion={question?.title}
titleAnswer={question?.description}
roadmapId={roadmapId}
/>
) )
} }
{hasSearch && <TopicSearch />} {hasSearch && <TopicSearch />}
</div> </div>
{
tnsBannerLink && (
<div class='absolute left-0 right-0 top-0 hidden border-b border-b-gray-200 px-2 py-1.5 sm:block'>
<p class='py-0.5 text-center text-sm'>
<span class='badge mr-1'>Partner</span>
Get the latest {roadmapTitle} news from our sister site{' '}
<a href={tnsBannerLink} target='_blank' class='font-medium underline'>
TheNewStack.io
</a>
</p>
</div>
)
}
</div> </div>
{note && <RoadmapNote text={note} />} {note && <RoadmapNote text={note} />}

@ -1,47 +1,57 @@
--- ---
import AstroIcon from './AstroIcon.astro'; import AstroIcon from './AstroIcon.astro';
import Icon from './AstroIcon.astro'; import Icon from './AstroIcon.astro';
import { RoadmapTitleQuestion } from './RoadmapTitleQuestion.tsx';
import ResourceProgressStats from './ResourceProgressStats.astro'; import ResourceProgressStats from './ResourceProgressStats.astro';
export interface Props { export interface Props {
roadmapId: string; roadmapId: string;
tnsBannerLink?: string; tnsBannerLink?: string;
titleQuestion?: string;
titleAnswer?: string;
} }
const { roadmapId, tnsBannerLink = '' } = Astro.props; const {
roadmapId,
const hasTNSBanner = !!tnsBannerLink; titleQuestion = '',
const roadmapTitle = titleAnswer = '',
roadmapId === 'devops' tnsBannerLink,
? 'DevOps' } = Astro.props;
: `${roadmapId.charAt(0).toUpperCase()}${roadmapId.slice(1)}`; const hasTitleQuestion = titleQuestion && titleAnswer;
const hasTnsBanner = !!tnsBannerLink;
--- ---
<div <div
class:list={[ class:list={[
'mt-4 sm:mt-7 border-0 sm:border rounded-md mb-0', 'mt-4 sm:mt-7 border-0 sm:border rounded-md mb-0 bg-white',
{ ...(hasTnsBanner
'sm:-mb-[82px]': hasTNSBanner, ? [
'sm:-mb-[65px]': !hasTNSBanner, {
}, 'sm:-mb-[103px]': hasTitleQuestion,
'sm:-mb-[81px]': !hasTitleQuestion,
},
]
: [
{
'sm:-mb-[88px]': hasTitleQuestion,
'sm:-mb-[65px]': !hasTitleQuestion,
},
]),
]} ]}
> >
<ResourceProgressStats
resourceId={roadmapId}
resourceType='roadmap'
hasSecondaryBanner={hasTitleQuestion}
/>
{ {
hasTNSBanner && ( hasTitleQuestion && (
<div class='hidden border-b bg-gray-100 px-2 py-1.5 sm:block'> <RoadmapTitleQuestion
<p class='text-sm'> client:load
Get the latest {roadmapTitle} news from our sister site{' '} question={titleQuestion}
<a answer={titleAnswer}
href={tnsBannerLink} />
target='_blank'
class='font-semibold underline'
>
TheNewStack.io
</a>
</p>
</div>
) )
} }
</div>
<ResourceProgressStats isSecondaryBanner={hasTNSBanner} resourceId={roadmapId} resourceType='roadmap' />
</div>

@ -0,0 +1,63 @@
import {ChevronDown, ChevronUp, GraduationCap} from 'lucide-react';
import { useRef, useState } from 'react';
import { useOutsideClick } from '../hooks/use-outside-click';
import {markdownToHtml} from "../lib/markdown";
type RoadmapTitleQuestionProps = {
question: string;
answer: string;
};
export function RoadmapTitleQuestion(props: RoadmapTitleQuestionProps) {
const { question, answer } = props;
const [isAnswerVisible, setIsAnswerVisible] = useState(false);
const ref = useRef<HTMLDivElement>(null);
useOutsideClick(ref, () => {
setIsAnswerVisible(false);
});
return (
<div className="relative hidden border-t text-sm font-medium sm:block">
{isAnswerVisible && (
<div className="fixed left-0 right-0 top-0 z-50 h-full items-center justify-center overflow-y-auto overflow-x-hidden overscroll-contain bg-black/50"></div>
)}
<h2
className="z-50 flex cursor-pointer items-center px-2 py-2 "
aria-expanded={isAnswerVisible ? 'true' : 'false'}
onClick={(e) => {
e.preventDefault();
setIsAnswerVisible(!isAnswerVisible);
}}
>
<span className="flex flex-grow">
<GraduationCap className="mr-2 inline-block h-5 w-5" />
{ question }
</span>
<span className="flex-shrink-0 text-gray-400">
<ChevronDown className={`inline-block h-5 w-5`} />
</span>
</h2>
{isAnswerVisible && (
<div
className="absolute left-0 right-0 top-0 z-50 mt-0 rounded-md border bg-white"
ref={ref}
>
<p className="flex items-center px-[7px] pt-[7px] pb-[8px] text-sm font-medium border-b cursor-pointer" onClick={() => setIsAnswerVisible(false)}>
<span className="flex flex-grow items-center">
<GraduationCap className="mr-2 inline-block h-5 w-5" />
{ question }
</span>
<span className="flex-shrink-0 text-gray-400">
<ChevronUp className={`inline-block h-5 w-5`} />
</span>
</p>
<div className='p-3 text-base bg-gray-100 [&>h2]:text-lg [&>h2]:font-semibold [&>h2]:mb-1 [&>h2]:mt-5 [&>p>a]:font-semibold [&>p>a]:underline [&>p>a]:underline-offset-2 [&>p:last-child]:mb-0 [&>p]:mb-3 [&>p]:font-normal [&>p]:leading-relaxed' dangerouslySetInnerHTML={{ __html: markdownToHtml(answer, false) }}>
</div>
</div>
)}
</div>
);
}

@ -8,18 +8,25 @@ title: 'Backend Developer'
description: 'Step by step guide to becoming a modern backend developer in 2023' description: 'Step by step guide to becoming a modern backend developer in 2023'
hasTopics: true hasTopics: true
tnsBannerLink: 'https://thenewstack.io?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Alert' tnsBannerLink: 'https://thenewstack.io?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Alert'
question:
title: 'What is Backend Development?'
description: |
Backend web development is the part of web development that deals with the server-side of a web application. This includes creating and managing the server-side logic, connecting the application to a database, creating server-side APIs, handling user authentication and authorization, and processing and responding to user requests. It often involves the use of programming languages such as Python, Java, Ruby, PHP, JavaScript (Node.js), and .NET languages.
## What does a Backend Developer do?
A backend developer is responsible for the development of server-side components of a web application i.e. working with databases, handling requests, creating server-side APIs that can be consumed by frontend developers to retrieve and manipulate data, ensuring the scalability of the systems i.e. making sure that the backend can handle a high volume of traffic and is performant, integrating external services like payment gateways, message queues, cloud services, etc.
dimensions: dimensions:
width: 968 width: 968
height: 2840.4 height: 2840.4
schema: schema:
headline: 'Backend Developer Roadmap' headline: 'Backend Developer Roadmap: What is Backend Development?'
description: 'Learn how to become a Backend Developer with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.' description: 'Learn how to become a Backend Developer with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.'
imageUrl: 'https://roadmap.sh/roadmaps/backend.png' imageUrl: 'https://roadmap.sh/roadmaps/backend.png'
datePublished: '2023-01-05' datePublished: '2023-01-05'
dateModified: '2023-01-20' dateModified: '2023-09-16'
seo: seo:
title: 'Backend Developer Roadmap' title: 'Backend Developer Roadmap: What is Backend Development?'
description: 'Learn to become a modern backend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern backend development.' description: 'Learn what is backend development, what do backend developers do and how to become a modern backend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern backend development.'
keywords: keywords:
- 'backend roadmap 2023' - 'backend roadmap 2023'
- 'backend developer roadmap 2023' - 'backend developer roadmap 2023'

@ -8,6 +8,15 @@ title: 'DevOps Roadmap'
description: 'Step by step guide for DevOps, SRE or any other Operations Role in 2023' description: 'Step by step guide for DevOps, SRE or any other Operations Role in 2023'
hasTopics: true hasTopics: true
tnsBannerLink: 'https://thenewstack.io?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Alert' tnsBannerLink: 'https://thenewstack.io?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Alert'
question:
title: 'What is DevOps?'
description: |
DevOps is a cultural and collaborative mindset that emphasizes communication, collaboration, integration, and automation between development and operations teams in order to achieve faster and more reliable software delivery.
DevOps is not a specific job title or role, but rather a set of practices and principles that can be applied across a variety of roles in software development and IT operations. Anyone involved in the software development and delivery process can adopt a DevOps mindset and apply DevOps practices in their work, including developers, testers, operations engineers, product managers, and others.
## What is a DevOps Engineer?
While DevOps is not a specific job title or role, organizations often hire for a "DevOps Engineer" role. A DevOps Engineer is a software engineer who specializes in the practices and tools that enable the continuous delivery of software. DevOps Engineers are responsible for the design and implementation of applications, software, and services for their organization, and they work closely with developers, testers, and operations staff to oversee the code releases.
dimensions: dimensions:
width: 968 width: 968
height: 2527.46 height: 2527.46

@ -8,18 +8,25 @@ title: 'Frontend Developer'
description: 'Step by step guide to becoming a modern frontend developer in 2023' description: 'Step by step guide to becoming a modern frontend developer in 2023'
hasTopics: true hasTopics: true
tnsBannerLink: 'https://thenewstack.io?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Alert' tnsBannerLink: 'https://thenewstack.io?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Alert'
question:
title: 'What is Frontend Development?'
description: |
Front-end development is the development of visual and interactive elements of a website that users interact with directly. It's a combination of HTML, CSS and [JavaScript](/javascript), where HTML provides the structure, CSS the styling and layout, and JavaScript the dynamic behaviour and interactivity.
## What does a Frontend Developer do?
As a front-end developer, you'll be responsible for creating the user interface of a website, to ensure it looks good and is easy to use, with great focus on design principles and user experience. You'll be working closely with designers, back-end developers, and project managers to make sure the final product meets the client's needs and provides the best possible experience for the end-users.
dimensions: dimensions:
width: 968 width: 968
height: 2587.63 height: 2587.63
schema: schema:
headline: 'Frontend Developer Roadmap' headline: 'Frontend Developer Roadmap: What is Frontend Development?'
description: 'Learn how to become a Frontend Developer with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.' description: 'Learn how to become a Frontend Developer with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.'
imageUrl: 'https://roadmap.sh/roadmaps/frontend.png' imageUrl: 'https://roadmap.sh/roadmaps/frontend.png'
datePublished: '2023-01-05' datePublished: '2023-01-05'
dateModified: '2023-01-20' dateModified: '2023-01-20'
seo: seo:
title: 'Frontend Developer Roadmap' title: 'Frontend Developer Roadmap: What is Frontend Development?'
description: 'Learn to become a modern frontend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern frontend development.' description: 'Learn what is Frontend Development, what do frontend developers do and how to become a modern frontend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern frontend development.'
keywords: keywords:
- 'javascript roadmap 2023' - 'javascript roadmap 2023'
- 'frontend roadmap 2023' - 'frontend roadmap 2023'

@ -11,6 +11,10 @@ hasTopics: true
dimensions: dimensions:
width: 968 width: 968
height: 1951.64 height: 1951.64
question:
title: 'What is Full Stack Development?'
description: |
Full stack development is the practice of being proficient in both the front-end and back-end aspects of web application development. A full stack developer is capable of working on all layers of a software application, from the user interface and user experience (front-end) to the server, database, and server-side logic (back-end). This versatility allows them to create and maintain complete web applications independently or as part of a development team.
schema: schema:
headline: 'Full Stack Developer Roadmap' headline: 'Full Stack Developer Roadmap'
description: 'Learn how to become a Full Stack Developer with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.' description: 'Learn how to become a Full Stack Developer with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.'

@ -12,6 +12,10 @@ export interface RoadmapFrontmatter {
isUpcoming: boolean; isUpcoming: boolean;
tnsBannerLink?: string; tnsBannerLink?: string;
note?: string; note?: string;
question?: {
title: string;
description: string;
};
dimensions?: { dimensions?: {
width: number; width: number;
height: number; height: number;

@ -86,6 +86,7 @@ if (roadmapFAQs.length) {
roadmapId={roadmapId} roadmapId={roadmapId}
hasTopics={roadmapData.hasTopics} hasTopics={roadmapData.hasTopics}
isUpcoming={roadmapData.isUpcoming} isUpcoming={roadmapData.isUpcoming}
question={roadmapData.question}
/> />
<div class='bg-gray-50 pt-4 sm:pt-12'> <div class='bg-gray-50 pt-4 sm:pt-12'>

@ -7,6 +7,10 @@
@apply mx-auto !max-w-[830px] px-4; @apply mx-auto !max-w-[830px] px-4;
} }
.badge {
@apply rounded-sm bg-gray-400 px-1.5 py-0.5 text-xs font-medium uppercase text-white
}
/* Chrome, Safari and Opera */ /* Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar { .no-scrollbar::-webkit-scrollbar {
display: none; display: none;

Loading…
Cancel
Save