It could use some work, but it's still significantly better with this.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nano – <?= $title ?></title>
<?php if (isset($mainpage)): ?>
<meta name="description" content="GNU nano is a small editor for on the terminal. It supports syntax highlighting, spell checking, justifying, completion, undo/redo...">