|
|
|
---
|
|
|
|
import Icon from './AstroIcon.astro';
|
|
|
|
|
|
|
|
export interface Props {
|
|
|
|
roadmapId: string;
|
|
|
|
tnsBannerLink?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const { roadmapId, tnsBannerLink = '' } = Astro.props;
|
|
|
|
|
|
|
|
const hasTNSBanner = !!tnsBannerLink;
|
|
|
|
const roadmapTitle =
|
|
|
|
roadmapId === 'devops'
|
|
|
|
? 'DevOps'
|
|
|
|
: `${roadmapId.charAt(0).toUpperCase()}${roadmapId.slice(1)}`;
|
|
|
|
---
|
|
|
|
|
|
|
|
<div
|
|
|
|
class:list={[
|
|
|
|
'mt-4 sm:mt-7 border-0 sm:border rounded-md mb-0',
|
|
|
|
{
|
|
|
|
'sm:-mb-[82px]': hasTNSBanner,
|
|
|
|
'sm:-mb-[65px]': !hasTNSBanner,
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
>
|
|
|
|
{
|
|
|
|
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>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
<!-- Desktop: Roadmap Resources - Alert -->
|
|
|
|
<div
|
|
|
|
class:list={[
|
|
|
|
'hidden sm:flex justify-between px-2 bg-white items-center',
|
|
|
|
{
|
|
|
|
'rounded-bl-md rounded-br-md': hasTNSBanner,
|
|
|
|
'rounded-md': !hasTNSBanner,
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
>
|
|
|
|
<p class='text-sm'>
|
|
|
|
<span
|
|
|
|
class='mr-0.5 rounded-sm bg-yellow-200 px-1 py-0.5 text-xs font-medium uppercase text-yellow-900'
|
|
|
|
>New</span
|
|
|
|
>
|
|
|
|
Track your progress and learn by clicking roadmap items.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<a
|
|
|
|
href={`/${roadmapId}/topics`}
|
|
|
|
class='inline-flex items-center justify-center rounded-md px-1 py-1.5 text-sm font-medium text-gray-500 hover:text-black'
|
|
|
|
>
|
|
|
|
<Icon icon='search' />
|
|
|
|
<span class='ml-2'>Search Topics</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Mobile - Roadmap resources alert -->
|
|
|
|
<p
|
|
|
|
class='relative block rounded-md border border-yellow-500 bg-white px-2 py-1.5 text-sm text-yellow-700 sm:hidden'
|
|
|
|
>
|
|
|
|
Track your progress and learn about the topics by clicking the roadmap items.
|
|
|
|
</p>
|
|
|
|
</div>
|