MercurialWebTheme

Changeset

19:a475f55fadab
2010-07-14 Paul Boddie raw files shortlog changelog graph Added changelog and annotation support. Introduced word-wrapping prevention for navigation sections. Removed all parity-based colouring for source views.
themes/mercurialweb/annotateline.tmpl (file) themes/mercurialweb/changelog.tmpl (file) themes/mercurialweb/changelogentry.tmpl (file) themes/mercurialweb/fileannotate.tmpl (file) themes/mercurialweb/filediff.tmpl (file) themes/mercurialweb/filerevision.tmpl (file) themes/mercurialweb/map (file) themes/mercurialweb/shortlog.tmpl (file) themes/mercurialweb/static/style-mercurialweb.css (file)
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/themes/mercurialweb/annotateline.tmpl	Wed Jul 14 01:30:13 2010 +0200
     1.3 @@ -0,0 +1,6 @@
     1.4 +<tr class="annotate">
     1.5 +  <td class="annotate"><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"
     1.6 +      title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a></td>
     1.7 +  <td class="line"><a href="#{lineid}" id="{lineid}">{linenumber}</a></td>
     1.8 +  <td class="source"><pre>{line|escape}</pre></td>
     1.9 +</tr>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/themes/mercurialweb/changelog.tmpl	Wed Jul 14 01:30:13 2010 +0200
     2.3 @@ -0,0 +1,41 @@
     2.4 +{header}
     2.5 +<title>{repo|escape} (changelog)</title>
     2.6 +</head>
     2.7 +
     2.8 +<body>
     2.9 +
    2.10 +<div id="header">
    2.11 +  <div id="logo"><a href="{url}..{sessionvars%urlparameter}"><img src="{staticurl}mercurial-logo.png" alt="Mercurial logo" /></a></div>
    2.12 +  <div class="controls">
    2.13 +    <ul id="navibar">
    2.14 +    <li><a href="{url}summary{sessionvars%urlparameter}">Summary</a></li
    2.15 +    ><li><a href="{url}shortlog{sessionvars%urlparameter}">Shortlog</a></li
    2.16 +    ><li class="current"><span>Changelog</span></li
    2.17 +    ><li><a href="{url}tags{sessionvars%urlparameter}">Tags</a></li
    2.18 +    ><li><a href="{url}file{sessionvars%urlparameter}">Files</a></li
    2.19 +    ><li><form id="searchform" action="{url}log"><span class="container">
    2.20 +        <span class="hint">Search</span>&nbsp;<input name="rev" id="searchinput" type="text" size="20" />
    2.21 +      </span>
    2.22 +      {sessionvars%hiddenformentry}
    2.23 +      </form>
    2.24 +    </li>
    2.25 +    </ul>
    2.26 +  </div>
    2.27 +  <div id="pageline"></div>
    2.28 +</div>
    2.29 +
    2.30 +<h2>{repo|escape}</h2>
    2.31 +
    2.32 +<h3>Changelog</h3>
    2.33 +
    2.34 +<div class="pager">{changenav%changelogpagerlink}</div>
    2.35 +
    2.36 +<table>
    2.37 +  <tbody>
    2.38 +{entries%changelogentry}
    2.39 +  </tbody>
    2.40 +</table>
    2.41 +
    2.42 +<div class="pager">{changenav%changelogpagerlink}</div>
    2.43 +
    2.44 +{footer}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/themes/mercurialweb/changelogentry.tmpl	Wed Jul 14 01:30:13 2010 +0200
     3.3 @@ -0,0 +1,23 @@
     3.4 +<tr id="{node|short}">
     3.5 +  <td colspan="5">
     3.6 +    <strong>{rev}:{node|short}</strong>
     3.7 +    <span class="changesetlinks"><div class="changesetchildlinks"></div>{child%changeloglink}</span>
     3.8 +    <span class="changesetlinks"><div class="changesetparentlinks"></div>{parent%changeloglink}</span>
     3.9 +  </td>
    3.10 +</tr>
    3.11 +<tr>
    3.12 +  <td>{date|age}</td>
    3.13 +  <td>{author|person}</td>
    3.14 +  <td class="navigation">
    3.15 +    <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
    3.16 +    <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
    3.17 +    <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}#{node|short}">shortlog</a>
    3.18 +  </td>
    3.19 +  <td width="40%">{desc|strip|escape}</td>
    3.20 +  <td>{branches%branchtag}{inbranch%inbranchtag}{tags%tagtag}</td>
    3.21 +</tr>
    3.22 +<tr>
    3.23 +  <td colspan="5" class="changelogfiles">
    3.24 +    {files}
    3.25 +  </td>
    3.26 +</tr>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/themes/mercurialweb/fileannotate.tmpl	Wed Jul 14 01:30:13 2010 +0200
     4.3 @@ -0,0 +1,57 @@
     4.4 +{header}
     4.5 +<title>{repo|escape} (annotate {file|escape} in {node|short})</title>
     4.6 +</head>
     4.7 +
     4.8 +<body>
     4.9 +
    4.10 +<div id="header">
    4.11 +  <div id="logo"><a href="{url}..{sessionvars%urlparameter}"><img src="{staticurl}mercurial-logo.png" alt="Mercurial logo" /></a></div>
    4.12 +  <div class="controls">
    4.13 +    <ul id="navibar">
    4.14 +    <li><a href="{url}summary{sessionvars%urlparameter}">Summary</a></li
    4.15 +    ><li><a href="{url}shortlog{sessionvars%urlparameter}">Shortlog</a></li
    4.16 +    ><li><a href="{url}changelog{sessionvars%urlparameter}">Changelog</a></li
    4.17 +    ><li><a href="{url}tags{sessionvars%urlparameter}">Tags</a></li
    4.18 +    ><li><a href="{url}file{sessionvars%urlparameter}">Files</a></li
    4.19 +    ><li><form id="searchform" action="{url}log"><span class="container">
    4.20 +        <span class="hint">Search</span>&nbsp;<input name="rev" id="searchinput" type="text" size="20" />
    4.21 +      </span>
    4.22 +      {sessionvars%hiddenformentry}
    4.23 +      </form>
    4.24 +    </li>
    4.25 +    </ul>
    4.26 +  </div>
    4.27 +  <div id="pageline"></div>
    4.28 +</div>
    4.29 +
    4.30 +<h2>{repo|escape}</h2>
    4.31 +
    4.32 +<h3>Annotated {file|escape}</h3>
    4.33 +
    4.34 +<div class="changesetlinks"><div class="changesetchildlinks"></div>{child%changesetlink}</div>
    4.35 +<div class="changeset">{rev}:{node|short}</div>
    4.36 +<div class="changesetlinks"><div class="changesetparentlinks"></div>{parent%changesetlink}</div>
    4.37 +
    4.38 +<table>
    4.39 +  <tbody>
    4.40 +    <tr>
    4.41 +      <td>{date|age}</td>
    4.42 +      <td>{author|person}</td>
    4.43 +      <td class="navigation">
    4.44 +        <a href="{url}raw-rev/{node|short}{sessionvars%urlparameter}">raw</a>
    4.45 +        <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
    4.46 +        <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}#{node|short}">shortlog</a>
    4.47 +      </td>
    4.48 +      <td width="50%">{desc|strip|escape}</td>
    4.49 +      <td>{branch%branchlabel}</td>
    4.50 +    </tr>
    4.51 +  </tbody>
    4.52 +</table>
    4.53 +
    4.54 +<table>
    4.55 +  <tbody>
    4.56 +{annotate%annotateline}
    4.57 +  </tbody>
    4.58 +</table>
    4.59 +
    4.60 +{footer}
     5.1 --- a/themes/mercurialweb/filediff.tmpl	Tue Jul 13 23:04:17 2010 +0200
     5.2 +++ b/themes/mercurialweb/filediff.tmpl	Wed Jul 14 01:30:13 2010 +0200
     5.3 @@ -26,7 +26,7 @@
     5.4  
     5.5  <h2>{repo|escape}</h2>
     5.6  
     5.7 -<h3>Change</h3>
     5.8 +<h3>Change of {file|escape}</h3>
     5.9  
    5.10  <div class="changesetlinks"><div class="changesetchildlinks"></div>{child%changesetfiledifflink}</div>
    5.11  <div class="changeset">{rev}:{node|short}</div>
     6.1 --- a/themes/mercurialweb/filerevision.tmpl	Tue Jul 13 23:04:17 2010 +0200
     6.2 +++ b/themes/mercurialweb/filerevision.tmpl	Wed Jul 14 01:30:13 2010 +0200
     6.3 @@ -39,6 +39,7 @@
     6.4        <td>{author|person}</td>
     6.5        <td class="navigation">
     6.6          <a href="{url}raw-file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">raw</a>
     6.7 +        <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
     6.8          <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
     6.9          <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
    6.10        </td>
    6.11 @@ -48,6 +49,6 @@
    6.12    </tbody>
    6.13  </table>
    6.14  
    6.15 -<div class="file"><pre>{text%fileline}</pre></div>
    6.16 +<div class="file"><pre class="source">{text%fileline}</pre></div>
    6.17  
    6.18  {footer}
     7.1 --- a/themes/mercurialweb/map	Tue Jul 13 23:04:17 2010 +0200
     7.2 +++ b/themes/mercurialweb/map	Wed Jul 14 01:30:13 2010 +0200
     7.3 @@ -2,8 +2,10 @@
     7.4  mimetype = 'text/html; charset={encoding}'
     7.5  
     7.6  branches = branches.tmpl
     7.7 +changelog = changelog.tmpl
     7.8  changeset = changeset.tmpl
     7.9  error = error.tmpl
    7.10 +fileannotate = fileannotate.tmpl
    7.11  filediff = filediff.tmpl
    7.12  filerevision = filerevision.tmpl
    7.13  header = header.tmpl
    7.14 @@ -16,7 +18,9 @@
    7.15  summary = summary.tmpl
    7.16  tags = tags.tmpl
    7.17  
    7.18 +annotateline = annotateline.tmpl
    7.19  branchentry = branchentry.tmpl
    7.20 +changelogentry = changelogentry.tmpl
    7.21  direntry = direntry.tmpl
    7.22  fileentry = fileentry.tmpl
    7.23  indexentry = indexentry.tmpl
    7.24 @@ -27,15 +31,17 @@
    7.25  archiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a> '
    7.26  branchlabel = '<span class="branch">{name}</span> '
    7.27  branchtag = '<span class="branch"><a href="{url}rev/{node|short}{sessionvars%urlparameter}#{node|short}">{name}</a></span> '
    7.28 +changelogpagerlink = '<a href="{url}changelog/{node|short}{sessionvars%urlparameter}#{node|short}">{label|escape}</a> '
    7.29 +changeloglink = '<a href="{url}changelog/{node|short}{sessionvars%urlparameter}#{node|short}">{rev}:{node|short}</a> '
    7.30  changesetlink = '<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{rev}:{node|short}</a> '
    7.31  changesetfiledifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a> '
    7.32  filerevlink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a> '
    7.33  inbranchlabel = '<span class="inbranch">{name}</span> '
    7.34  inbranchtag = '<span class="inbranch"><a href="{url}rev/{node|short}{sessionvars%urlparameter}#{node|short}">{name}</a></span> '
    7.35 -shortloglink = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}#{node|short}">{label|escape}</a> '
    7.36 +shortlogpagerlink = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}#{node|short}">{label|escape}</a> '
    7.37  tagtag = '<span class="tag">{name}</span> '
    7.38  
    7.39 -diffblock = '<div class="source parity{parity}"><pre>{lines}</pre></div>'
    7.40 +diffblock = '<div class="source"><pre>{lines}</pre></div>'
    7.41  difflineplus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="plusline">{line|escape}</span>'
    7.42  difflineminus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="minusline">{line|escape}</span>'
    7.43  difflineat = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="atline">{line|escape}</span>'
    7.44 @@ -44,7 +50,7 @@
    7.45  filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
    7.46  fileellipses = '...'
    7.47  
    7.48 -fileline = '<div class="parity{parity} source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</div>'
    7.49 +fileline = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
    7.50  
    7.51  filenolink = '{file|escape} '
    7.52  filenodelink = '<span><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></span> '
     8.1 --- a/themes/mercurialweb/shortlog.tmpl	Tue Jul 13 23:04:17 2010 +0200
     8.2 +++ b/themes/mercurialweb/shortlog.tmpl	Wed Jul 14 01:30:13 2010 +0200
     8.3 @@ -28,7 +28,7 @@
     8.4  
     8.5  <h3>Shortlog</h3>
     8.6  
     8.7 -<div class="pager">{changenav%shortloglink}</div>
     8.8 +<div class="pager">{changenav%shortlogpagerlink}</div>
     8.9  
    8.10  <table>
    8.11    <tbody>
    8.12 @@ -36,6 +36,6 @@
    8.13    </tbody>
    8.14  </table>
    8.15  
    8.16 -<div class="pager">{changenav%shortloglink}</div>
    8.17 +<div class="pager">{changenav%shortlogpagerlink}</div>
    8.18  
    8.19  {footer}
     9.1 --- a/themes/mercurialweb/static/style-mercurialweb.css	Tue Jul 13 23:04:17 2010 +0200
     9.2 +++ b/themes/mercurialweb/static/style-mercurialweb.css	Wed Jul 14 01:30:13 2010 +0200
     9.3 @@ -167,6 +167,10 @@
     9.4      background: #999;
     9.5  }
     9.6  
     9.7 +.navigation {
     9.8 +    white-space: nowrap;
     9.9 +}
    9.10 +
    9.11  .navigation a {
    9.12      background: #ccc;
    9.13  }
    9.14 @@ -314,7 +318,11 @@
    9.15      overflow: hidden;
    9.16  }
    9.17  
    9.18 -/* Changeset presentation. */
    9.19 +/* Changeset and changelog presentation. */
    9.20 +
    9.21 +.changelogfiles {
    9.22 +    border-bottom: 1px solid #ccc;
    9.23 +}
    9.24  
    9.25  .changesetlinks {
    9.26      position: relative;
    9.27 @@ -323,6 +331,11 @@
    9.28      line-height: 1.2em;
    9.29  }
    9.30  
    9.31 +span.changesetlinks {
    9.32 +    display: inline-block;
    9.33 +    vertical-align: text-top;
    9.34 +}
    9.35 +
    9.36  .changesetlinks a {
    9.37      display: block;
    9.38  }
    9.39 @@ -381,6 +394,23 @@
    9.40      color: #990;
    9.41  }
    9.42  
    9.43 +/* Annotations. */
    9.44 +
    9.45 +tr.annotate td,
    9.46 +tr.annotate pre {
    9.47 +    margin: 0;
    9.48 +    padding: 0;
    9.49 +}
    9.50 +
    9.51 +tr.annotate td.line {
    9.52 +    font-family: monospace;
    9.53 +    background-color: #eee;
    9.54 +}
    9.55 +
    9.56 +td.annotate {
    9.57 +    font-size: 80%;
    9.58 +}
    9.59 +
    9.60  /* File views. */
    9.61  
    9.62  .permissions {