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

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

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

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

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

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

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