-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ff449f
commit 0d36887
Showing
11 changed files
with
175 additions
and
6 deletions.
There are no files selected for viewing
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
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,44 @@ | ||
import React from "react" | ||
import {BlogAuthor} from "@site/src/theme/BlogAuthor" | ||
import Link from "@docusaurus/Link" | ||
|
||
interface TutorialCardProps { | ||
imgUrl: string | ||
title: string | ||
duration: string | ||
authorName: string | ||
authorImgUrl: string | ||
redirectionUrl: string | ||
} | ||
|
||
const TutorialCard: React.FC<TutorialCardProps> = ({ | ||
imgUrl, | ||
title, | ||
duration, | ||
authorName, | ||
authorImgUrl, | ||
redirectionUrl, | ||
}) => { | ||
return ( | ||
<Link to={redirectionUrl} className="!no-underline"> | ||
<div className="flex flex-col rounded-md border border-solid border-tailCall-border-light-400 cursor-pointer"> | ||
<img src={imgUrl} /> | ||
<div className="flex flex-col p-6 gap-3 text-black"> | ||
<span className="text-content-mini">{duration}</span> | ||
<span className="text-title-small line-clamp-2">{title}</span> | ||
<BlogAuthor | ||
author={{ | ||
name: authorName, | ||
imageURL: authorImgUrl, | ||
}} | ||
containerClassName="mt-auto" | ||
imgClassName="size-5" | ||
textClassName="text-content-tiny" | ||
/> | ||
</div> | ||
</div> | ||
</Link> | ||
) | ||
} | ||
|
||
export default TutorialCard |
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,30 @@ | ||
import React from "react" | ||
import Section from "../shared/Section" | ||
import TutorialCard from "./TutorialCard" | ||
import {tutorialsList} from "@site/src/constants" | ||
|
||
const Tutorials = () => { | ||
return ( | ||
<Section className="lg:pt-6"> | ||
<span className="text-display-small text-tailCall-dark-500">Tutorials</span> | ||
<div className="grid grid-cols-3 gap-3 mt-6"> | ||
{tutorialsList.map((tutorial: TutorialItem, index: number) => { | ||
const {imgUrl, title, duration, authorName, authorImgUrl, redirectionUrl} = tutorial | ||
return ( | ||
<TutorialCard | ||
key={index} | ||
imgUrl={imgUrl} | ||
title={title} | ||
duration={duration} | ||
authorName={authorName} | ||
authorImgUrl={authorImgUrl} | ||
redirectionUrl={redirectionUrl} | ||
/> | ||
) | ||
})} | ||
</div> | ||
</Section> | ||
) | ||
} | ||
|
||
export default Tutorials |
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,12 @@ | ||
import React from "react" | ||
import Tutorials from "./Tutorials" | ||
|
||
const TutorialsPage = (): JSX.Element => { | ||
return ( | ||
<> | ||
<Tutorials /> | ||
</> | ||
) | ||
} | ||
|
||
export default TutorialsPage |
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
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
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,22 @@ | ||
import React, {useEffect} from "react" | ||
import ReactGA from "react-ga4" | ||
import Layout from "@theme/Layout" | ||
import TutorialsPage from "../components/tutorials" | ||
import {useLocation} from "@docusaurus/router" | ||
import {PageDescription, PageTitle} from "../constants/titles" | ||
|
||
const Tutorials = () => { | ||
const location = useLocation() | ||
|
||
useEffect(() => { | ||
ReactGA.send({hitType: "pageview", page: location.pathname, title: "Tutorials Page"}) | ||
}, []) | ||
|
||
return ( | ||
<Layout title={PageTitle.TUTORIALS} description={PageDescription.TUTORIALS}> | ||
<TutorialsPage /> | ||
</Layout> | ||
) | ||
} | ||
|
||
export default Tutorials |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.