git: 0ef2d9bbd8 - main - ports.cgi: hide FreeBSD header on mobiles in landscape mode

From: Wolfram Schneider <wosch_at_FreeBSD.org>
Date: Tue, 22 Sep 2026 09:08:29 UTC
The branch main has been updated by wosch:

URL: https://cgit.FreeBSD.org/doc/commit/?id=0ef2d9bbd868ddbaa3158f8e3f05acc1ceddb778

commit 0ef2d9bbd868ddbaa3158f8e3f05acc1ceddb778
Author:     Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2026-09-22 09:08:14 +0000
Commit:     Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2026-09-22 09:08:14 +0000

    ports.cgi: hide FreeBSD header on mobiles in landscape mode
    
    otherwise the input field may be not visible on some devices
---
 website/content/en/cgi/ports.cgi | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index 9c2387d9a8..e6819f8f44 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -36,7 +36,7 @@ use warnings;
 our $hsty_base;
 require "./cgi-style-responsive.pl";
 
-our $t_style = qq`
+our $t_style = <<'EOF';
 <style type="text/css">
 form#ports > input[name='query'] { text-align: center; }
 form#ports > input[name='query'] { width: 14em; }
@@ -64,7 +64,14 @@ hr { margin-top: 0px; }
 
 .dependencies { margin-top: 0.5em; }
 
-\@media screen and (max-width: 1300px) {
+@media screen and (orientation: portrait) and (max-width: 950px) {
+}
+
+@media screen and (orientation: landscape) and (max-width: 950px) {
+  header { display: none; }
+}
+
+@media screen and (max-width: 1300px) {
     footer { margin-top: -2em; }
     .logo-menu-bars-container {
         padding: 0px;
@@ -91,7 +98,7 @@ function input_autofocus_at_end () {
 }
 document.addEventListener('DOMContentLoaded', input_autofocus_at_end);
 </script>
-`;
+EOF
 
 my $no_javascript_warning = <<'EOF';
 <span id="noscript">