[OCaml] Mobile-friendly clone of cgit.
fix remove zoom-blocking touch-action and viewport restrictions
Remove touch-action: pan-y from body and maximum-scale=1, user-scalable=no from viewport meta tags in layout.ml and error.ml. These prevented pinch-to-zoom, violating WCAG 1.4.4 (Resize Text).
Changed files
lib/static/styles.css
@@ -13,7 +13,6 @@
13
13
padding: 0;
14
14
background-color: #181818;
15
15
color: white;
16
Removed:
touch-action: pan-y;
17
16
}
18
17
19
18
/* --- Harmonized anchor defaults (cgit-inspired) ---
lib/views/error.ml
@@ -34,10 +34,7 @@
34
34
HTML.title [] "%s" page_title;
35
35
meta
36
36
[
37
Removed:
name "viewport";
38
Removed:
content
39
Removed:
"width=device-width, initial-scale=1, maximum-scale=1, \
40
Removed:
user-scalable=no";
37
Added:
name "viewport"; content "width=device-width, initial-scale=1";
41
38
];
42
39
link [ rel "stylesheet"; href "/static/styles.css" ];
43
40
];
lib/views/layout.ml
@@ -162,13 +162,7 @@
162
162
head []
163
163
[
164
164
title [] "%s" page_title;
165
Removed:
meta
166
Removed:
[
167
Removed:
name "viewport";
168
Removed:
content
169
Removed:
"width=device-width, initial-scale=1, maximum-scale=1, \
170
Removed:
user-scalable=no";
171
Removed:
];
165
Added:
meta [ name "viewport"; content "width=device-width, initial-scale=1" ];
172
166
link [ rel "stylesheet"; href "/static/styles.css" ];
173
167
link
174
168
[