index.tsx 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import React from "react";
  2. import Head from "@docusaurus/Head";
  3. import clsx from "clsx";
  4. import Link from "@docusaurus/Link";
  5. import { CommonLayout } from "@site/src/refine-theme/common-layout";
  6. import { CommonHeader } from "@site/src/refine-theme/common-header";
  7. import { BlogFooter } from "@site/src/refine-theme/blog-footer";
  8. import { weekOfRefineCards } from "@site/src/assets/week-of-refine/constants";
  9. import {
  10. DateIcon,
  11. RefineWeekLogoXL,
  12. } from "@site/src/assets/week-of-refine/icons";
  13. export type CardProps = {
  14. title: string;
  15. imgURL: string;
  16. dateRange: string;
  17. description: string;
  18. logo: React.FC<React.SVGProps<SVGSVGElement>>;
  19. bgLinearGradient: string;
  20. link: string;
  21. };
  22. const Card = ({
  23. title,
  24. imgURL,
  25. dateRange,
  26. description,
  27. logo,
  28. bgLinearGradient,
  29. link,
  30. }: CardProps) => {
  31. const Logo = logo;
  32. return (
  33. <Link to={link} className="no-underline">
  34. <article className={clsx(bgLinearGradient, "rounded-md")}>
  35. <div
  36. className={clsx(
  37. "text-2xl font-semibold text-gray-900 dark:text-gray-200",
  38. "py-4 px-6",
  39. )}
  40. >
  41. {title}
  42. </div>
  43. <div className="px-4">
  44. <img src={imgURL} alt={title} />
  45. </div>
  46. <div className={clsx("flex flex-col gap-4", "p-6")}>
  47. <div className="flex items-center gap-3">
  48. <DateIcon />
  49. <span className="text-gray-500 dark:text-gray-400">
  50. {dateRange}
  51. </span>
  52. </div>
  53. <p className="text-gray-700 dark:text-gray-300">
  54. {description}
  55. </p>
  56. <div className="flex self-end gap-4">
  57. <span className="text-gray-500 dark:text-gray-400">
  58. with
  59. </span>
  60. <Logo />
  61. </div>
  62. </div>
  63. </article>
  64. </Link>
  65. );
  66. };
  67. const RefineWeek = () => {
  68. return (
  69. <CommonLayout>
  70. <div className="not-prose">
  71. <Head title="RefineWeek | Refine">
  72. <html data-page="week-of-refine" data-customized="true" />
  73. </Head>
  74. <CommonHeader hasSticky={true} />
  75. <div className="blog-lg:px-8 px-4">
  76. <div
  77. className={clsx(
  78. "mx-auto",
  79. "blog-sm:max-w-[624px]",
  80. "blog-md:max-w-[768px]",
  81. "landing-xl:!max-w-[1264px]",
  82. "py-10",
  83. )}
  84. >
  85. <div
  86. className={clsx(
  87. "flex flex-col landing-xl:flex-row",
  88. "gap-10 landing-xl:gap-0",
  89. "blog-sm:mt-10 blog-sm:mb-20",
  90. )}
  91. >
  92. <RefineWeekLogoXL className="flex-shrink-0 landing-xl:mr-[116px]" />
  93. <p className="text-[32px] leading-10 font-semibold text-gray-800 dark:text-gray-100">
  94. OpenPanel SysAdmin Tutorials - a practical and engaging learning experience
  95. </p>
  96. </div>
  97. <div className="grid grid-cols-1 blog-md:grid-cols-2 landing-xl:!grid-cols-3 gap-10 mt-10">
  98. {weekOfRefineCards.map((card) => (
  99. <Card key={card.title} {...card} />
  100. ))}
  101. </div>
  102. </div>
  103. </div>
  104. <BlogFooter />
  105. </div>
  106. </CommonLayout>
  107. );
  108. };
  109. export default RefineWeek;