ぼざクリタグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
2.0 KiB

  1. import { Helmet } from 'react-helmet-async'
  2. import nikumaru from '@/assets/fonts/nikumaru.otf'
  3. import errorImg from '@/assets/images/not-found.gif'
  4. import MainArea from '@/components/layout/MainArea'
  5. import { SITE_TITLE } from '@/config'
  6. import type { FC } from 'react'
  7. type Props = { status: number }
  8. export default (({ status }: Props) => {
  9. const [message, rightMsg, leftMsg]: [string, string, string] = (() => {
  10. switch (status)
  11. {
  12. case 403:
  13. return ['権限ないよ(笑)', '帰れ!', '帰れ!']
  14. case 404:
  15. return ['ページないよ(笑)', '帰れ!', '帰れ!']
  16. case 500:
  17. return ['鯖でエラー出たって(嘲笑)', '管理人に', '聯絡を!']
  18. case 503:
  19. return ['鯖死んでるよ(泣)', '管理人に', '聯絡を!']
  20. default:
  21. throw new Error
  22. }
  23. }) ()
  24. const title = message.replaceAll ('(', ' (').replaceAll (')', ')')
  25. const style = document.createElement ('style')
  26. style.innerHTML = `
  27. @font-face
  28. {
  29. font-family: 'Nikumaru';
  30. src: url(${ nikumaru }) format('opentype');
  31. }`
  32. document.head.appendChild (style)
  33. return (
  34. <MainArea>
  35. <Helmet>
  36. <meta name="robots" content="noindex"/>
  37. <title>{title} | {SITE_TITLE}</title>
  38. </Helmet>
  39. <div className="text-6xl font-bold text-transparent
  40. bg-[linear-gradient(90deg,#ff0000,#ff8800,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000)]
  41. bg-clip-text bg-[length:200%_100%] animate-rainbow-scroll drop-shadow-[0_0_6px_black]
  42. space-y-2 sm:space-y-4 md:space-y-6 text-center flex flex-col justify-center items-center"
  43. style={{ fontFamily: 'Nikumaru' }}>
  44. <p>{status}</p>
  45. <div className="flex flex-row space-x-1 sm:space-x-2 md:space-x-4">
  46. <p style={{ writingMode: 'vertical-rl' }}>{leftMsg}</p>
  47. <img className="max-w-[70vw]" src={errorImg} alt="逃げたギター"/>
  48. <p style={{ writingMode: 'vertical-rl' }}>{rightMsg}</p>
  49. </div>
  50. <p className="mr-[-.5em]">{message}</p>
  51. </div>
  52. </MainArea>)
  53. }) satisfies FC<Props>