Skip to content

Commit 9186825

Browse files
added multiple device compatibility features
1 parent 1cd8acc commit 9186825

2 files changed

Lines changed: 67 additions & 21 deletions

File tree

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
</style>
88

99
<meta charset="UTF-8" />
10-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
11+
<meta name="theme-color" content="#0f1919">
1112
<title>Kana Go</title>
1213
<link rel="stylesheet" href="style.css" />
1314
</head>
14-
<body style="margin: 0px" oncontextmenu="return false;">
15+
<body oncontextmenu="return false;">
1516
<section class="header">
1617
<div class="spacer"></div>
1718

style.css

Lines changed: 64 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@ html, body {
1616
padding: 0;
1717
width: 100%;
1818
height: 100%;
19+
/* Fallback for browsers that don't support dvh */
20+
height: 100vh;
21+
/* Use dvh to account for mobile address bars */
22+
height: 100dvh;
1923
overflow: hidden;
2024
outline: none;
2125
user-select: none;
26+
/* Prevent zoom on double tap on mobile */
27+
touch-action: manipulation;
2228
}
2329

2430
/* --- Header Styling --- */
@@ -27,50 +33,51 @@ html, body {
2733
background-color: var(--base);
2834
width: 100vw;
2935
height: 10vh;
36+
min-height: 60px; /* Minimum clickable area */
3037
display: flex;
3138
align-items: center;
32-
justify-content: space-between; /* Pushes content apart */
33-
padding: 0 2rem; /* Add horizontal padding */
34-
box-sizing: border-box; /* Ensures padding doesn't affect width */
39+
justify-content: space-between;
40+
padding: 0 2rem;
41+
box-sizing: border-box;
3542
color: var(--text);
3643
font-family: "Comic Neue";
3744
font-size: 25px;
3845
box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.2);
3946
position: relative;
4047
}
4148

42-
/* Centers the H1 absolutely so it ignores the buttons on the right */
4349
.header h1 {
4450
position: absolute;
4551
left: 50%;
4652
transform: translateX(-50%);
4753
margin: 0;
54+
white-space: nowrap;
4855
}
4956

50-
/* Empty spacer to balance layout if needed, though absolute H1 handles it */
5157
.spacer {
5258
width: 80px;
5359
}
5460

5561
/* --- Social Icons Container --- */
5662
.socials {
5763
display: flex;
58-
gap: 15px; /* Space between the two buttons */
64+
gap: 15px;
5965
align-items: center;
6066
z-index: 10;
6167
}
6268

63-
/* --- Unified Icon Button Styling --- */
6469
.icon-link {
6570
display: flex;
6671
align-items: center;
6772
justify-content: center;
6873
width: 45px;
6974
height: 45px;
7075
border-radius: 50%;
71-
background-color: rgba(255, 255, 255, 0.05); /* Subtle background */
76+
background-color: rgba(255, 255, 255, 0.05);
7277
transition: all 0.2s ease-in-out;
7378
text-decoration: none;
79+
/* Ensure tap target is large enough on mobile */
80+
cursor: pointer;
7481
}
7582

7683
.icon-link svg {
@@ -79,23 +86,19 @@ html, body {
7986
transition: transform 0.2s ease;
8087
}
8188

82-
/* Specific styling for GitHub Icon color */
8389
.github svg {
8490
color: var(--text);
8591
}
8692

87-
/* Hover Effects */
8893
.icon-link:hover {
8994
background-color: rgba(255, 255, 255, 0.1);
9095
transform: scale(1.1);
91-
cursor: pointer;
9296
}
9397

9498
.github:hover svg {
9599
color: var(--text-hover);
96100
}
97101

98-
/* BMC Specific override if you want to keep the yellow pop */
99102
.bmc:hover svg path[fill="#FFDD00"] {
100103
filter: brightness(1.2);
101104
}
@@ -104,20 +107,26 @@ html, body {
104107
.body {
105108
background-color: var(--BG);
106109
width: 100vw;
110+
/* Adjust for header height */
107111
height: 90vh;
112+
height: 90dvh;
108113
display: flex;
109114
flex-direction: column;
110115
}
111116

112117
.buttons {
113118
user-select: none;
114119
width: 100vw;
115-
height: 70px;
120+
/* Allow height to grow if buttons wrap */
121+
min-height: 70px;
122+
height: auto;
116123
align-items: center;
117124
justify-content: center;
118125
display: flex;
119126
padding-top: 20px;
120-
transition: all 0.2s ease-in-out;
127+
box-sizing: border-box;
128+
flex-wrap: wrap; /* Allows wrapping on very tiny screens */
129+
gap: 10px; /* Handles spacing when wrapped */
121130
}
122131

123132
.buttons button {
@@ -128,13 +137,15 @@ html, body {
128137
border: solid 0px #262a2b;
129138
background-color: var(--buttons);
130139
border-radius: 15px;
131-
width: 100px;
140+
/* Fixed width on desktop, flexible on mobile */
141+
width: 100px;
132142
height: 45px;
133-
margin: 0px 10px;
134143
font-weight: 900;
135144
font-size: 15px;
136145
font-family: "Comic Neue";
137146
transition: all 0.2s ease-in-out;
147+
/* Remove default margins, use gap in container instead */
148+
margin: 0;
138149
}
139150

140151
.buttons button:hover {
@@ -179,11 +190,12 @@ html, body {
179190
.main blockquote {
180191
user-select: none;
181192
color: white;
182-
margin: 0; /* Reset browser default margin */
193+
margin: 0;
183194
align-items: center;
184195
justify-content: center;
185196
display: flex;
186-
font-size: 120px;
197+
/* Clamp makes font responsive: min 80px, max 120px, depends on viewport */
198+
font-size: clamp(80px, 25vw, 150px);
187199
}
188200

189201
.submain {
@@ -192,6 +204,7 @@ html, body {
192204
align-items: center;
193205
justify-content: center;
194206
margin-top: 20px;
207+
width: 100%;
195208
}
196209

197210
#answer {
@@ -207,7 +220,7 @@ html, body {
207220
#answer.shown {
208221
transition: ease 0.2s;
209222
text-align: center;
210-
padding: 0 15px; /* Add horizontal padding for longer text */
223+
padding: 0 15px;
211224
font-size: 25px;
212225
font-family: "Comic Neue";
213226
color: white;
@@ -219,4 +232,36 @@ html, body {
219232
#letter {
220233
transition: all ease 0.2s;
221234
font-family: "Zen Maru Gothic";
235+
}
236+
237+
/* --- Mobile / Tablet Media Query --- */
238+
@media (max-width: 600px) {
239+
.header {
240+
padding: 0 1rem; /* Reduce padding */
241+
}
242+
243+
.header h1 {
244+
font-size: 2rem;
245+
position: static; /* Remove absolute centering on mobile to prevent overlap */
246+
transform: none;
247+
}
248+
249+
.spacer {
250+
display: none; /* No need for spacer if absolute centering is gone */
251+
}
252+
253+
.socials {
254+
gap: 10px;
255+
}
256+
257+
.buttons {
258+
padding: 15px 10px;
259+
}
260+
261+
.buttons button {
262+
/* Make buttons share width evenly on mobile */
263+
flex: 1;
264+
min-width: 80px;
265+
max-width: 120px;
266+
}
222267
}

0 commit comments

Comments
 (0)