# HG changeset patch # User Gregory Szorc # Date 2017-03-25 02:52:43 # Node ID c208bc65318a69deba8f7e1b6be5bfddd899cf14 # Parent c60091fa1426892552dd6c0dd4b9c49e3c3da045 gitweb: use monospace font for commit messages Commit messages often contain vertically aligned text. The default paper style already uses monospace fonts for rendering commit messages. And, AFAICT, a number of Git servers also render commit messages with monospace. It seems like the reasonable thing to do. This commit converts all instances of the full commit message in the gitweb style to render with monospace. diff --git a/mercurial/templates/gitweb/changelogentry.tmpl b/mercurial/templates/gitweb/changelogentry.tmpl --- a/mercurial/templates/gitweb/changelogentry.tmpl +++ b/mercurial/templates/gitweb/changelogentry.tmpl @@ -7,7 +7,7 @@ {author|obfuscate} [{date|rfc822date}] rev {rev}
-
+
{desc|strip|escape|websub|addbreaks|nonempty}

diff --git a/mercurial/templates/gitweb/changeset.tmpl b/mercurial/templates/gitweb/changeset.tmpl --- a/mercurial/templates/gitweb/changeset.tmpl +++ b/mercurial/templates/gitweb/changeset.tmpl @@ -43,7 +43,7 @@ changeset | {child%changesetchild}
-
+
{desc|strip|escape|websub|addbreaks|nonempty}
diff --git a/mercurial/templates/gitweb/fileannotate.tmpl b/mercurial/templates/gitweb/fileannotate.tmpl --- a/mercurial/templates/gitweb/fileannotate.tmpl +++ b/mercurial/templates/gitweb/fileannotate.tmpl @@ -59,7 +59,7 @@ annotate |
-
+
{desc|strip|escape|websub|addbreaks|nonempty}
diff --git a/mercurial/templates/gitweb/filerevision.tmpl b/mercurial/templates/gitweb/filerevision.tmpl --- a/mercurial/templates/gitweb/filerevision.tmpl +++ b/mercurial/templates/gitweb/filerevision.tmpl @@ -59,7 +59,7 @@ file |
-
+
{desc|strip|escape|websub|addbreaks|nonempty}
diff --git a/mercurial/templates/static/style-gitweb.css b/mercurial/templates/static/style-gitweb.css --- a/mercurial/templates/static/style-gitweb.css +++ b/mercurial/templates/static/style-gitweb.css @@ -145,6 +145,10 @@ pre.sourcelines.stripes > span:target { background-color: #bfdfff; } +.description { + font-family: monospace; +} + /* Graph */ div#wrapper { position: relative; diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t --- a/tests/test-hgweb.t +++ b/tests/test-hgweb.t @@ -337,7 +337,7 @@ static file $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server 200 Script output follows - content-length: 6986 + content-length: 7032 content-type: text/css body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; } @@ -487,6 +487,10 @@ static file background-color: #bfdfff; } + .description { + font-family: monospace; + } + /* Graph */ div#wrapper { position: relative;