mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-04-25 09:52:55 +02:00
Add AI announcement on homepage
This commit is contained in:
parent
18db62748c
commit
58a5d27854
16
src/components/AIAnnouncement.tsx
Normal file
16
src/components/AIAnnouncement.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
type AIAnnouncementProps = {};
|
||||
|
||||
export function AIAnnouncement(props: AIAnnouncementProps) {
|
||||
return (
|
||||
<a
|
||||
className="rounded-md border border-dashed border-green-600 px-3 py-1.5 text-green-400 transition-colors hover:border-green-400 hover:text-green-200"
|
||||
href="/ai"
|
||||
>
|
||||
<span className="relative -top-[1px] mr-1 text-xs font-semibold uppercase text-white">
|
||||
New
|
||||
</span>{' '}
|
||||
<span className={'hidden sm:inline'}>Generate visual roadmaps with AI</span>
|
||||
<span className={'inline text-sm sm:hidden'}>AI Roadmap Generator!</span>
|
||||
</a>
|
||||
);
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { CheckIcon } from '../ReactIcons/CheckIcon';
|
||||
import { TeamAnnouncement } from '../TeamAnnouncement';
|
||||
import { AIAnnouncement } from '../AIAnnouncement.tsx';
|
||||
|
||||
type EmptyProgressProps = {
|
||||
title?: string;
|
||||
@ -23,7 +23,7 @@ export function EmptyProgress(props: EmptyProgressProps) {
|
||||
<p className={'text-sm text-gray-400 sm:text-base'}>{message}</p>
|
||||
|
||||
<p className="mt-5">
|
||||
<TeamAnnouncement />
|
||||
<AIAnnouncement />
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
@ -7,7 +7,7 @@ import { MapIcon, Users2 } from 'lucide-react';
|
||||
import { CreateRoadmapButton } from '../CustomRoadmap/CreateRoadmap/CreateRoadmapButton';
|
||||
import { CreateRoadmapModal } from '../CustomRoadmap/CreateRoadmap/CreateRoadmapModal';
|
||||
import { type ReactNode, useState } from 'react';
|
||||
import { TeamAnnouncement } from '../TeamAnnouncement';
|
||||
import { AIAnnouncement } from '../AIAnnouncement.tsx';
|
||||
|
||||
type ProgressRoadmapProps = {
|
||||
url: string;
|
||||
@ -97,7 +97,7 @@ export function HeroRoadmaps(props: ProgressListProps) {
|
||||
return (
|
||||
<div className="relative pb-12 pt-4 sm:pt-7">
|
||||
<p className="mb-7 mt-2 text-sm">
|
||||
<TeamAnnouncement />
|
||||
<AIAnnouncement />
|
||||
</p>
|
||||
{isCreatingRoadmap && (
|
||||
<CreateRoadmapModal
|
||||
@ -187,7 +187,7 @@ export function HeroRoadmaps(props: ProgressListProps) {
|
||||
const currentTeam: UserProgressResponse[0]['team'] =
|
||||
teamRoadmaps?.[teamName]?.[0]?.team;
|
||||
const roadmapsList = teamRoadmaps[teamName].filter(
|
||||
(roadmap) => !!roadmap.resourceTitle
|
||||
(roadmap) => !!roadmap.resourceTitle,
|
||||
);
|
||||
const canManageTeam = ['admin', 'manager'].includes(currentTeam?.role!);
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
---
|
||||
import { FavoriteRoadmaps } from './FavoriteRoadmaps';
|
||||
import {TeamAnnouncement} from "../TeamAnnouncement";
|
||||
import { AIAnnouncement } from "../AIAnnouncement";
|
||||
---
|
||||
|
||||
<div
|
||||
class='min-h-auto relative min-h-[192px] border-b border-b-[#1e293c] sm:min-h-[281px] transition-all'
|
||||
class='min-h-auto relative min-h-[192px] border-b border-b-[#1e293c] transition-all sm:min-h-[281px]'
|
||||
>
|
||||
<div
|
||||
class='container px-5 py-6 pb-14 text-left transition-opacity duration-300 sm:px-0 sm:py-20 sm:text-center'
|
||||
id='hero-text'
|
||||
>
|
||||
<p class='-mt-4 sm:-mt-10 mb-7'>
|
||||
<TeamAnnouncement />
|
||||
<p class='-mt-4 mb-7 sm:-mt-10'>
|
||||
<AIAnnouncement />
|
||||
</p>
|
||||
|
||||
<h1
|
||||
|
Loading…
x
Reference in New Issue
Block a user