WelcomeFrame.tsx 1023 B

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