Merge branch 'master' into chore/creator

chore/creator
Arik Chakma 1 year ago
commit a2f15fc900
  1. 18
      .github/ISSUE_TEMPLATE/04-roadmap-contribution.yml
  2. 4
      readme.md
  3. 11
      src/components/CustomRoadmap/CustomRoadmap.tsx
  4. 15
      src/components/CustomRoadmap/RoadmapHeader.tsx
  5. 6
      src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx

@ -14,24 +14,12 @@ body:
placeholder: e.g. Roadmap to learn Data Science placeholder: e.g. Roadmap to learn Data Science
validations: validations:
required: true required: true
- type: dropdown
id: browsers
attributes:
label: Is this roadmap prepared by you or someone else?
options:
- I prepared this roadmap
- I found this roadmap online (please provide a link below)
- type: textarea - type: textarea
id: roadmap-description id: roadmap-description
attributes: attributes:
label: Roadmap Items label: Roadmap Link
description: Please submit a nested list of items which we can convert into the visual. Here is an [example of roadmap items list.](https://gist.github.com/kamranahmedse/98758d2c73799b3a6ce17385e4c548a5). description: Please create the roadmap [using our roadmap editor](https://twitter.com/kamrify/status/1708293162693767426) and submit the roadmap link.
placeholder: | placeholder: |
- Item 1 https://roadmap.sh/xyz
- Subitem 1
- Subitem 2
- Item 2
- Subitem 1
- Subitem 2
validations: validations:
required: true required: true

@ -9,8 +9,8 @@
<a href="https://roadmap.sh/best-practices"> <a href="https://roadmap.sh/best-practices">
<img src="https://img.shields.io/badge/%E2%9C%A8-Best%20Practices-0a0a0a.svg?style=flat&colorA=0a0a0a" alt="best practices" /> <img src="https://img.shields.io/badge/%E2%9C%A8-Best%20Practices-0a0a0a.svg?style=flat&colorA=0a0a0a" alt="best practices" />
</a> </a>
<a href="https://youtube.com/theroadmap?sub_confirmation=1"> <a href="https://roadmap.sh/questions">
<img src="https://img.shields.io/badge/%E2%9C%A8-Videos-0a0a0a.svg?style=flat&colorA=0a0a0a" alt="videos" /> <img src="https://img.shields.io/badge/%E2%9C%A8-Questions-0a0a0a.svg?style=flat&colorA=0a0a0a" alt="videos" />
</a> </a>
<a href="https://www.youtube.com/channel/UCA0H2KIWgWTwpTFjSxp0now?sub_confirmation=1"> <a href="https://www.youtube.com/channel/UCA0H2KIWgWTwpTFjSxp0now?sub_confirmation=1">
<img src="https://img.shields.io/badge/%E2%9C%A8-YouTube%20Channel-0a0a0a.svg?style=flat&colorA=0a0a0a" alt="roadmaps" /> <img src="https://img.shields.io/badge/%E2%9C%A8-YouTube%20Channel-0a0a0a.svg?style=flat&colorA=0a0a0a" alt="roadmaps" />

@ -40,17 +40,6 @@ export interface RoadmapContentDocument {
}[]; }[];
} }
export type CreatorType = {
id: string;
name: string;
avatar: string;
};
export type GetRoadmapResponse = RoadmapDocument & {
canManage: boolean;
creator?: CreatorType;
};
export function hideRoadmapLoader() { export function hideRoadmapLoader() {
const loaderEl = document.querySelector( const loaderEl = document.querySelector(
'[data-roadmap-loader]' '[data-roadmap-loader]'

@ -15,12 +15,7 @@ export function RoadmapHeader(props: RoadmapHeaderProps) {
const $canManageCurrentRoadmap = useStore(canManageCurrentRoadmap); const $canManageCurrentRoadmap = useStore(canManageCurrentRoadmap);
const $currentRoadmap = useStore(currentRoadmap); const $currentRoadmap = useStore(currentRoadmap);
const { const { title, description, _id: roadmapId } = useStore(currentRoadmap) || {};
title,
description,
_id: roadmapId,
creator,
} = useStore(currentRoadmap) || {};
const [isSharing, setIsSharing] = useState(false); const [isSharing, setIsSharing] = useState(false);
const toast = useToast(); const toast = useToast();
@ -66,13 +61,7 @@ export function RoadmapHeader(props: RoadmapHeaderProps) {
return ( return (
<div className="border-b"> <div className="border-b">
<div className="container relative py-5 sm:py-12"> <div className="container relative py-5 sm:py-12">
<div className="flex items-center gap-1.5"> <div className="mb-3 mt-0 sm:mb-4">
<img src={avatarUrl} className="h-5 w-5 rounded-full" />
<h3 className="text-sm font-medium">
{creator?.name || 'Anonymous'}
</h3>
</div>
<div className="mb-3 mt-4 sm:mb-4">
<h1 className="text-2xl font-bold sm:mb-2 sm:text-4xl">{title}</h1> <h1 className="text-2xl font-bold sm:mb-2 sm:text-4xl">{title}</h1>
<p className="mt-0.5 text-sm text-gray-500 sm:text-lg"> <p className="mt-0.5 text-sm text-gray-500 sm:text-lg">
{description} {description}

@ -2,11 +2,7 @@ export function SkeletonRoadmapHeader() {
return ( return (
<div className="border-b"> <div className="border-b">
<div className="container relative py-5 sm:py-12"> <div className="container relative py-5 sm:py-12">
<div className="flex items-center gap-1.5"> <div className="mb-3 mt-0 sm:mb-4">
<div className="h-5 w-5 animate-pulse rounded-full bg-gray-300" />
<div className="h-5 w-2/12 animate-pulse rounded-md bg-gray-200" />
</div>
<div className="mb-3 mt-4 sm:mb-4">
<div className="h-8 w-1/2 animate-pulse rounded-md bg-gray-300 sm:mb-2 sm:h-10" /> <div className="h-8 w-1/2 animate-pulse rounded-md bg-gray-300 sm:mb-2 sm:h-10" />
<div className="mt-0.5 h-5 w-1/3 animate-pulse rounded-md bg-gray-200 sm:h-7" /> <div className="mt-0.5 h-5 w-1/3 animate-pulse rounded-md bg-gray-200 sm:h-7" />
</div> </div>

Loading…
Cancel
Save