views: Improve display on mobile browsers

This patch moves the pages to HTML5, and adds some simple meta tags and CSS media
constraints so things render better on mobile browsers, while leaving the
desktop unaffected.

It's still not ideal, though.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This commit is contained in:
Alberto Bertogli 2015-11-18 00:05:13 +00:00
parent cacf2ee2cc
commit c648cfb593
7 changed files with 28 additions and 23 deletions

@ -69,8 +69,11 @@ table.commits td.date {
font-style: italic;
color: gray;
}
table.commits td.subject {
min-width: 32em;
@media (min-width: 600px) {
table.commits td.subject {
min-width: 32em;
}
}
table.commits td.author {
color: gray;
@ -146,8 +149,10 @@ div.paginate span.inactive {
}
/* Directory listing. */
table.ls td.name {
min-width: 20em;
@media (min-width: 600px) {
table.ls td.name {
min-width: 20em;
}
}
table.ls tr.blob td.size {
color: gray;

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
% if not dirname.raw:
@ -17,6 +16,7 @@
<link rel="stylesheet" type="text/css"
href="{{relroot}}../../../../../static/syntax.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name=viewport content="width=device-width, initial-scale=1">
</head>
<body class="tree">

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
% relroot = '../' * (len(branch.split('/')) - 1)
@ -8,6 +7,7 @@
<title>git &raquo; {{repo.name}} &raquo; {{branch}}</title>
<link rel="stylesheet" type="text/css" href="{{relroot}}../../../../static/git-arr.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name=viewport content="width=device-width, initial-scale=1">
</head>
<body class="branch">

@ -1,11 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<title>git &raquo; {{repo.name}} &raquo; commit {{c.id[:7]}}</title>
<link rel="stylesheet" type="text/css" href="../../../../static/git-arr.css"/>
<link rel="stylesheet" type="text/css" href="../../../../static/syntax.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name=viewport content="width=device-width, initial-scale=1">
</head>
<body class="commit">

@ -1,11 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<title>git</title>
<link rel="stylesheet" type="text/css" href="static/git-arr.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script src="static/git-arr.js"></script>
<meta name=viewport content="width=device-width, initial-scale=1">
<script async src="static/git-arr.js"></script>
</head>
<body class="index" onload="replace_timestamps()">

@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<title>git &raquo; {{repo.name}}</title>
<link rel="stylesheet" type="text/css" href="../../static/git-arr.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name=viewport content="width=device-width, initial-scale=1">
</head>
<body class="summary">

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
% if not dirname.raw:
@ -15,6 +14,7 @@
<link rel="stylesheet" type="text/css"
href="{{relroot}}../../../../../static/git-arr.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name=viewport content="width=device-width, initial-scale=1">
</head>
<body class="tree">