From c648cfb593f345f0a1d07f43c34905643fc073e1 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Wed, 18 Nov 2015 00:05:13 +0000 Subject: 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 --- static/git-arr.css | 13 +++++++++---- views/blob.html | 6 +++--- views/branch.html | 6 +++--- views/commit.html | 6 +++--- views/index.html | 8 ++++---- views/summary.html | 6 +++--- views/tree.html | 6 +++--- 7 files changed, 28 insertions(+), 23 deletions(-) diff --git a/static/git-arr.css b/static/git-arr.css index 4e0c7ad..2a0f7c1 100644 --- a/static/git-arr.css +++ b/static/git-arr.css @@ -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; diff --git a/views/blob.html b/views/blob.html index 5e5b960..470808e 100644 --- a/views/blob.html +++ b/views/blob.html @@ -1,6 +1,5 @@ - - + + % if not dirname.raw: @@ -17,6 +16,7 @@ + diff --git a/views/branch.html b/views/branch.html index 0ca6834..799d040 100644 --- a/views/branch.html +++ b/views/branch.html @@ -1,6 +1,5 @@ - - + + % relroot = '../' * (len(branch.split('/')) - 1) @@ -8,6 +7,7 @@ git » {{repo.name}} » {{branch}} + diff --git a/views/commit.html b/views/commit.html index 1ddc4d8..e21ff04 100644 --- a/views/commit.html +++ b/views/commit.html @@ -1,11 +1,11 @@ - - + + git » {{repo.name}} » commit {{c.id[:7]}} + diff --git a/views/index.html b/views/index.html index 7967a7c..c2a5bb8 100644 --- a/views/index.html +++ b/views/index.html @@ -1,11 +1,11 @@ - - + + git - + + diff --git a/views/summary.html b/views/summary.html index c05cca7..5038ef5 100644 --- a/views/summary.html +++ b/views/summary.html @@ -1,10 +1,10 @@ - - + + git » {{repo.name}} + diff --git a/views/tree.html b/views/tree.html index c705b18..12c21b0 100644 --- a/views/tree.html +++ b/views/tree.html @@ -1,6 +1,5 @@ - - + + % if not dirname.raw: @@ -15,6 +14,7 @@ + -- cgit v1.2.3