changeset 21124:a65714215377

hgweb: align entries in "changelog" and "revisions" pages of "spartan" style Before this patch, each log entries in "changelog" and "revisions" pages of "spartan" style are not aligned by column, because: - each log entries are separated "<table>" entries, and - there are no fixed "width" information for each "<th>"/"<td>" entries This patch aligns entries in "changelog" and "revisions" pages of "spartan" style by: - adding 'label' class to '<th>' for 'age' information, and - setting 'width' of '<th class="label">' with fixed size 'class="age"' is not used for this purpose, because it is also used to set "bold" font-weight "16em" seems to be wide enough to show date information fully, when web browser disables (or doesn't support) javascript.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 17 Apr 2014 09:36:09 +0900
parents 92fab48dfec1
children e94e90a4526e
files mercurial/templates/spartan/changelogentry.tmpl mercurial/templates/spartan/filelogentry.tmpl mercurial/templates/static/style.css tests/test-hgweb-commands.t tests/test-hgweb-filelog.t
diffstat 5 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templates/spartan/changelogentry.tmpl	Thu Apr 17 09:36:09 2014 +0900
+++ b/mercurial/templates/spartan/changelogentry.tmpl	Thu Apr 17 09:36:09 2014 +0900
@@ -1,6 +1,6 @@
 <table class="logEntry parity{parity}">
  <tr>
-  <th><span class="age">{date|rfc822date}</span>:</th>
+  <th class="label"><span class="age">{date|rfc822date}</span>:</th>
   <th class="firstline">{desc|strip|firstline|escape|nonempty}</th>
  </tr>
  <tr>
--- a/mercurial/templates/spartan/filelogentry.tmpl	Thu Apr 17 09:36:09 2014 +0900
+++ b/mercurial/templates/spartan/filelogentry.tmpl	Thu Apr 17 09:36:09 2014 +0900
@@ -1,6 +1,6 @@
 <table class="logEntry parity{parity}">
  <tr>
-  <th><span class="age">{date|rfc822date}</span>:</th>
+  <th class="label"><span class="age">{date|rfc822date}</span>:</th>
   <th class="firstline"><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></th>
  </tr>
  <tr>
--- a/mercurial/templates/static/style.css	Thu Apr 17 09:36:09 2014 +0900
+++ b/mercurial/templates/static/style.css	Thu Apr 17 09:36:09 2014 +0900
@@ -41,6 +41,7 @@
 /* Changelog/Filelog entries */
 .logEntry { width: 100%; }
 .logEntry .age { width: 15%; }
+.logEntry th.label { width: 16em; }
 .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
 .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
 .logEntry th.firstline { text-align: left; width: inherit; }
--- a/tests/test-hgweb-commands.t	Thu Apr 17 09:36:09 2014 +0900
+++ b/tests/test-hgweb-commands.t	Thu Apr 17 09:36:09 2014 +0900
@@ -1666,6 +1666,7 @@
   /* Changelog/Filelog entries */
   .logEntry { width: 100%; }
   .logEntry .age { width: 15%; }
+  .logEntry th.label { width: 16em; }
   .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
   .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
   .logEntry th.firstline { text-align: left; width: inherit; }
--- a/tests/test-hgweb-filelog.t	Thu Apr 17 09:36:09 2014 +0900
+++ b/tests/test-hgweb-filelog.t	Thu Apr 17 09:36:09 2014 +0900
@@ -639,7 +639,7 @@
   
   <table class="logEntry parity0">
    <tr>
-    <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
+    <th class="label"><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
     <th class="firstline"><a href="/rev/b7682196df1c?style=spartan">change c</a></th>
    </tr>
    <tr>
@@ -664,7 +664,7 @@
   
   <table class="logEntry parity1">
    <tr>
-    <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
+    <th class="label"><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
     <th class="firstline"><a href="/rev/1a6696706df2?style=spartan">mv b</a></th>
    </tr>
    <tr>