MercurialWebTheme

Changeset

9:dca0d6376e6b
2010-07-10 Paul Boddie raw files shortlog changelog graph Improved changeset navigation. Left the shortlog pager sit in its natural left-justified position. Introduced formatting for log comments and fixed comment presentation in the changeset view. Added spacing between the footer and content above it.
themes/mercurialweb/changeset.tmpl (file) themes/mercurialweb/shortlogentry.tmpl (file) themes/mercurialweb/static/style-mercurialweb.css (file)
     1.1 --- a/themes/mercurialweb/changeset.tmpl	Sat Jul 10 02:44:30 2010 +0200
     1.2 +++ b/themes/mercurialweb/changeset.tmpl	Sat Jul 10 20:45:47 2010 +0200
     1.3 @@ -29,11 +29,9 @@
     1.4  
     1.5  <h3>Changeset</h3>
     1.6  
     1.7 -<p>
     1.8 -<span class="changesetparentlink">{parent%changesetlink}</span>
     1.9 -<span class="changeset">{rev}:{node|short}</span>
    1.10 -<span class="changesetchildlink">{child%changesetlink}</span>
    1.11 -</p>
    1.12 +<div class="changesetlinks"><div class="changesetchildlinks"></div>{child%changesetlink}</div>
    1.13 +<div class="changeset">{rev}:{node|short}</div>
    1.14 +<div class="changesetlinks"><div class="changesetparentlinks"></div>{parent%changesetlink}</div>
    1.15  
    1.16  <table>
    1.17    <tbody>
    1.18 @@ -41,7 +39,7 @@
    1.19        <td>{date|age}</td>
    1.20        <td>{author|person}</td>
    1.21        <td class="navigation"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></td>
    1.22 -      <td width="50%">{desc|strip|escape|addbreaks}</td>
    1.23 +      <td width="50%">{desc|strip|escape}</td>
    1.24        <td>{branches%branchtag}{inbranch%inbranchtag}{tags%tagtag}</td>
    1.25      </tr>
    1.26      <tr>
     2.1 --- a/themes/mercurialweb/shortlogentry.tmpl	Sat Jul 10 02:44:30 2010 +0200
     2.2 +++ b/themes/mercurialweb/shortlogentry.tmpl	Sat Jul 10 20:45:47 2010 +0200
     2.3 @@ -2,6 +2,6 @@
     2.4    <td>{date|age}</td>
     2.5    <td>{author|person}</td>
     2.6    <td class="navigation"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></td>
     2.7 -  <td width="50%"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape}</a></td>
     2.8 +  <td width="50%" class="commentline"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape}</a></td>
     2.9    <td>{branches%branchtag}{inbranch%inbranchtag}{tags%tagtag}</td>
    2.10  </tr>
     3.1 --- a/themes/mercurialweb/static/style-mercurialweb.css	Sat Jul 10 02:44:30 2010 +0200
     3.2 +++ b/themes/mercurialweb/static/style-mercurialweb.css	Sat Jul 10 20:45:47 2010 +0200
     3.3 @@ -155,10 +155,6 @@
     3.4      background: #ccc;
     3.5  }
     3.6  
     3.7 -.pager {
     3.8 -    float: right;
     3.9 -}
    3.10 -
    3.11  #navibar a, #navibar li.current span {
    3.12  
    3.13      /* Need a block to redefine the height. */
    3.14 @@ -265,6 +261,12 @@
    3.15      border-bottom: 1px solid #ccc;
    3.16  }
    3.17  
    3.18 +/* Footer elements. */
    3.19 +
    3.20 +#footer {
    3.21 +    margin-top: 1em;
    3.22 +}
    3.23 +
    3.24  #credits {
    3.25      float: right;
    3.26  
    3.27 @@ -289,18 +291,48 @@
    3.28      text-decoration: none;
    3.29  }
    3.30  
    3.31 +/* Shortlog presentation. */
    3.32 +
    3.33 +.commentline {
    3.34 +    white-space: nowrap;
    3.35 +    overflow: hidden;
    3.36 +}
    3.37 +
    3.38  /* Changeset presentation. */
    3.39  
    3.40 -.changesetparentlink:before {
    3.41 -    content: '← '; /* left arrow (UTF-8) */
    3.42 +.changesetlinks {
    3.43 +    position: relative;
    3.44 +    padding-left: 1em;
    3.45 +    min-height: 1.2em;
    3.46 +    line-height: 1.2em;
    3.47 +}
    3.48 +
    3.49 +.changesetlinks a {
    3.50 +    display: block;
    3.51 +}
    3.52 +
    3.53 +/* Position changeset labels at a fixed distance from the left margin. */
    3.54 +
    3.55 +.changesetparentlinks,
    3.56 +.changesetchildlinks {
    3.57 +    position: absolute;
    3.58 +    top: 0;
    3.59 +    left: 0;
    3.60 +}
    3.61 +
    3.62 +.changesetparentlinks:before {
    3.63 +    content: '↓'; /* down arrow (UTF-8) */
    3.64 +    /* content: '← '; left arrow (UTF-8) */
    3.65 +}
    3.66 +
    3.67 +.changesetchildlinks:after {
    3.68 +    content: '↑'; /* up arrow (UTF-8) */
    3.69 +    /* content: '→'; right arrow (UTF-8) */
    3.70  }
    3.71  
    3.72  .changeset {
    3.73      font-weight: bold;
    3.74 -}
    3.75 -
    3.76 -.changesetchildlink:after {
    3.77 -    content: '→'; /* right arrow (UTF-8) */
    3.78 +    margin-left: 1em;
    3.79  }
    3.80  
    3.81  /* Source views. */