index.tsx 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import type { ReactNode } from "react";
  2. import clsx from "clsx";
  3. import Heading from "@theme/Heading";
  4. import styles from "./styles.module.css";
  5. type FeatureItem = {
  6. title: string;
  7. Svg: React.ComponentType<React.ComponentProps<"svg">>;
  8. description: ReactNode;
  9. };
  10. const FeatureList: FeatureItem[] = [
  11. {
  12. title: "Easy to Use",
  13. Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default,
  14. description: (
  15. <>
  16. Anubis is easy to set up, lightweight, and helps get rid of the lowest
  17. hanging fruit so you can sleep at night.
  18. </>
  19. ),
  20. },
  21. {
  22. title: "",
  23. Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default,
  24. description: (
  25. <>
  26. Anubis is efficient and as lightweight as possible, blocking the worst
  27. of the bots on the internet and makes it easy to protect what you host
  28. online.
  29. </>
  30. ),
  31. },
  32. {
  33. title: "Powered by React",
  34. Svg: require("@site/static/img/undraw_docusaurus_react.svg").default,
  35. description: (
  36. <>
  37. Anubis uses a multi-threaded proof of work check to ensure that users
  38. browsers are up to date and support modern standards.
  39. </>
  40. ),
  41. },
  42. ];
  43. function Feature({ title, Svg, description }: FeatureItem) {
  44. return (
  45. <div className={clsx("col col--4")}>
  46. <div className="text--center">
  47. <Svg className={styles.featureSvg} role="img" />
  48. </div>
  49. <div className="text--center padding-horiz--md">
  50. <Heading as="h3">{title}</Heading>
  51. <p>{description}</p>
  52. </div>
  53. </div>
  54. );
  55. }
  56. export default function HomepageFeatures(): ReactNode {
  57. return (
  58. <section className={styles.features}>
  59. <div className="container">
  60. <div className="row">
  61. {FeatureList.map((props, idx) => (
  62. <Feature key={idx} {...props} />
  63. ))}
  64. </div>
  65. </div>
  66. </section>
  67. );
  68. }