gitweb: use monospace font for commit messages
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 24 Mar 2017 19:52:43 -0700
changeset 31625 c208bc65318a
parent 31624 c60091fa1426
child 31626 0febf8e4e2ce
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.
mercurial/templates/gitweb/changelogentry.tmpl
mercurial/templates/gitweb/changeset.tmpl
mercurial/templates/gitweb/fileannotate.tmpl
mercurial/templates/gitweb/filerevision.tmpl
mercurial/templates/static/style-gitweb.css
tests/test-hgweb.t
--- a/mercurial/templates/gitweb/changelogentry.tmpl	Fri Mar 24 22:40:08 2017 -0400
+++ b/mercurial/templates/gitweb/changelogentry.tmpl	Fri Mar 24 19:52:43 2017 -0700
@@ -7,7 +7,7 @@
 </div>
 <i>{author|obfuscate} [{date|rfc822date}] rev {rev}</i><br/>
 </div>
-<div class="log_body">
+<div class="log_body description">
 {desc|strip|escape|websub|addbreaks|nonempty}
 <br/>
 <br/>
--- a/mercurial/templates/gitweb/changeset.tmpl	Fri Mar 24 22:40:08 2017 -0400
+++ b/mercurial/templates/gitweb/changeset.tmpl	Fri Mar 24 19:52:43 2017 -0700
@@ -43,7 +43,7 @@
 {child%changesetchild}
 </table></div>
 
-<div class="page_body">
+<div class="page_body description">
 {desc|strip|escape|websub|addbreaks|nonempty}
 </div>
 <div class="list_head"></div>
--- a/mercurial/templates/gitweb/fileannotate.tmpl	Fri Mar 24 22:40:08 2017 -0400
+++ b/mercurial/templates/gitweb/fileannotate.tmpl	Fri Mar 24 19:52:43 2017 -0700
@@ -59,7 +59,7 @@
 </table>
 </div>
 
-<div class="page_path">
+<div class="page_path description">
 {desc|strip|escape|websub|addbreaks|nonempty}
 </div>
 <div class="page_body">
--- a/mercurial/templates/gitweb/filerevision.tmpl	Fri Mar 24 22:40:08 2017 -0400
+++ b/mercurial/templates/gitweb/filerevision.tmpl	Fri Mar 24 19:52:43 2017 -0700
@@ -59,7 +59,7 @@
 </table>
 </div>
 
-<div class="page_path">
+<div class="page_path description">
 {desc|strip|escape|websub|addbreaks|nonempty}
 </div>
 
--- a/mercurial/templates/static/style-gitweb.css	Fri Mar 24 22:40:08 2017 -0400
+++ b/mercurial/templates/static/style-gitweb.css	Fri Mar 24 19:52:43 2017 -0700
@@ -145,6 +145,10 @@
 	background-color: #bfdfff;
 }
 
+.description {
+    font-family: monospace;
+}
+
 /* Graph */
 div#wrapper {
 	position: relative;
--- a/tests/test-hgweb.t	Fri Mar 24 22:40:08 2017 -0400
+++ b/tests/test-hgweb.t	Fri Mar 24 19:52:43 2017 -0700
@@ -337,7 +337,7 @@
 
   $ 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 @@
   	background-color: #bfdfff;
   }
   
+  .description {
+      font-family: monospace;
+  }
+  
   /* Graph */
   div#wrapper {
   	position: relative;