-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spotlight article to main page (#473)
* Add spotlight article to main page * adjust spacing
- Loading branch information
1 parent
a2fdfad
commit c657e7e
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/frontend/src/view/pages/home/components/HomeSpotlightArticle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import classNames from 'classnames' | ||
import React from 'react' | ||
|
||
import { Button } from '../../../components/Button' | ||
import { Card } from '../../../components/Card' | ||
import { HomeTutorialEntry } from './HomeTutorials' | ||
|
||
interface HomeSpotlightArticleProps { | ||
spotlightArticle: Omit<HomeTutorialEntry, 'imageUrl'> | ||
className?: string | ||
} | ||
|
||
export function HomeSpotlightArticle(props: HomeSpotlightArticleProps) { | ||
return ( | ||
<Card className={classNames('grid grid-cols-2 gap-x-20', props.className)}> | ||
<div className="flex flex-col justify-center gap-4 pl-6"> | ||
<span className="text-sm text-zinc-500">Spotlight article</span> | ||
<span className="text-xxl">{props.spotlightArticle.title}</span> | ||
<Button | ||
as="a" | ||
href={props.spotlightArticle.href} | ||
variant="outlined" | ||
className="w-36" | ||
> | ||
Read now | ||
</Button> | ||
</div> | ||
<img src="/images/spotlight-article.png" /> | ||
</Card> | ||
) | ||
} |