Create mobile-friendly directory listings

A typical mobile browser on a smartphone assumes a page without a "viewport"
<meta> tag is designed for desktop browsers. It displays the page in a
virtual window that simulates a wider screen and does not adjust it for
the phone's pixel density. The usual result is that the content on the page
looks small, and interacting with the page comfortably and precisely requires
zoom. This is currently the case with bozohttpd directory listing pages.

from D. Bohdan in PR bin/57962
pull/36/head
maya 2024-04-26 20:27:12 +00:00
parent f421508b22
commit 07b58cb10b
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dir-index-bozo.c,v 1.36 2022/05/18 00:37:11 mrg Exp $ */
/* $NetBSD: dir-index-bozo.c,v 1.37 2024/04/26 20:27:12 maya Exp $ */
/* $eterna: dir-index-bozo.c,v 1.20 2011/11/18 09:21:15 mrg Exp $ */
@ -123,6 +123,7 @@ bozo_dir_index(bozo_httpreq_t *request, const char *dirpath, int isindex)
bozo_printf(httpd,
"<!DOCTYPE html>\r\n"
"<html><head><meta charset=\"utf-8\"/>\r\n"
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n"
"<style type=\"text/css\">\r\n"
"table {\r\n"
"\tborder-top: 1px solid black;\r\n"