Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
<meta name="viewport" content="width=device-width, viewport-fit=cover, minimal-ui"/>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, viewport-fit=cover, minimal-ui" />
<title>NoColored</title>
</head>
<body>
<div id="modal"></div>
<div id="prompt"></div>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
Expand Down
3 changes: 3 additions & 0 deletions src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import { RouterProvider } from 'react-router-dom';

import router from './router';

import FullScreenPrompt from '@/components/prompt';

import { useSoundSetting } from '@/features/sound';

const App = () => {
const { playBgm } = useSoundSetting();

return (
<div onClick={playBgm} role='presentation'>
<FullScreenPrompt />
<RouterProvider router={router} />
</div>
);
Expand Down
14 changes: 7 additions & 7 deletions src/components/button/ColoredIconButton/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const Play: Story = {
args: {
size: 'medium',
color: 'red',
icon: '/images/ui/icon/button/icon-button-play-h50w50.png',
icon: './images/ui/icon/button/icon-button-play-h50w50.png',
text: 'Play',
},
};
Expand All @@ -62,7 +62,7 @@ export const Collection: Story = {
args: {
size: 'medium',
color: 'blue',
icon: '/images/ui/icon/button/icon-button-collection-h50w50.png',
icon: './images/ui/icon/button/icon-button-collection-h50w50.png',
text: 'Collection',
},
};
Expand All @@ -71,7 +71,7 @@ export const Ranking: Story = {
args: {
size: 'medium',
color: 'green',
icon: '/images/ui/icon/button/icon-button-ranking-h50w50.png',
icon: './images/ui/icon/button/icon-button-ranking-h50w50.png',
text: 'Ranking',
},
};
Expand All @@ -80,7 +80,7 @@ export const FriendlyMatch: Story = {
args: {
size: 'xlarge',
color: 'pink',
icon: '/images/ui/icon/button/icon-button-modemulti-h50w50.png',
icon: './images/ui/icon/button/icon-button-modemulti-h50w50.png',
text: '친선전',
},
};
Expand All @@ -89,7 +89,7 @@ export const RankedMatch: Story = {
args: {
size: 'xlarge',
color: 'yellow',
icon: '/images/ui/icon/button/icon-button-moderank-h50w50.png',
icon: './images/ui/icon/button/icon-button-moderank-h50w50.png',
text: '랭킹전',
},
};
Expand All @@ -100,7 +100,7 @@ export const GameReady: Story = {
args: {
size: 'large',
color: 'gray300',
icon: '/images/ui/icon/shape/icon-shape-white-big-player1-h48w48.png',
icon: './images/ui/icon/shape/icon-shape-white-big-player1-h48w48.png',
text: '준비취소',
},
render: (args: Required<Story['args']>) => {
Expand All @@ -119,7 +119,7 @@ export const GameStart: Story = {
args: {
size: 'large',
color: 'blue',
icon: '/images/ui/icon/shape/icon-shape-white-big-player3-h48w48.png',
icon: './images/ui/icon/shape/icon-shape-white-big-player3-h48w48.png',
text: '게임시작',
},
render: (args: Required<Story['args']>) => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/chip/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const MapInfo: Story = {
size='medium'
borderSize='1x'
borderColor='black'
imgSrc='/images/map/background/factorymap.png'
imgSrc='./images/map/background/factorymap.png'
>
<Chip {...args} />
</ImageBox>
Expand Down Expand Up @@ -87,7 +87,7 @@ export const PlayerState: Story = {
responsive: true,
color: 'blue',
text: 'READY',
icon: '/images/ui/icon/shape/icon-shape-white-small-player3-h16w16.png',
icon: './images/ui/icon/shape/icon-shape-white-small-player3-h16w16.png',
},
argTypes: {
color: {
Expand All @@ -103,7 +103,7 @@ export const PlayerState: Story = {
borderSize='5x'
borderColor={borderColor}
backgroundColor='white'
imgSrc='/images/character/character-default-sunglass-yellow-h240w240.png'
imgSrc='./images/character/character-default-sunglass-yellow-h240w240.png'
>
<Chip {...args} />
</ImageBox>
Expand Down
10 changes: 6 additions & 4 deletions src/components/frame/constants.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { vars } from '@/styles/vars.css';

import { IPHONE_14_PRO_MAX, IPHONE_SE } from '@/constants/screen';

export const FRAME_STYLE = {
width: {
max: '932px', // iphone 14 pro max
min: '667px', // iphone se
max: IPHONE_14_PRO_MAX.width,
min: IPHONE_SE.width,
},
height: {
max: '431px',
min: '320px',
max: IPHONE_14_PRO_MAX.height,
min: IPHONE_SE.height,
},
padding: vars.space['4x'],
};
3 changes: 0 additions & 3 deletions src/components/frame/with-buttons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import MenuButton from './menu-button';

import SettingNavigationButton from '@/components/button/SettingNavigationButton/index';

import FullScreenPrompt from '@/pages/landing/FullScreenPrompt';

interface Props {
children: ReactNode;
leftButton?: {
Expand All @@ -34,7 +32,6 @@ const BasicContentFrame = ({

return (
<div className={styles.frame}>
<FullScreenPrompt />
{!rightButtonsDisabled && (
<div className={styles.iconButtons}>
<AudioButton />
Expand Down
42 changes: 33 additions & 9 deletions src/components/image-box/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@ import { flexOptions } from '@/styles/common.css';
import { sprinkles } from '@/styles/sprinkles.css';

const base = style([
flexOptions({ option: 'column' }),
sprinkles({
borderRadius: '2x',
paddingY: '2x',
alignItems: 'center',
aspectRatio: 'square',
position: 'relative',
}),
{
boxSizing: 'border-box',
overflow: 'hidden',
aspectRatio: '1 / 1',
backgroundRepeat: 'no-repeat',
backgroundClip: 'border-box',
backgroundSize: 'cover',
backgroundPosition: 'center',
},
]);

Expand All @@ -33,3 +26,34 @@ export const roundCornerImageBox = recipe({
backgroundColor,
},
});

export const image = style([
sprinkles({
position: 'absolute',
height: 'full',
zIndex: 'z-1',
aspectRatio: 'square',
}),
{
objectFit: 'cover',
objectPosition: 'center',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
},
]);

export const contents = style([
flexOptions({ option: 'column' }),
sprinkles({
paddingY: '2x',
alignItems: 'center',
position: 'relative',
zIndex: 'z-2',
height: 'full',
aspectRatio: 'square',
}),
{
boxSizing: 'border-box',
},
]);
12 changes: 6 additions & 6 deletions src/components/image-box/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Story = StoryObj<typeof meta>;
export const Skin = {
args: {
size: 'medium',
imgSrc: '/images/character/character-default-sunglass-yellow-h240w240.png',
imgSrc: './images/character/character-default-sunglass-yellow-h240w240.png',
borderSize: '1x',
borderColor: 'black',
backgroundColor: 'gray200',
Expand All @@ -67,7 +67,7 @@ export const Skin = {
export const Map: Story = {
args: {
size: 'medium',
imgSrc: '/images/map/background/factorymap.png',
imgSrc: './images/map/background/factorymap.png',
borderSize: '1x',
borderColor: 'black',
children: <Chip color='navy' text='팩토리' />,
Expand All @@ -79,7 +79,7 @@ type ChipColor = Exclude<Story['args']['borderColor'], 'black' | undefined>;
export const Player1 = {
args: {
size: 'large',
imgSrc: '/images/character/character-default-none-clone-h240w240.png',
imgSrc: './images/character/character-default-none-clone-h240w240.png',
borderSize: '5x',
borderColor: 'pink',
backgroundColor: 'white',
Expand All @@ -97,7 +97,7 @@ export const Player1 = {
responsive
color={color}
text='방장'
icon='/images/ui/icon/shape/icon-shape-white-small-player0-h16w16.png'
icon='./images/ui/icon/shape/icon-shape-white-small-player0-h16w16.png'
/>
</ImageBox>
);
Expand All @@ -107,7 +107,7 @@ export const Player1 = {
export const Player2 = {
args: {
size: 'large',
imgSrc: '/images/character/character-default-sunglass-yellow-h240w240.png',
imgSrc: './images/character/character-default-sunglass-yellow-h240w240.png',
borderSize: '5x',
borderColor: 'green',
backgroundColor: 'white',
Expand All @@ -125,7 +125,7 @@ export const Player2 = {
responsive
color={color}
text='READY'
icon='/images/ui/icon/shape/icon-shape-white-small-player1-h16w16.png'
icon='./images/ui/icon/shape/icon-shape-white-small-player1-h16w16.png'
/>
</ImageBox>
);
Expand Down
8 changes: 4 additions & 4 deletions src/components/image-box/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@ type StyleProps = NonNullable<
type Props = {
children?: React.ReactNode;
imgSrc: string;
alt?: string;
} & Required<Pick<StyleProps, 'size'>> &
Omit<StyleProps, 'size'>;

const RoundCornerImageBox = ({
children,
imgSrc,
alt,
size,
borderSize,
borderColor,
backgroundColor,
}: Props) => {
return (
<div
style={{
backgroundImage: `url(${imgSrc})`,
}}
className={styles.roundCornerImageBox({
size,
borderColor,
borderSize,
backgroundColor,
})}
>
{children}
<img className={styles.image} src={imgSrc} alt={alt} />
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alt prop is optional but no default value is provided. When alt is undefined, screen readers will announce the image filename, which may not be meaningful. Consider providing a default empty string for decorative images: alt={alt ?? ''}.

Suggested change
<img className={styles.image} src={imgSrc} alt={alt} />
<img className={styles.image} src={imgSrc} alt={alt ?? ''} />

Copilot uses AI. Check for mistakes.
{children && <div className={styles.contents}>{children}</div>}
</div>
);
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/player-info/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const meta = {
args: {
label: '너 나보다 못하잖아.',
nickname: '민돌멩이',
imgSrc: '/images/character/character-default-sunglass-yellow-h240w240.png',
imgSrc: './images/character/character-default-sunglass-yellow-h240w240.png',
},
} satisfies Meta<typeof PlayerInfo>;

Expand Down Expand Up @@ -65,7 +65,7 @@ export const GameResult: Story = {
args: {
label: '손님',
nickname: '허스키한 자라',
imgSrc: '/images/character/character-default-none-clone-h240w240.png',
imgSrc: './images/character/character-default-none-clone-h240w240.png',
},
render: (args) => {
return (
Expand Down
43 changes: 43 additions & 0 deletions src/components/prompt/index.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { style } from '@vanilla-extract/css';

import { sprinkles } from '@/styles/sprinkles.css';

import { IPHONE_SE } from '@/constants/screen';

export const fullscreenPromptStyle = style([
sprinkles({
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
width: 'full',
height: 'full',
zIndex: 'alert-content',
position: 'fixed',
}),
{
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
backgroundSize: 'cover',
backgroundImage:
'url(/images/background/background-white-large-h991w1922.webp)',
overlay: 'auto',
top: 0,
left: 0,

'@media': {
[`screen and (min-width: ${IPHONE_SE.width})`]: {
display: 'none',
},
},
},
]);

export const fullscreenPromptText = style([
{
textAlign: 'center',
fontSize: '40px',
lineHeight: '48px',
textShadow: '-3px 0px white, 0px 3px white, 3px 0px white, 0px -3px white',
},
]);
13 changes: 13 additions & 0 deletions src/components/prompt/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as styles from './index.css';

const FullscreenPrompt = () => {
return (
<div className={styles.fullscreenPromptStyle}>
<p className={styles.fullscreenPromptText}>!! 주의 !!</p>
<p className={styles.fullscreenPromptText}>{'<가로 모드>를'}</p>
<p className={styles.fullscreenPromptText}>장착하세요!</p>
</div>
);
};

export default FullscreenPrompt;
Loading