Skip to content

Commit a5b6c25

Browse files
Merge pull request #71 from nka21/feature/63
全画面のモバイルサイズのデザイン調整
2 parents 8219c2c + 4a6e323 commit a5b6c25

11 files changed

Lines changed: 73 additions & 54 deletions

apps/web/src/App.module.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
padding: 0;
88
}
99

10+
.screen {
11+
width: 100%;
12+
height: 100%;
13+
border-radius: 36px;
14+
overflow: hidden;
15+
position: relative;
16+
}
17+
1018
.phone-container {
1119
width: 375px;
1220
height: 812px;
@@ -20,6 +28,19 @@
2028
overflow-x: hidden;
2129
}
2230

31+
@media (max-width: 460px) {
32+
.phone-container {
33+
width: 100vw;
34+
height: 100vh;
35+
margin: 0;
36+
border-radius: 0;
37+
}
38+
39+
.screen {
40+
border-radius: 0;
41+
}
42+
}
43+
2344
/* テスト用の結果画面 */
2445
.testResult {
2546
padding: 20px;

apps/web/src/components/home/HomeScreen.module.css

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,6 @@
7777
}
7878
}
7979

80-
.screen {
81-
width: 100%;
82-
height: 100%;
83-
border-radius: 36px;
84-
overflow: hidden;
85-
position: relative;
86-
display: none;
87-
}
88-
89-
.screen.active {
90-
display: block;
91-
animation: fadeIn 0.4s ease-out;
92-
}
93-
9480
.home-screen {
9581
background: linear-gradient(
9682
180deg,
@@ -130,7 +116,7 @@
130116
font-size: 20px;
131117
color: var(--text-secondary);
132118
margin-top: 0px;
133-
margin-bottom: 40px;
119+
margin-bottom: 60px;
134120
line-height: 1.5;
135121
opacity: 0;
136122
transform: translateY(20px);
@@ -140,7 +126,7 @@
140126
.character-area {
141127
width: 85%;
142128
height: 85%;
143-
margin-bottom: 60px;
129+
margin-bottom: 80px;
144130
opacity: 0;
145131
position: relative;
146132
transform: scale(0.8);

apps/web/src/components/home/HomeScreen.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { motion } from 'framer-motion';
77
import huntoru from '../../assets/huntoru.png';
88
import styles from './HomeScreen.module.css';
99

10+
import components from '@/web/App.module.css';
11+
1012
export const HomeScreen = () => {
1113
const navigate = useNavigate();
1214

@@ -16,7 +18,7 @@ export const HomeScreen = () => {
1618

1719
return (
1820
<motion.div
19-
className={clsx(styles.screen, styles['home-screen'], styles.active)}
21+
className={clsx(components.screen, styles['home-screen'], styles.active)}
2022
initial={{ opacity: 0 }}
2123
animate={{ opacity: 1 }}
2224
exit={{ opacity: 0, x: -100 }}

apps/web/src/components/mode/ModeScreen.module.css

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
.screen {
2-
width: 100%;
3-
height: 100%;
4-
border-radius: 36px;
5-
overflow: hidden;
6-
position: relative;
7-
}
8-
91
.content {
102
height: 100%;
113
position: relative;
@@ -25,6 +17,12 @@
2517
padding: 40px 20px 30px;
2618
}
2719

20+
@media (max-width: 460px) {
21+
.difficulty-header {
22+
padding: 80px 20px 30px;
23+
}
24+
}
25+
2826
.pixel-bubble {
2927
position: absolute;
3028
width: 220px;
@@ -45,6 +43,21 @@
4543
font-family: 'Courier New', Courier;
4644
}
4745

46+
@media (max-width: 460px) {
47+
.pixel-bubble {
48+
position: absolute;
49+
width: 220px;
50+
height: 220px;
51+
top: 10px;
52+
left: 60px;
53+
color: var(--primary-bg);
54+
}
55+
.pixel-bubble-text {
56+
top: 77px;
57+
left: 85px;
58+
}
59+
}
60+
4861
.huntoru-icon {
4962
width: 80px;
5063
position: relative;

apps/web/src/components/mode/ModeScreen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import huntoru from '../../assets/huntoru.png';
88
import { PixelBubble } from '../ui/PixelBubble';
99
import styles from './ModeScreen.module.css';
1010

11+
import components from '@/web/App.module.css';
1112
import { API_CONFIG } from '@/web/lib/api';
1213
import type { Theme } from '@/web/types';
1314

@@ -37,7 +38,7 @@ export const ModeScreen = () => {
3738

3839
return (
3940
<motion.div
40-
className={clsx(styles.screen, styles['difficulty-screen'])}
41+
className={clsx(components.screen, styles['difficulty-screen'])}
4142
initial={{ opacity: 0, x: 100 }}
4243
animate={{ opacity: 1, x: 0 }}
4344
exit={{ opacity: 0, x: -100 }}

apps/web/src/components/photo/PhotoPreview.module.css

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
.screen {
2-
width: 100%;
3-
height: 100%;
4-
border-radius: 36px;
5-
overflow: hidden;
6-
position: relative;
7-
/* display: none; */
8-
}
9-
101
/* Screen 3.5: Photo Preview Screen */
112
.preview-screen {
123
background: linear-gradient(
@@ -27,6 +18,7 @@
2718
display: flex;
2819
flex-direction: column;
2920
padding: 20px;
21+
box-sizing: border-box;
3022
}
3123

3224
.time-info {
@@ -83,8 +75,8 @@
8375
font-size: 16px;
8476
font-weight: 500;
8577
text-align: center;
86-
min-height: 300px;
87-
max-height: 400px;
78+
/* min-height: 300px; */
79+
max-height: calc(100vh - 460px);
8880
border: 3px solid var(--warm-brown);
8981
box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
9082
overflow: hidden;
@@ -96,6 +88,12 @@
9688
}
9789
}
9890

91+
@media (max-width: 460px) {
92+
.photo-preview-area {
93+
max-height: calc(100vh - 420px);
94+
}
95+
}
96+
9997
.preview-actions {
10098
display: flex;
10199
flex-direction: column;

apps/web/src/components/photo/PhotoPreview.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { motion } from 'framer-motion';
66

77
import styles from './PhotoPreview.module.css';
88

9+
import components from '@/web/App.module.css';
910
import { API_CONFIG } from '@/web/lib/api';
1011

1112
interface PhotoPreviewProps {
@@ -82,7 +83,7 @@ export const PhotoPreview = (props: PhotoPreviewProps) => {
8283

8384
return (
8485
<motion.div
85-
className={clsx(styles['screen'], styles['preview-screen'])}
86+
className={clsx(components.screen, styles['preview-screen'])}
8687
initial={{ opacity: 0, x: 100 }}
8788
animate={{ opacity: 1, x: 0 }}
8889
exit={{ opacity: 0, x: -100 }}

apps/web/src/components/photo/PhotoScreen.module.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
.screen {
2-
width: 100%;
1+
.content {
32
height: 100%;
4-
border-radius: 36px;
5-
overflow: hidden;
63
position: relative;
7-
/* display: none; */
4+
overflow-y: auto;
85
}
96

107
.photo-screen {
@@ -15,7 +12,7 @@
1512
);
1613
}
1714

18-
.photo-Content {
15+
.photo-content {
1916
height: 100%;
2017
position: relative;
2118
display: flex;
@@ -93,6 +90,12 @@
9390
transition: all 0.3s ease;
9491
}
9592

93+
@media (max-width: 460px) {
94+
.camera-main {
95+
flex: 1;
96+
}
97+
}
98+
9699
/* Camera UI Elements */
97100
.camera-overlay {
98101
position: absolute;

apps/web/src/components/photo/PhotoScreen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { motion } from 'framer-motion';
88
import { Camera } from '../camera';
99
import styles from './PhotoScreen.module.css';
1010

11+
import components from '@/web/App.module.css';
1112
import type { CameraRef } from '@/web/components/camera/types';
1213
import type { Theme } from '@/web/types';
1314

@@ -140,7 +141,7 @@ export const PhotoScreen = () => {
140141

141142
return (
142143
<motion.div
143-
className={clsx(styles['screen'], styles['photo-screen'])}
144+
className={clsx(components.screen, styles['photo-screen'])}
144145
initial={{ opacity: 0, x: 100 }}
145146
animate={{ opacity: 1, x: 0 }}
146147
exit={{ opacity: 0, x: -100 }}

apps/web/src/components/result/ResultScreen.module.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
.screen {
2-
width: 100%;
3-
height: 100%;
4-
border-radius: 36px;
5-
overflow: hidden;
6-
position: relative;
7-
}
8-
91
.result-screen {
102
background: linear-gradient(
113
180deg,

0 commit comments

Comments
 (0)