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 {
resourceId: string;
resourceType: ResourceType;
isSecondaryBanner?: boolean;
hasSecondaryBanner?: boolean;
}
const { isSecondaryBanner = false, resourceId, resourceType } = Astro.props;
const { hasSecondaryBanner = false, resourceId, resourceType } = Astro.props;
---
<div
@ -16,8 +16,8 @@ const { isSecondaryBanner = false, resourceId, resourceType } = Astro.props;
class:list={[
'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-md': !isSecondaryBanner,
'rounded-tl-md rounded-tr-md': hasSecondaryBanner,
'rounded-md': !hasSecondaryBanner,
},
]}
>

@ -8,6 +8,7 @@ import YouTubeAlert from './YouTubeAlert.astro';
import ProgressHelpPopup from './ProgressHelpPopup.astro';
import { MarkFavorite } from './FeaturedItems/MarkFavorite';
import { TeamVersions } from './TeamVersions/TeamVersions';
import { RoadmapFrontmatter } from '../lib/roadmap';
export interface Props {
title: string;
@ -17,6 +18,7 @@ export interface Props {
roadmapId: string;
isUpcoming?: boolean;
hasSearch?: boolean;
question?: RoadmapFrontmatter['question'];
hasTopics?: boolean;
}
@ -29,25 +31,43 @@ const {
hasSearch = false,
note,
hasTopics = false,
question,
} = Astro.props;
const isRoadmapReady = !isUpcoming;
const roadmapTitle =
roadmapId === 'devops'
? 'DevOps'
: `${roadmapId.charAt(0).toUpperCase()}${roadmapId.slice(1)}`;
const hasTnsBanner = !!tnsBannerLink;
---
<LoginPopup />
<ProgressHelpPopup />
<div class='border-b'>
<div class='container relative py-5 sm:py-12'>
<div class='relative border-b'>
<div
class:list={[
'container relative py-5',
{
'sm:py-16': hasTnsBanner,
'sm:py-12': !hasTnsBanner,
},
]}
>
<div class='mb-3 mt-0 sm:mb-4'>
<h1 class='mb-0.5 text-2xl font-bold sm:mb-2 sm:text-4xl'>
{title}
<MarkFavorite
resourceId={roadmapId}
resourceType='roadmap'
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'
client:only="react"
/>
<span class='relative top-0 sm:-top-1'>
<MarkFavorite
resourceId={roadmapId}
resourceType='roadmap'
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>
<p class='text-sm text-gray-500 sm:text-lg'>{description}</p>
</div>
@ -121,7 +141,7 @@ const isRoadmapReady = !isUpcoming;
<TeamVersions
resourceType='roadmap'
resourceId={roadmapId}
client:only="react"
client:only='react'
/>
{
@ -144,12 +164,31 @@ const isRoadmapReady = !isUpcoming;
<!-- Desktop: Roadmap Resources - Alert -->
{
hasTopics && (
<RoadmapHint roadmapId={roadmapId} tnsBannerLink={tnsBannerLink} />
<RoadmapHint
tnsBannerLink={tnsBannerLink}
titleQuestion={question?.title}
titleAnswer={question?.description}
roadmapId={roadmapId}
/>
)
}
{hasSearch && <TopicSearch />}
</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>
{note && <RoadmapNote text={note} />}

@ -1,47 +1,57 @@
---
import AstroIcon from './AstroIcon.astro';
import Icon from './AstroIcon.astro';
import { RoadmapTitleQuestion } from './RoadmapTitleQuestion.tsx';
import ResourceProgressStats from './ResourceProgressStats.astro';
export interface Props {
roadmapId: string;
tnsBannerLink?: string;
titleQuestion?: string;
titleAnswer?: string;
}
const { roadmapId, tnsBannerLink = '' } = Astro.props;
const hasTNSBanner = !!tnsBannerLink;
const roadmapTitle =
roadmapId === 'devops'
? 'DevOps'
: `${roadmapId.charAt(0).toUpperCase()}${roadmapId.slice(1)}`;
const {
roadmapId,
titleQuestion = '',
titleAnswer = '',
tnsBannerLink,
} = Astro.props;
const hasTitleQuestion = titleQuestion && titleAnswer;
const hasTnsBanner = !!tnsBannerLink;
---
<div
class:list={[
'mt-4 sm:mt-7 border-0 sm:border rounded-md mb-0',
{
'sm:-mb-[82px]': hasTNSBanner,
'sm:-mb-[65px]': !hasTNSBanner,
},
'mt-4 sm:mt-7 border-0 sm:border rounded-md mb-0 bg-white',
...(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 && (
<div class='hidden border-b bg-gray-100 px-2 py-1.5 sm:block'>
<p class='text-sm'>
Get the latest {roadmapTitle} news from our sister site{' '}
<a
href={tnsBannerLink}
target='_blank'
class='font-semibold underline'
>
TheNewStack.io
</a>
</p>
</div>
hasTitleQuestion && (
<RoadmapTitleQuestion
client:load
question={titleQuestion}
answer={titleAnswer}
/>
)
}
<ResourceProgressStats isSecondaryBanner={hasTNSBanner} resourceId={roadmapId} resourceType='roadmap' />
</div>
</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'
hasTopics: true
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:
width: 968
height: 2840.4
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.'
imageUrl: 'https://roadmap.sh/roadmaps/backend.png'
datePublished: '2023-01-05'
dateModified: '2023-01-20'
dateModified: '2023-09-16'
seo:
title: 'Backend Developer Roadmap'
description: 'Learn to become a modern backend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern backend development.'
title: 'Backend Developer Roadmap: What is 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:
- 'backend 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'
hasTopics: true
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:
width: 968
height: 2527.46

@ -8,18 +8,25 @@ title: 'Frontend Developer'
description: 'Step by step guide to becoming a modern frontend developer in 2023'
hasTopics: true
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:
width: 968
height: 2587.63
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.'
imageUrl: 'https://roadmap.sh/roadmaps/frontend.png'
datePublished: '2023-01-05'
dateModified: '2023-01-20'
seo:
title: 'Frontend Developer Roadmap'
description: 'Learn to become a modern frontend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern frontend development.'
title: 'Frontend Developer Roadmap: What is 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:
- 'javascript roadmap 2023'
- 'frontend roadmap 2023'

@ -11,6 +11,10 @@ hasTopics: true
dimensions:
width: 968
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:
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.'

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

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

@ -7,6 +7,10 @@
@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 */
.no-scrollbar::-webkit-scrollbar {
display: none;

Loading…
Cancel
Save