-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: new features page, separate showcase page (#16)
- Loading branch information
Showing
8 changed files
with
142 additions
and
113 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,59 @@ | ||
import Heading from "@theme/Heading" | ||
|
||
import React from "react" | ||
import Link from "@docusaurus/Link" | ||
import clsx from "clsx" | ||
|
||
import styles from "./styles.module.css" | ||
|
||
export type CardProps = { | ||
title: string | ||
video: string | ||
description: string | ||
} | ||
|
||
function Card(props: CardProps) { | ||
return ( | ||
<li key={props.title} className="card shadow--md"> | ||
<div className={clsx("card__image")}> | ||
<video src={props.video} width="100%" autoPlay controls loop muted></video> | ||
</div> | ||
<div className="card__body"> | ||
<Heading as="h4">{props.title}</Heading> | ||
<p>{props.description}</p> | ||
</div> | ||
<ul className={clsx("card__footer")}></ul> | ||
</li> | ||
) | ||
} | ||
|
||
export function Header({ | ||
heading, | ||
description, | ||
link, | ||
}: { | ||
heading: string | ||
description?: string | ||
link: { emoji: string; text: string; to: string } | ||
}) { | ||
return ( | ||
<section className="margin-top--lg margin-bottom--lg text--center"> | ||
<Heading as="h1">{heading}</Heading> | ||
{description && <p>{description}</p>} | ||
<Link className={clsx("button button--primary", styles.space)} to={link.to}> | ||
<span aria-hidden="true">{link.emoji}</span> | ||
<span>{link.text}</span> | ||
</Link> | ||
</section> | ||
) | ||
} | ||
|
||
export function Cards({ from: cards }: { from: CardProps[] }) { | ||
return ( | ||
<section className="margin-top--lg margin-bottom--xl"> | ||
<div className="container"> | ||
<ul className={clsx("container", "clean-list", styles.cards)}>{cards.map(card => Card(card))}</ul> | ||
</div> | ||
</section> | ||
) | ||
} |
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
File renamed without changes.
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,62 @@ | ||
import Layout from "@theme/Layout" | ||
|
||
import { Header, Cards, CardProps } from "@site/src/components/Highlights" | ||
|
||
const features: CardProps[] = [ | ||
{ | ||
title: "Scrollable Preview", | ||
video: "/videos/scrollable-preview.mp4", | ||
description: "Preview various types of files, and scroll while previewing.", | ||
}, | ||
{ | ||
title: "Visual Mode & Batch Rename", | ||
video: "/videos/visual-mode_batch-rename.mp4", | ||
description: "Batch select files in visual mode, and rename them.", | ||
}, | ||
{ | ||
title: "Vim-like Input & Select Component", | ||
video: "/videos/input_select.mp4", | ||
description: "Quickly edit filename in the Input, and choose how to open it in the Select.", | ||
}, | ||
{ | ||
title: "Multi-Tab & fzf, zoxide", | ||
video: "/videos/multi-tab_zoxide.mp4", | ||
description: "Collaborate across multiple tabs, and use fzf, zoxide for quick jumps.", | ||
}, | ||
{ | ||
title: "Multi-Select & Task Management", | ||
video: "/videos/multi-select_task-management.mp4", | ||
description: | ||
"Select multiple files individually, perform copy, cut, etc. Which are scheduled by the task system, providing real-time progress reports and task cancellation.", | ||
}, | ||
{ | ||
title: "Incremental Find", | ||
video: "/videos/incremental-find.mp4", | ||
description: | ||
"Find files incrementally in real-time, with the current position and number of all matches displayed.", | ||
}, | ||
{ | ||
title: "Search", | ||
video: "/videos/search.mp4", | ||
description: "Search by name using fd, by content using rg, and perform arbitrary operations on the results.", | ||
}, | ||
] | ||
|
||
export default function Features(): JSX.Element { | ||
return ( | ||
<Layout title="Features" description="List of Yazi's features."> | ||
<main className="margin-vert--lg"> | ||
<Header | ||
heading="Features" | ||
description="List of features shipped with Yazi." | ||
link={{ | ||
emoji: "✨", | ||
text: "Suggest a feature!", | ||
to: "https://github.com/sxyazi/yazi/issues/new?template=feature.yml", | ||
}} | ||
/> | ||
<Cards from={features} /> | ||
</main> | ||
</Layout> | ||
) | ||
} |
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 was deleted.
Oops, something went wrong.