MercurialWebTheme

Changeset

4:e6482a6c1f8e
2010-06-06 Paul Boddie raw files shortlog changelog graph Added branch and tag information. Introduced prettier navigation options in the shortlog. Added a menu entry for branches.
themes/mercurialweb/map (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/themes/mercurialweb/map	Fri Jun 04 00:57:25 2010 +0200
     1.2 +++ b/themes/mercurialweb/map	Sun Jun 06 03:09:57 2010 +0200
     1.3 @@ -12,5 +12,9 @@
     1.4  summary = summary.tmpl
     1.5  
     1.6  archiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a> '
     1.7 +branchtag = '<span class="branch">{name}</span> '
     1.8 +inbranchtag = '<span class="inbranch">{name}</span> '
     1.9 +tagtag = '<span class="tag">{name}</span> '
    1.10 +
    1.11  hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
    1.12  urlparameter = '{separator}{name}={value|urlescape}'
     2.1 --- a/themes/mercurialweb/search.tmpl	Fri Jun 04 00:57:25 2010 +0200
     2.2 +++ b/themes/mercurialweb/search.tmpl	Sun Jun 06 03:09:57 2010 +0200
     2.3 @@ -11,6 +11,7 @@
     2.4      <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li
     2.5      ><li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li
     2.6      ><li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li
     2.7 +    ><li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li
     2.8      ><li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li
     2.9      ><li><a href="{url}files{sessionvars%urlparameter}">files</a></li
    2.10      ><li><form id="searchform" action="{url}log"><span class="container">
     3.1 --- a/themes/mercurialweb/shortlog.tmpl	Fri Jun 04 00:57:25 2010 +0200
     3.2 +++ b/themes/mercurialweb/shortlog.tmpl	Sun Jun 06 03:09:57 2010 +0200
     3.3 @@ -12,6 +12,7 @@
     3.4      ><li class="current"><span>shortlog</span></li
     3.5      ><li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li
     3.6      ><li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li
     3.7 +    ><li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li
     3.8      ><li><a href="{url}files{sessionvars%urlparameter}">files</a></li
     3.9      ><li><form id="searchform" action="{url}log"><span class="container">
    3.10          <span class="hint">Search</span>&nbsp;<input name="rev" id="searchinput" type="text" size="20" />
     4.1 --- a/themes/mercurialweb/shortlogentry.tmpl	Fri Jun 04 00:57:25 2010 +0200
     4.2 +++ b/themes/mercurialweb/shortlogentry.tmpl	Sun Jun 06 03:09:57 2010 +0200
     4.3 @@ -1,6 +1,7 @@
     4.4  <tr class="parity{parity}">
     4.5    <td>{date|age} ago</td>
     4.6    <td>{author|person}</td>
     4.7 +  <td class="navigation"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></td>
     4.8    <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape}</a></td>
     4.9 -  <td><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></td>
    4.10 +  <td>{inbranch%inbranchtag}{tags%tagtag}</td>
    4.11  </tr>
     5.1 --- a/themes/mercurialweb/static/style-mercurialweb.css	Fri Jun 04 00:57:25 2010 +0200
     5.2 +++ b/themes/mercurialweb/static/style-mercurialweb.css	Sun Jun 06 03:09:57 2010 +0200
     5.3 @@ -38,7 +38,7 @@
     5.4  
     5.5  table
     5.6  {
     5.7 -    margin: 0 1em 1em 1em;
     5.8 +    margin: 1em 0;
     5.9      border-collapse: collapse;
    5.10  }
    5.11  
    5.12 @@ -51,7 +51,7 @@
    5.13  }
    5.14  
    5.15  th, td {
    5.16 -    padding: 0.25em 0.5em 0.25em 0.5em;
    5.17 +    padding: 0.4em 0.25em;
    5.18  }
    5.19  
    5.20  td p {
    5.21 @@ -65,6 +65,23 @@
    5.22  h2 { font-size: 1.6em; }
    5.23  h3 { font-size: 1.3em; }
    5.24  
    5.25 +/* Repository information. */
    5.26 +
    5.27 +span.tag {
    5.28 +    background: #f1b500;
    5.29 +    padding: 0.25em 0.5em;
    5.30 +}
    5.31 +
    5.32 +span.branch {
    5.33 +    background: #b5f1b5;
    5.34 +    padding: 0.25em 0.5em;
    5.35 +}
    5.36 +
    5.37 +span.inbranch {
    5.38 +    background: #b5b5b5;
    5.39 +    padding: 0.25em 0.5em;
    5.40 +}
    5.41 +
    5.42  /* Navigational and editing controls. */
    5.43  
    5.44  .controls {
    5.45 @@ -85,6 +102,19 @@
    5.46      padding: 0;
    5.47  }
    5.48  
    5.49 +#navibar a, #navibar li.current span, .navigation a {
    5.50 +    color: #fff;
    5.51 +    text-decoration: none;
    5.52 +}
    5.53 +
    5.54 +#navibar a, #navibar li.current span {
    5.55 +    background: #999;
    5.56 +}
    5.57 +
    5.58 +.navigation a {
    5.59 +    background: #ccc;
    5.60 +}
    5.61 +
    5.62  #navibar a, #navibar li.current span {
    5.63  
    5.64      /* Need a block to redefine the height. */
    5.65 @@ -93,18 +123,21 @@
    5.66      height: 42px;
    5.67      line-height: 42px;
    5.68  
    5.69 -    color: #fff;
    5.70      margin: 0;
    5.71      padding: 0 16px;
    5.72 -    background: #999;
    5.73 -    text-decoration: none;
    5.74  }
    5.75  
    5.76 -#navibar a:hover, #navibar a:focus, #navibar li.current a, #navibar li.current span {
    5.77 +.navigation a {
    5.78 +    padding: 0.25em 0.5em;
    5.79 +}
    5.80 +
    5.81 +#navibar a:hover, #navibar a:focus, #navibar li.current a, #navibar li.current span,
    5.82 +.navigation a:hover, .navigation a:focus {
    5.83      background: #00b5f1;
    5.84  }
    5.85  
    5.86 -#navibar a:hover, #navibar a:focus, #navibar li.current a {
    5.87 +#navibar a:hover, #navibar a:focus, #navibar li.current a,
    5.88 +.navigation a:hover, .navigation a:focus {
    5.89      text-decoration: none;
    5.90  }
    5.91  
    5.92 @@ -185,59 +218,6 @@
    5.93      border-bottom: 1px solid #ccc;
    5.94  }
    5.95  
    5.96 -#message {
    5.97 -    clear: both;
    5.98 -    margin: 0;
    5.99 -    padding: 5px 10px;
   5.100 -
   5.101 -    /* Styling similar to the advanced search. */
   5.102 -
   5.103 -    border-bottom: 1px solid #ADB9CC;
   5.104 -    background-color: #E7E7E7;
   5.105 -}
   5.106 -
   5.107 -#message p {
   5.108 -    margin: 5px 0;
   5.109 -    padding: 0;
   5.110 -}
   5.111 -
   5.112 -#message div.buttons {
   5.113 -    font-weight: normal;
   5.114 -}
   5.115 -
   5.116 -.dialog form {
   5.117 -    margin: 0 15px;
   5.118 -}
   5.119 -
   5.120 -.dialog td {
   5.121 -    border: none;
   5.122 -    padding: 5px;
   5.123 -}
   5.124 -
   5.125 -.dialog td.label {
   5.126 -    text-align: right;
   5.127 -    font-weight: bold;
   5.128 -    width: 25%;
   5.129 -}
   5.130 -
   5.131 -*[dir="rtl"] .dialog td.label {
   5.132 -    text-align: left;
   5.133 -}
   5.134 -
   5.135 -.dialog td.content input {
   5.136 -    width: 100%;
   5.137 -}
   5.138 -
   5.139 -#page {
   5.140 -
   5.141 -    /* Prevent mixing of header and content elements. */
   5.142 -
   5.143 -    clear: both;
   5.144 -    background-color: white;
   5.145 -    margin: 0;
   5.146 -    padding: 0.25em;
   5.147 -}
   5.148 -
   5.149  #credits {
   5.150      float: right;
   5.151  
   5.152 @@ -261,33 +241,3 @@
   5.153  #credits a {
   5.154      text-decoration: none;
   5.155  }
   5.156 -
   5.157 -.diff {
   5.158 -    width:99%;
   5.159 -}
   5.160 -
   5.161 -.diff-header {
   5.162 -    font-weight: bold;
   5.163 -}
   5.164 -
   5.165 -.diff-title {
   5.166 -    background-color: #C0C0C0;
   5.167 -}
   5.168 -
   5.169 -.diff-added {
   5.170 -    background-color: #E0FFE0;
   5.171 -    vertical-align: sub;
   5.172 -}
   5.173 -
   5.174 -.diff-removed {
   5.175 -    background-color: #FFFFE0;
   5.176 -    vertical-align: sub;
   5.177 -}
   5.178 -
   5.179 -.diff-added span {
   5.180 -    background-color: #80FF80;
   5.181 -}
   5.182 -
   5.183 -.diff-removed span {
   5.184 -    background-color: #FFFF80;
   5.185 -}
     6.1 --- a/themes/mercurialweb/summary.tmpl	Fri Jun 04 00:57:25 2010 +0200
     6.2 +++ b/themes/mercurialweb/summary.tmpl	Sun Jun 06 03:09:57 2010 +0200
     6.3 @@ -11,6 +11,7 @@
     6.4      <li class="current"><span>summary</span></li
     6.5      ><li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li
     6.6      ><li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li
     6.7 +    ><li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li
     6.8      ><li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li
     6.9      ><li><a href="{url}files{sessionvars%urlparameter}">files</a></li
    6.10      ><li><form id="searchform" action="{url}log"><span class="container">