add the cube master

This commit is contained in:
hamid zarghami
2025-12-09 11:06:48 +03:30
parent 53b9139506
commit d2325e9090
65 changed files with 6843 additions and 0 deletions
+30
View File
@@ -103,6 +103,36 @@ const GamePage: FC = () => {
</div>
</div>
<div
style={{ direction: 'ltr' }}
className='bg-white shadow-sm rounded-[10px] p-2 flex justify-between items-center cursor-pointer'
onClick={() => {
const currentPath = window.location.pathname
const basePath = currentPath.split('/game')[0]
router.push(`${basePath}/game/the-cube`)
}}
>
<div className='flex gap-3 items-center'>
<Image
src='/assets/images/cube_logo.jpeg'
alt='The Cube'
width={80}
height={80}
className='size-[80px] object-cover'
/>
<div className='text-sm font-bold max-w-[92px]'>
The Cube
</div>
</div>
<div className='h-8 bg-[#F2F2F2] rounded-lg px-3 flex gap-1 items-center justify-center'>
<div className='text-xs'>اجرا کنید</div>
<Play size='20' color='currentColor' />
</div>
</div>
</div>
</div>
)
@@ -0,0 +1,29 @@
'use client'
import { type FC } from 'react'
import { useRouter } from 'next/navigation'
import { CloseCircle } from 'iconsax-react'
const TheCubePage: FC = () => {
const router = useRouter()
return (
<div className='fixed inset-0 w-full h-full p-0 m-0 bg-white'>
<button
onClick={() => router.back()}
className='absolute top-4 left-4 z-50 bg-white rounded-full shadow-lg p-1 hover:bg-gray-100 transition-colors'
aria-label='بستن'
>
<CloseCircle size='32' color='#000' variant='Bold' />
</button>
<iframe
src='/the-cube-master/index.html'
className='w-full h-full border-0'
title='The Cube Game'
sandbox='allow-scripts allow-same-origin'
referrerPolicy='no-referrer'
/>
</div>
)
}
export default TheCubePage
@@ -19,6 +19,8 @@ const TowerBuilderPage: FC = () => {
src='/tower_game-master/index.html'
className='w-full h-full border-0'
title='Tower Builder Game'
sandbox='allow-scripts allow-same-origin'
referrerPolicy='no-referrer'
/>
</div>
)