When a <pre> section (commit message, blob, diff) has a very long line,
today it makes the entire page very wide, causing usability issues.
This patch makes <pre> have a horizontal scroll in those cases, which is
easier to use.
The commit message has a very large left and right padding, but doesn't
improve readability and might make the commit message more difficult to
read on smaller screens.
This patch shortens the padding.
The default CSS is not very comfortable for markdown, as for example the
links are hidden.
This patch makes the markdown CSS tunable by wrapping it into a div, and
then adjusting the default styles to increase readability.
As an experiment, make the sections of the summary to be toggable. This
can help readability, although it's unclear if it's worth the additional
complexity and could be removed later.
We display the location of the repository, but the entire row is not
convenient for copy-pasting.
This patch changes the wording to "git clone" so the entire row can be
copied and pasted into a terminal.
There's a trick, because if we just changed the wording to:
<td>git clone</td> <td>https://example.com/repo</td>
that would get copied as:
git clone\thttps://example.com/repo
which does not work well when pasted into a terminal (as the \t gets
"eaten" in most cases).
So this patch changes the HTML to have a space after "clone":
<td>git clone </td> <td>https://example.com/repo</td>
and the CSS to preserve the space, so the following gets copied:
git clone \thttps://example.com/repo
which works when pasting on a terminal.
There's a significant amount of overrides to make the font sizes
smaller, but that can hurt readability in some cases. We should try to
use the "natural" sizes as much as possible.
This patch does that, removing a lot of the font sizes and bringing them
to be based on the normal sizes.
It also changes listings to use monospace, for readability.
When using pygments, make the line numbers grey.
This was the intention all along, but the <a> style overrides the <div>
style and the grey colour does not take effect.
This patch fixes the problem by setting the style specifically to <a>
within the line numbers div.
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>
Although hexdump(1)-style rendering of binary blob content may reveal
some meaningful information about the data, it wastes even more storage
space than embedding the raw data itself. However, many binary files
have a "magic number" or other signature near the beginning of the file,
so it is often possible to glean useful information from just the
initial chunk of the file without having the entire content available.
Thus, limiting the rendered data to just an initial chunk saves storage
space while still potentially presenting useful information about the
binary content.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Raw binary blob content tends to look like "line noise" and is rarely,
if ever, meaningful. A hexdump(1)-style rendering (specifically,
"hexdump -C"), on the other hand, showing runs of hexadecimal byte
values along with an ASCII representation of those bytes can sometimes
reveal useful information about the data.
(A subsequent patch will add the ability to cap the amount of data
rendered in order to reduce storage space requirements.)
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This patch adds the age of the repository to the index view, using javascript
to give a nice human string for the age.
When javascript is not available, the element remains hidden.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>