Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the free or paid badge to each developer bootcamp card #14717

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions src/components/LearningToolsCardGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,31 @@ const LearningToolsCardGrid = ({ category }: LearningToolsCardGridProps) => {
<div className="mb-8 grid grid-cols-[repeat(auto-fill,minmax(min(100%,280px),1fr))] gap-8">
{category
.sort(({ locales }) => (locales?.length ? -1 : 0))
.map(({ name, description, background, url, alt, image, subjects }) => (
<ProductCard
key={name}
background={background}
url={url}
alt={alt}
image={image}
name={name}
subjects={subjects}
>
<Translation id={description} />
</ProductCard>
))}
.map(
({
name,
description,
background,
url,
alt,
image,
subjects,
priceType,
}) => (
<ProductCard
key={name}
background={background}
url={url}
alt={alt}
image={image}
name={name}
subjects={subjects}
priceType={priceType}
>
<Translation id={description} />
</ProductCard>
)
)}
</div>
)
}
Expand Down
5 changes: 5 additions & 0 deletions src/components/ProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export type ProductCardProps = {
githubRepoStars?: number
githubRepoLanguages?: Array<string>
hideStars?: boolean
priceType?: string
}

const ProductCard = ({
Expand All @@ -79,6 +80,7 @@ const ProductCard = ({
githubRepoStars = 0,
githubRepoLanguages = [],
hideStars = false,
priceType,
}: ProductCardProps) => {
const { t } = useTranslation("common")

Expand Down Expand Up @@ -123,6 +125,9 @@ const ProductCard = ({
{subject}
</SubjectBadge>
))}
{priceType && (
<SubjectBadge subject={priceType}>{priceType}</SubjectBadge>
)}
{githubRepoLanguages.length > 0 &&
githubRepoLanguages.map((name, idx: number) => (
<SubjectBadge key={idx} subject={name}>
Expand Down
2 changes: 1 addition & 1 deletion src/intl/en/page-developers-learning-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"page-learning-tools-bloomtech-description": "The BloomTech Web3 course will teach you the skills employers look for in engineers.",
"page-learning-tools-bloomtech-logo-alt": "BloomTech logo",
"page-learning-tools-bootcamps": "Developer bootcamps",
"page-learning-tools-bootcamps-desc": "Paid online courses to get you up to speed, fast.",
"page-learning-tools-bootcamps-desc": "Free or paid online courses to get you up to speed, fast.",
"page-learning-tools-browse-docs": "Browse docs",
"page-learning-tools-capture-the-ether-description": "Capture the Ether is a game in which you hack Ethereum smart contracts to learn about security.",
"page-learning-tools-capture-the-ether-logo-alt": "Capture the Ether logo",
Expand Down
1 change: 1 addition & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ export interface LearningTool {
background: string
subjects: Array<string>
locales?: Array<Lang>
priceType?: string
}

export interface LearningToolsCardGridProps {
Expand Down
10 changes: 10 additions & 0 deletions src/pages/developers/learning-tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ const LearningToolsPage = () => {
),
background: "#f6f7f9",
subjects: ["Solidity", "web3"],
priceType: "Paid",
},
{
name: "BloomTech",
Expand All @@ -320,6 +321,7 @@ const LearningToolsPage = () => {
),
background: "#ffffff",
subjects: ["Solidity", "web3"],
priceType: "Paid",
},
{
name: "Questbook",
Expand All @@ -333,6 +335,7 @@ const LearningToolsPage = () => {
),
background: "#141236",
subjects: ["Solidity", "web3"],
priceType: "Free",
},
{
name: "Metaschool",
Expand All @@ -346,6 +349,7 @@ const LearningToolsPage = () => {
),
background: "#f6f7f9",
subjects: ["Solidity", "web3"],
priceType: "Free",
},
{
name: "NFT School",
Expand All @@ -359,6 +363,7 @@ const LearningToolsPage = () => {
),
background: "#111f29",
subjects: ["Solidity", "web3"],
priceType: "Free",
},
{
name: "Platzi",
Expand All @@ -373,6 +378,7 @@ const LearningToolsPage = () => {
background: "#121f3d",
subjects: ["Solidity", "web3"],
locales: ["es"],
priceType: "Paid",
},
{
name: "Speed Run Ethereum",
Expand All @@ -386,6 +392,7 @@ const LearningToolsPage = () => {
),
background: "#ffffff",
subjects: ["Solidity", "web3"],
priceType: "Free",
},
{
name: "Alchemy University",
Expand All @@ -399,6 +406,7 @@ const LearningToolsPage = () => {
),
background: "#ffffff",
subjects: ["Solidity", "web3"],
priceType: "Free",
},
{
name: "LearnWeb3",
Expand All @@ -412,6 +420,7 @@ const LearningToolsPage = () => {
),
background: "#ffffff",
subjects: ["Solidity", "web3"],
priceType: "Free",
},
{
name: "Cyfrin Updraft",
Expand All @@ -425,6 +434,7 @@ const LearningToolsPage = () => {
),
background: "#000000",
subjects: ["Solidity", "web3"],
priceType: "Free",
},
]

Expand Down
Loading