base.tsx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { Html } from "@elysiajs/html";
  2. import { version } from "../../package.json";
  3. export const BaseHtml = ({
  4. children,
  5. title = "ConvertX",
  6. webroot = "",
  7. }: {
  8. children: JSX.Element;
  9. title?: string;
  10. webroot?: string;
  11. }) => (
  12. <html lang="en">
  13. <head>
  14. <meta charset="UTF-8" />
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  16. <meta name="webroot" content={webroot} />
  17. <title safe>{title}</title>
  18. <link rel="stylesheet" href={`${webroot}/generated.css`} />
  19. <link
  20. rel="apple-touch-icon"
  21. sizes="180x180"
  22. href={`${webroot}/apple-touch-icon.png`}
  23. />
  24. <link
  25. rel="icon"
  26. type="image/png"
  27. sizes="32x32"
  28. href={`${webroot}/favicon-32x32.png`}
  29. />
  30. <link
  31. rel="icon"
  32. type="image/png"
  33. sizes="16x16"
  34. href={`${webroot}/favicon-16x16.png`}
  35. />
  36. <link rel="manifest" href={`${webroot}/site.webmanifest`} />
  37. </head>
  38. <body class="flex min-h-screen w-full flex-col bg-neutral-900 text-neutral-200">
  39. {children}
  40. <footer class="w-full">
  41. <div class="p-4 text-center text-sm text-neutral-500">
  42. <span>Powered by </span>
  43. <a
  44. href="https://github.com/C4illin/ConvertX"
  45. class={`
  46. text-neutral-400
  47. hover:text-accent-500
  48. `}
  49. >
  50. ConvertX{" "}
  51. </a>
  52. <span safe>v{version || ""}</span>
  53. </div>
  54. </footer>
  55. </body>
  56. </html>
  57. );