Skip to content

Commit 908c318

Browse files
committed
Add responsive mobile and high-zoom support
1 parent 7961121 commit 908c318

15 files changed

Lines changed: 890 additions & 12 deletions

src/app.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,45 @@
2828
--radius-sm: 4px;
2929
--radius-md: 8px;
3030
--radius-lg: 12px;
31+
32+
/* Responsive spacing */
33+
--spacing-xs: 0.25rem;
34+
--spacing-sm: 0.5rem;
35+
--spacing-md: 1rem;
36+
--spacing-lg: 1.5rem;
37+
--spacing-xl: 2rem;
38+
39+
/* Responsive content sizing */
40+
--content-max-width: 1400px;
41+
--browser-height: 320px;
42+
--animation-container-padding: 1.5rem;
3143
}
3244

3345
html {
3446
font-size: 16px;
3547
scroll-behavior: smooth;
3648
}
3749

50+
/* Responsive font sizing for high zoom levels */
51+
@media (max-width: 480px) {
52+
:root {
53+
--browser-height: 280px;
54+
--animation-container-padding: 0.75rem;
55+
}
56+
}
57+
58+
@media (min-width: 1800px) {
59+
:root {
60+
--content-max-width: 1600px;
61+
}
62+
}
63+
64+
@media (min-width: 2400px) {
65+
:root {
66+
--content-max-width: 1800px;
67+
}
68+
}
69+
3870
body {
3971
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
4072
background: var(--bg-dark);

src/lib/components/BrowserMockup.svelte

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
border-radius: var(--radius-md);
3636
overflow: hidden;
3737
border: 1px solid var(--border);
38+
width: 100%;
3839
}
3940
4041
.browser-window.malicious {
@@ -57,6 +58,7 @@
5758
.browser-dots {
5859
display: flex;
5960
gap: 6px;
61+
flex-shrink: 0;
6062
}
6163
6264
.dot {
@@ -76,6 +78,15 @@
7678
border-radius: 4px;
7779
font-size: 0.75rem;
7880
color: var(--text-muted);
81+
overflow: hidden;
82+
text-overflow: ellipsis;
83+
white-space: nowrap;
84+
min-width: 0;
85+
}
86+
87+
.url-text {
88+
overflow: hidden;
89+
text-overflow: ellipsis;
7990
}
8091
8192
.malicious-url {
@@ -87,9 +98,43 @@
8798
}
8899
89100
.browser-content {
90-
height: 320px;
101+
height: var(--browser-height, 320px);
91102
background: #fff;
92103
position: relative;
93104
overflow: hidden;
94105
}
106+
107+
/* Mobile adjustments */
108+
@media (max-width: 600px) {
109+
.browser-chrome {
110+
padding: 6px 8px;
111+
gap: 6px;
112+
}
113+
114+
.dot {
115+
width: 8px;
116+
height: 8px;
117+
}
118+
119+
.browser-url {
120+
padding: 3px 8px;
121+
font-size: 0.65rem;
122+
}
123+
}
124+
125+
@media (max-width: 380px) {
126+
.dot {
127+
width: 6px;
128+
height: 6px;
129+
}
130+
131+
.browser-dots {
132+
gap: 4px;
133+
}
134+
135+
.browser-url {
136+
font-size: 0.6rem;
137+
padding: 2px 6px;
138+
}
139+
}
95140
</style>

src/lib/components/Header.svelte

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<style>
1313
.header {
1414
text-align: center;
15-
padding: 2rem 1rem;
15+
padding: var(--spacing-xl) var(--spacing-md);
1616
border-bottom: 1px solid var(--border);
17-
margin-bottom: 1.5rem;
17+
margin-bottom: var(--spacing-lg);
1818
}
1919
2020
.header h1 {
@@ -37,4 +37,29 @@
3737
font-size: 1rem;
3838
margin-top: 0.5rem;
3939
}
40+
41+
@media (max-width: 600px) {
42+
.header {
43+
padding: var(--spacing-lg) var(--spacing-sm);
44+
margin-bottom: var(--spacing-md);
45+
}
46+
47+
.header h1 {
48+
font-size: 1.5rem;
49+
}
50+
51+
.subtitle {
52+
font-size: 0.85rem;
53+
}
54+
}
55+
56+
@media (max-width: 380px) {
57+
.header h1 {
58+
font-size: 1.25rem;
59+
}
60+
61+
.subtitle {
62+
font-size: 0.75rem;
63+
}
64+
}
4065
</style>

src/lib/components/StepHeader.svelte

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<style>
2323
.step-header {
2424
text-align: center;
25-
margin-bottom: 1.5rem;
25+
margin-bottom: var(--spacing-lg);
2626
}
2727
2828
.step-header h2 {
@@ -32,6 +32,7 @@
3232
align-items: center;
3333
justify-content: center;
3434
gap: 0.5rem;
35+
flex-wrap: wrap;
3536
}
3637
3738
.step-desc {
@@ -53,4 +54,34 @@
5354
border-radius: var(--radius-sm);
5455
font-size: 0.8rem;
5556
}
57+
58+
@media (max-width: 600px) {
59+
.step-header {
60+
margin-bottom: var(--spacing-md);
61+
}
62+
63+
.step-header h2 {
64+
font-size: 1.2rem;
65+
gap: 0.35rem;
66+
}
67+
68+
.step-desc {
69+
font-size: 0.85rem;
70+
}
71+
72+
.severity {
73+
font-size: 0.7rem;
74+
padding: 2px 6px;
75+
}
76+
}
77+
78+
@media (max-width: 380px) {
79+
.step-header h2 {
80+
font-size: 1.1rem;
81+
}
82+
83+
.step-desc {
84+
font-size: 0.8rem;
85+
}
86+
}
5687
</style>

src/lib/components/StepNav.svelte

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,20 @@
4343
top: 0;
4444
z-index: 100;
4545
background: var(--bg-dark);
46-
padding: 0.75rem 0;
46+
padding: 0.75rem var(--spacing-sm);
4747
border-bottom: 1px solid var(--border);
48-
margin-bottom: 1.5rem;
48+
margin-bottom: var(--spacing-lg);
49+
overflow-x: auto;
50+
-webkit-overflow-scrolling: touch;
4951
}
5052
5153
.step-indicators {
5254
display: flex;
5355
align-items: center;
5456
justify-content: center;
5557
gap: 0.25rem;
56-
flex-wrap: wrap;
58+
flex-wrap: nowrap;
59+
min-width: max-content;
5760
}
5861
5962
.step-btn {
@@ -69,6 +72,7 @@
6972
transition: all 0.2s;
7073
min-width: 90px;
7174
color: var(--text-primary);
75+
flex-shrink: 0;
7276
}
7377
7478
.step-btn:hover {
@@ -106,11 +110,61 @@
106110
.step-label {
107111
font-size: 0.7rem;
108112
color: var(--text-muted);
113+
white-space: nowrap;
109114
}
110115
111116
.step-connector {
112117
width: 20px;
113118
height: 2px;
114119
background: var(--border);
120+
flex-shrink: 0;
121+
}
122+
123+
/* Mobile: horizontal scroll with smaller buttons */
124+
@media (max-width: 600px) {
125+
.step-nav {
126+
padding: 0.5rem;
127+
margin-bottom: var(--spacing-md);
128+
}
129+
130+
.step-indicators {
131+
justify-content: flex-start;
132+
padding: 0 0.25rem;
133+
}
134+
135+
.step-btn {
136+
min-width: 70px;
137+
padding: 0.4rem 0.5rem;
138+
}
139+
140+
.step-num {
141+
width: 20px;
142+
height: 20px;
143+
font-size: 0.65rem;
144+
}
145+
146+
.step-label {
147+
font-size: 0.6rem;
148+
}
149+
150+
.step-connector {
151+
width: 12px;
152+
}
153+
}
154+
155+
/* Very small screens: even more compact */
156+
@media (max-width: 380px) {
157+
.step-btn {
158+
min-width: 60px;
159+
padding: 0.35rem 0.4rem;
160+
}
161+
162+
.step-label {
163+
font-size: 0.55rem;
164+
}
165+
166+
.step-connector {
167+
width: 8px;
168+
}
115169
}
116170
</style>

src/lib/components/StepNavigation.svelte

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
display: flex;
3535
justify-content: center;
3636
gap: 1rem;
37-
margin-top: 1.5rem;
37+
margin-top: var(--spacing-lg);
38+
flex-wrap: wrap;
3839
}
3940
4041
.btn-next, .btn-prev {
@@ -81,4 +82,23 @@
8182
.btn-prev:hover {
8283
border-color: var(--accent-blue);
8384
}
85+
86+
@media (max-width: 600px) {
87+
.step-navigation {
88+
gap: 0.75rem;
89+
margin-top: var(--spacing-md);
90+
}
91+
92+
.btn-next, .btn-prev {
93+
padding: 0.6rem 1rem;
94+
font-size: 0.8rem;
95+
}
96+
}
97+
98+
@media (max-width: 380px) {
99+
.btn-next, .btn-prev {
100+
padding: 0.5rem 0.75rem;
101+
font-size: 0.75rem;
102+
}
103+
}
84104
</style>

0 commit comments

Comments
 (0)