]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitweb: add viewport meta tag for mobile devices
authorRito Rhymes <rito@ritovision.com>
Mon, 16 Feb 2026 15:53:27 +0000 (15:53 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Feb 2026 19:49:12 +0000 (11:49 -0800)
Without a viewport meta tag, phone browsers render gitweb at desktop
width and scale the whole page down to fit the screen.

Add a viewport meta tag so the layout viewport tracks device width.
This is the baseline needed for mobile CSS fixes in follow-up commits.

Signed-off-by: Rito Rhymes <rito@ritovision.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl

index b5490dfecf2da75a8b875dd614c6a7a2553094f9..fde804593b6ff388774754a24fe1e12d678dc9a4 100755 (executable)
@@ -4214,6 +4214,7 @@ sub git_header_html {
 <head>
 <meta name="generator" content="gitweb/$version git/$git_version$mod_perl_version"/>
 <meta name="robots" content="index, nofollow"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
 <title>$title</title>
 EOF
        # the stylesheet, favicon etc urls won't work correctly with path_info