“開発モード” の表示 (#389) #393
+3
-1
@@ -6,6 +6,7 @@ import { BrowserRouter,
|
||||
Routes,
|
||||
useLocation } from 'react-router-dom'
|
||||
|
||||
import DevModeWatermark from '@/components/DevModeWatermark'
|
||||
import RouteBlockerOverlay from '@/components/RouteBlockerOverlay'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import DialogueProvider from '@/components/dialogues/DialogueProvider'
|
||||
@@ -145,6 +146,7 @@ const App: FC = () => {
|
||||
return (
|
||||
<>
|
||||
<RouteBlockerOverlay/>
|
||||
{import.meta.env.DEV && <DevModeWatermark/>}
|
||||
|
||||
<BrowserRouter>
|
||||
<DialogueProvider>
|
||||
@@ -152,7 +154,7 @@ const App: FC = () => {
|
||||
<motion.div
|
||||
layout="position"
|
||||
transition={{ layout: { duration: .2, ease: 'easeOut' } }}
|
||||
className="flex flex-col h-dvh w-full overflow-y-hidden">
|
||||
className="relative flex flex-col h-dvh w-full overflow-y-hidden">
|
||||
<TopNav user={user}/>
|
||||
<RouteTransitionWrapper user={user} setUser={setUser}/>
|
||||
</motion.div>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import nikumaru from '@/assets/fonts/nikumaru.otf'
|
||||
|
||||
import type { FC } from 'react'
|
||||
|
||||
|
||||
const ROW_COUNT = 8
|
||||
const COLUMN_COUNT = 12
|
||||
|
||||
|
||||
const DevModeWatermark: FC = () => {
|
||||
return (
|
||||
<div
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none select-none fixed inset-0 overflow-hidden z-0">
|
||||
<style>{`
|
||||
@font-face {
|
||||
font-family: 'Nikumaru';
|
||||
src: url(${nikumaru}) format('opentype');
|
||||
}
|
||||
`}</style>
|
||||
<div className="absolute -inset-32 flex flex-col justify-center gap-12 py-48">
|
||||
{Array.from ({ length: ROW_COUNT }, (_, rowIndex) => (
|
||||
<div
|
||||
key={rowIndex}
|
||||
className={
|
||||
'flex min-h-32 items-center gap-12 '
|
||||
+ (rowIndex % 2 === 0 ? 'translate-x-0' : 'translate-x-32')
|
||||
}>
|
||||
{Array.from ({ length: COLUMN_COUNT }, (_, columnIndex) => (
|
||||
<span
|
||||
key={columnIndex}
|
||||
className={
|
||||
'whitespace-nowrap text-3xl font-bold '
|
||||
+ 'tracking-[0.3em] text-neutral-950/5 '
|
||||
+ 'dark:text-white/10'
|
||||
}
|
||||
style={{ fontFamily: 'Nikumaru' }}>
|
||||
開発モード
|
||||
</span>))}
|
||||
</div>))}
|
||||
</div>
|
||||
</div>)
|
||||
}
|
||||
|
||||
|
||||
export default DevModeWatermark
|
||||
新しい課題から参照
ユーザをブロックする