WelcomeFrame.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { asset } from "fresh/runtime";
  2. import Button from "../components/form/Button.tsx";
  3. import ThemeToggle from "./ThemeToggle.tsx";
  4. export default function WelcomeFrame() {
  5. const goLogin = () => {
  6. location.href = "/login";
  7. };
  8. const goRegister = () => {
  9. location.href = "/register";
  10. };
  11. return (
  12. <div className="flex items-center justify-center flex-col w-full h-full relative">
  13. <div className="absolute top-0 right-0">
  14. <ThemeToggle />
  15. </div>
  16. <div className="flex items-center">
  17. <img
  18. className="w-32 h-32 mr-2 dark:invert"
  19. src={asset("/postdown.png")}
  20. alt="Postdown"
  21. />
  22. <h1>Postdown</h1>
  23. </div>
  24. <span className="text-xl mb-8">
  25. A web-based, shareable, self-hosted Markdown editor built with deno
  26. </span>
  27. <div>
  28. <Button
  29. type="button"
  30. className="w-32 mx-2"
  31. onClick={goLogin}
  32. >
  33. Login
  34. </Button>
  35. <Button
  36. type="button"
  37. className="w-32 mx-2"
  38. onClick={goRegister}
  39. >
  40. Register
  41. </Button>
  42. </div>
  43. </div>
  44. );
  45. }