MercurialWebTheme

Changeset

8:73bdffb4a922
2010-07-10 Paul Boddie raw files shortlog changelog graph Added changeset and "not found" page support. Tidied up the branch indicators. Made the search pop-up hint appear at a different z-index. Insisted that the stylesheet is UTF-8 encoded. Added the repository name as a heading on each page. Adjusted the column width in various entry tables. Added a branch status indicator to branch entries. Updated the copyright information.
COPYING.txt (file) themes/mercurialweb/branchentry.tmpl (file) themes/mercurialweb/branches.tmpl (file) themes/mercurialweb/changeset.tmpl (file) themes/mercurialweb/header.tmpl (file) themes/mercurialweb/map (file) themes/mercurialweb/notfound.tmpl (file) themes/mercurialweb/search.tmpl (file) themes/mercurialweb/shortlog.tmpl (file) themes/mercurialweb/shortlogentry.tmpl (file) themes/mercurialweb/static/style-mercurialweb.css (file) themes/mercurialweb/summary.tmpl (file)
     1.1 --- a/COPYING.txt	Fri Jun 11 22:16:37 2010 +0200
     1.2 +++ b/COPYING.txt	Sat Jul 10 02:44:30 2010 +0200
     1.3 @@ -4,6 +4,7 @@
     1.4  Theme templates:
     1.5  
     1.6  Copyright (C) 2010 Paul Boddie <paul@boddie.org.uk>
     1.7 +Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others
     1.8  
     1.9  Stylesheets:
    1.10  
     2.1 --- a/themes/mercurialweb/branchentry.tmpl	Fri Jun 11 22:16:37 2010 +0200
     2.2 +++ b/themes/mercurialweb/branchentry.tmpl	Sat Jul 10 02:44:30 2010 +0200
     2.3 @@ -1,5 +1,6 @@
     2.4  <tr class="parity{parity}">
     2.5    <td>{date|age}</td>
     2.6 -  <td><span class="branch-{status}"><a href="{url}file/{node|short}{sessionvars%urlparameter}">{branch|escape}</a></span></td>
     2.7 +  <td class="navigation"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></td>
     2.8 +  <td width="55%"><span class="branch-{status}"><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{branch|escape}</a></span></td>
     2.9    <td>{node|short}</td>
    2.10  </tr>
     3.1 --- a/themes/mercurialweb/branches.tmpl	Fri Jun 11 22:16:37 2010 +0200
     3.2 +++ b/themes/mercurialweb/branches.tmpl	Sat Jul 10 02:44:30 2010 +0200
     3.3 @@ -25,7 +25,9 @@
     3.4    <div id="pageline"></div>
     3.5  </div>
     3.6  
     3.7 -<h2>Branches</h2>
     3.8 +<h2>{repo|escape}</h2>
     3.9 +
    3.10 +<h3>Branches</h3>
    3.11  
    3.12  <table>
    3.13    <tbody>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/themes/mercurialweb/changeset.tmpl	Sat Jul 10 02:44:30 2010 +0200
     4.3 @@ -0,0 +1,58 @@
     4.4 +{header}
     4.5 +<title>{repo|escape} (changeset {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}branches{sessionvars%urlparameter}">Branches</a></li
    4.19 +    ><li><a href="{url}files{sessionvars%urlparameter}">Files</a></li
    4.20 +    ><li><form id="searchform" action="{url}log"><span class="container">
    4.21 +        <span class="hint">Search</span>&nbsp;<input name="rev" id="searchinput" type="text" size="20" />
    4.22 +      </span>
    4.23 +      {sessionvars%hiddenformentry}
    4.24 +      </form>
    4.25 +    </li>
    4.26 +    </ul>
    4.27 +  </div>
    4.28 +  <div id="pageline"></div>
    4.29 +</div>
    4.30 +
    4.31 +<h2>{repo|escape}</h2>
    4.32 +
    4.33 +<h3>Changeset</h3>
    4.34 +
    4.35 +<p>
    4.36 +<span class="changesetparentlink">{parent%changesetlink}</span>
    4.37 +<span class="changeset">{rev}:{node|short}</span>
    4.38 +<span class="changesetchildlink">{child%changesetlink}</span>
    4.39 +</p>
    4.40 +
    4.41 +<table>
    4.42 +  <tbody>
    4.43 +    <tr>
    4.44 +      <td>{date|age}</td>
    4.45 +      <td>{author|person}</td>
    4.46 +      <td class="navigation"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></td>
    4.47 +      <td width="50%">{desc|strip|escape|addbreaks}</td>
    4.48 +      <td>{branches%branchtag}{inbranch%inbranchtag}{tags%tagtag}</td>
    4.49 +    </tr>
    4.50 +    <tr>
    4.51 +      <td colspan="5" class="diff">
    4.52 +        {diff}
    4.53 +      </td>
    4.54 +    </tr>
    4.55 +    <tr>
    4.56 +      <td colspan="5" class="files">{files}</td>
    4.57 +    </tr>
    4.58 +  </tbody>
    4.59 +</table>
    4.60 +
    4.61 +{footer}
     5.1 --- a/themes/mercurialweb/header.tmpl	Fri Jun 11 22:16:37 2010 +0200
     5.2 +++ b/themes/mercurialweb/header.tmpl	Sat Jul 10 02:44:30 2010 +0200
     5.3 @@ -3,4 +3,4 @@
     5.4  <head>
     5.5  <link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
     5.6  <meta name="robots" content="index, nofollow" />
     5.7 -<link rel="stylesheet" href="{staticurl}style-mercurialweb.css" type="text/css" />
     5.8 +<link rel="stylesheet" href="{staticurl}style-mercurialweb.css" type="text/css" charset="utf-8" />
     6.1 --- a/themes/mercurialweb/map	Fri Jun 11 22:16:37 2010 +0200
     6.2 +++ b/themes/mercurialweb/map	Sat Jul 10 02:44:30 2010 +0200
     6.3 @@ -2,9 +2,11 @@
     6.4  mimetype = 'text/html; charset={encoding}'
     6.5  
     6.6  branches = branches.tmpl
     6.7 +changeset = changeset.tmpl
     6.8  header = header.tmpl
     6.9  footer = footer.tmpl
    6.10  index = index.tmpl
    6.11 +notfound = notfound.tmpl
    6.12  search = search.tmpl
    6.13  shortlog = shortlog.tmpl
    6.14  summary = summary.tmpl
    6.15 @@ -15,9 +17,18 @@
    6.16  shortlogentry = shortlogentry.tmpl
    6.17  
    6.18  archiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a> '
    6.19 -branchtag = '<span class="branch">{name}</span> '
    6.20 -inbranchtag = '<span class="inbranch">{name}</span> '
    6.21 +branchtag = '<span class="branch"><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{name}</a></span> '
    6.22 +changesetlink = '<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{rev}:{node|short}</a> '
    6.23 +filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
    6.24 +inbranchtag = '<span class="inbranch"><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{name}</a></span> '
    6.25 +shortloglink = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
    6.26  tagtag = '<span class="tag">{name}</span> '
    6.27  
    6.28 +diffblock = '<div class="source parity{parity}"><pre>{lines}</pre></div>'
    6.29 +difflineplus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="plusline">{line|escape}</span>'
    6.30 +difflineminus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="minusline">{line|escape}</span>'
    6.31 +difflineat = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="atline">{line|escape}</span>'
    6.32 +diffline = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
    6.33 +
    6.34  hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
    6.35  urlparameter = '{separator}{name}={value|urlescape}'
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/themes/mercurialweb/notfound.tmpl	Sat Jul 10 02:44:30 2010 +0200
     7.3 @@ -0,0 +1,23 @@
     7.4 +{header}
     7.5 +<title>Repository not found</title>
     7.6 +</head>
     7.7 +
     7.8 +<body>
     7.9 +
    7.10 +<div id="header">
    7.11 +  <div id="logo"><a href="{url}{sessionvars%urlparameter}"><img src="{staticurl}mercurial-logo.png" alt="Mercurial logo" /></a></div>
    7.12 +  <div id="pageline"></div>
    7.13 +</div>
    7.14 +
    7.15 +<div id="page">
    7.16 +
    7.17 +<h2>Repository not found</h2>
    7.18 +
    7.19 +<p>The repository <code>{repo|escape}</code> is not recognised by this server.</p>
    7.20 +
    7.21 +<p>Please consult the <a href="{url}{sessionvars%urlparameter}">repository list</a> for details of
    7.22 +repositories available via this server.</p>
    7.23 +
    7.24 +</div>
    7.25 +
    7.26 +{footer}
     8.1 --- a/themes/mercurialweb/search.tmpl	Fri Jun 11 22:16:37 2010 +0200
     8.2 +++ b/themes/mercurialweb/search.tmpl	Sat Jul 10 02:44:30 2010 +0200
     8.3 @@ -25,7 +25,9 @@
     8.4    <div id="pageline"></div>
     8.5  </div>
     8.6  
     8.7 -<h2>Results</h2>
     8.8 +<h2>{repo|escape}</h2>
     8.9 +
    8.10 +<h3>Results</h3>
    8.11  
    8.12  <table>
    8.13    <tbody>
     9.1 --- a/themes/mercurialweb/shortlog.tmpl	Fri Jun 11 22:16:37 2010 +0200
     9.2 +++ b/themes/mercurialweb/shortlog.tmpl	Sat Jul 10 02:44:30 2010 +0200
     9.3 @@ -25,7 +25,11 @@
     9.4    <div id="pageline"></div>
     9.5  </div>
     9.6  
     9.7 -<h2>Shortlog</h2>
     9.8 +<h2>{repo|escape}</h2>
     9.9 +
    9.10 +<h3>Shortlog</h3>
    9.11 +
    9.12 +<div class="pager">{changenav%shortloglink}</div>
    9.13  
    9.14  <table>
    9.15    <tbody>
    9.16 @@ -33,4 +37,6 @@
    9.17    </tbody>
    9.18  </table>
    9.19  
    9.20 +<div class="pager">{changenav%shortloglink}</div>
    9.21 +
    9.22  {footer}
    10.1 --- a/themes/mercurialweb/shortlogentry.tmpl	Fri Jun 11 22:16:37 2010 +0200
    10.2 +++ b/themes/mercurialweb/shortlogentry.tmpl	Sat Jul 10 02:44:30 2010 +0200
    10.3 @@ -2,6 +2,6 @@
    10.4    <td>{date|age}</td>
    10.5    <td>{author|person}</td>
    10.6    <td class="navigation"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></td>
    10.7 -  <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape}</a></td>
    10.8 -  <td>{inbranch%inbranchtag}{tags%tagtag}</td>
    10.9 +  <td width="50%"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape}</a></td>
   10.10 +  <td>{branches%branchtag}{inbranch%inbranchtag}{tags%tagtag}</td>
   10.11  </tr>
    11.1 --- a/themes/mercurialweb/static/style-mercurialweb.css	Fri Jun 11 22:16:37 2010 +0200
    11.2 +++ b/themes/mercurialweb/static/style-mercurialweb.css	Sat Jul 10 02:44:30 2010 +0200
    11.3 @@ -53,6 +53,7 @@
    11.4  
    11.5  th, td {
    11.6      padding: 0.4em 0.25em;
    11.7 +    vertical-align: top;
    11.8  }
    11.9  
   11.10  td p {
   11.11 @@ -72,31 +73,40 @@
   11.12  
   11.13  /* Repository information. */
   11.14  
   11.15 +span.tag,
   11.16 +span.branch,
   11.17 +span.inbranch {
   11.18 +    padding: 0.25em 0.5em;
   11.19 +    white-space: nowrap;
   11.20 +}
   11.21 +
   11.22  span.tag {
   11.23      background: #f1b500;
   11.24 -    padding: 0.25em 0.5em;
   11.25  }
   11.26  
   11.27 -span.branch {
   11.28 +span.branch,
   11.29 +span.branch-open {
   11.30      background: #b5f1b5;
   11.31 -    padding: 0.25em 0.5em;
   11.32  }
   11.33  
   11.34 -span.inbranch {
   11.35 +span.inbranch,
   11.36 +span.branch-inactive {
   11.37      background: #b5b5b5;
   11.38 +}
   11.39 +
   11.40 +span.branch-open,
   11.41 +span.branch-closed,
   11.42 +span.branch-inactive {
   11.43      padding: 0.25em 0.5em;
   11.44  }
   11.45  
   11.46  span.branch-closed {
   11.47 -    background: #b5b5f1;
   11.48 -    padding: 0.25em 0.5em;
   11.49 +    background-color: #f1b5b5;
   11.50  }
   11.51  
   11.52 -span.branch-inactive {
   11.53 -    background: #f1b5b5;
   11.54 -    padding: 0.25em 0.5em;
   11.55 -}
   11.56 -
   11.57 +span.inbranch a,
   11.58 +span.branch a,
   11.59 +span.branch-open a,
   11.60  span.branch-closed a,
   11.61  span.branch-inactive a {
   11.62      color: #000;
   11.63 @@ -145,6 +155,10 @@
   11.64      background: #ccc;
   11.65  }
   11.66  
   11.67 +.pager {
   11.68 +    float: right;
   11.69 +}
   11.70 +
   11.71  #navibar a, #navibar li.current span {
   11.72  
   11.73      /* Need a block to redefine the height. */
   11.74 @@ -224,6 +238,7 @@
   11.75      position: absolute;
   11.76      top: 42px;
   11.77      left: 16px;
   11.78 +    z-index: 3;
   11.79  
   11.80      padding: 0 16px;
   11.81  
   11.82 @@ -273,3 +288,35 @@
   11.83  #credits a {
   11.84      text-decoration: none;
   11.85  }
   11.86 +
   11.87 +/* Changeset presentation. */
   11.88 +
   11.89 +.changesetparentlink:before {
   11.90 +    content: '← '; /* left arrow (UTF-8) */
   11.91 +}
   11.92 +
   11.93 +.changeset {
   11.94 +    font-weight: bold;
   11.95 +}
   11.96 +
   11.97 +.changesetchildlink:after {
   11.98 +    content: '→'; /* right arrow (UTF-8) */
   11.99 +}
  11.100 +
  11.101 +/* Source views. */
  11.102 +
  11.103 +.source {
  11.104 +    background-color: #eee;
  11.105 +}
  11.106 +
  11.107 +.plusline {
  11.108 +    color: #090;
  11.109 +}
  11.110 +
  11.111 +.minusline {
  11.112 +    color: #900;
  11.113 +}
  11.114 +
  11.115 +.atline {
  11.116 +    color: #990;
  11.117 +}
    12.1 --- a/themes/mercurialweb/summary.tmpl	Fri Jun 11 22:16:37 2010 +0200
    12.2 +++ b/themes/mercurialweb/summary.tmpl	Sat Jul 10 02:44:30 2010 +0200
    12.3 @@ -25,13 +25,15 @@
    12.4    <div id="pageline"></div>
    12.5  </div>
    12.6  
    12.7 -<h2>Summary</h2>
    12.8 +<h2>{repo|escape}</h2>
    12.9 +
   12.10 +<h3>Summary</h3>
   12.11  
   12.12  <p>...</p>
   12.13  
   12.14  <hr />
   12.15  
   12.16 -<h2>Shortlog</h2>
   12.17 +<h3>Shortlog</h3>
   12.18  
   12.19  <table>
   12.20    <tbody>