1. Steve Losh
  2. hg-letterpress

Commits

Steve Losh  committed 13dd3f9

Convert the changelog page.

  • Participants
  • Parent commits 952382c
  • Branches default

Comments (0)

Files changed (5)

File letterpress/changelog.tmpl

View file
-{header}
-<title>{repo|escape}: Changelog</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{% include "urlparams" %}">{repo|escape}</a> / changelog
-</div>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<div class="search">
-<input type="text" name="rev"  />
-</div>
-</form>
-
-<div class="page_nav">
-<a href="{url}summary{% include "urlparams" %}">summary</a> |
-<a href="{url}shortlog/{rev}{% include "urlparams" %}">shortlog</a> |
-changelog |
-<a href="{url}graph{% include "urlparams" %}">graph</a> |
-<a href="{url}tags{% include "urlparams" %}">tags</a> |
-<a href="{url}branches{% include "urlparams" %}">branches</a> |
-<a href="{url}file/{node|short}{% include "urlparams" %}">files</a>{archives%archiveentry}
-<br/>
-{changenav%naventry}<br/>
-</div>
+{% extends "base" %}
+{% set page_title = "Changelog" %}
 
 {entries%changelogentry}
 
-<div class="page_nav">
-{changenav%naventry}<br/>
-</div>
 
-{footer}
+
+{% block content %}
+
+<h1>Changelog</h1>
+
+<p>
+    Navigate: {% include "navchangeentries" %}
+</p>
+
+{% for item in entries() %}
+    <div class="changelog">
+        <h2 class="title">
+            <a href="{{ url }}rev/{{ item.node|short }}{% include "urlparams" %}">
+                {{ item.desc|strip|firstline|escape|nonempty }}
+                <span class="value logtags">
+                        {% for branch in item.inbranch %}
+                            <span class="inbranchtag" title="{{ branch.name }}">{{ branch.name }}</span>
+                        {% endfor %}
+                        {% for tag in item.tags %}
+                            <span class="tagtag" title="{{ tag.name }}">{{ tag.name }}</span>
+                        {% endfor %}
+                        {% for branch in item.branches %}
+                            <span class="branchtag" title="{{ branch.name }}">{{ branch.name }}</span>
+                        {% endfor %}
+                    </span>
+                </a>
+        </h2>
+        <p class="changelog-info">
+            Revision {{ item.rev }},
+            committed <span class="age">{{ item.date|age }} ago</span>
+            by {{ item.author|obfuscate }}
+        </p>
+        <p class="changelog-body">
+            {{ item.desc|strip|escape|addbreaks|nonempty }}
+        </p>
+    </div>
+{% endfor %}
+
+<p>
+    Navigate: {% include "navchangeentries" %}
+</p>
+
+{% endblock %}

File letterpress/map

View file
 footer = footer.tmpl
 navigation = navigation.tmpl
 search = search.tmpl
-changelog = changelog.tmpl
+changelog = jinja2:changelog.tmpl
 branchtable = jinja2:branchtable.tmpl
 summary = jinja2:summary.tmpl
 error = error.tmpl
     </td>
   </tr>'
 fileellipses = '...'
-changelogentry = changelogentry.tmpl
+navchangeentries = jinja2:navchangeentries.tmpl
 shortlogentry = jinja2:shortlogentry.tmpl
 searchentry = changelogentry.tmpl
 changeset = changeset.tmpl

File letterpress/navchangeentries.tmpl

View file
+{% for nav in changenav() %}
+    <a href="{{ url }}changelog/{{ nav.node|short }}{% include "urlparams" %}">{{ nav.label|escape }}</a>
+{% endfor %}

File letterpress/shortlog.tmpl

View file
 {% extends "base" %}
-
 {% set page_title = "Summary" %}
 
 

File static/style-letterpress.css

View file
     font-weight: bold;
     width: 100px;
     display: inline-block;
+}
+
+/* Changelog styles. */
+div.changelog h2.title {
+    margin-top: 1.5em;
+}
+div.changelog h2.title:first-child {
+    margin-top: 0em;
+}
+div.changelog p.changelog-info {
+    margin-top: -1em;
+    margin-bottom: 0.5em;
+    color: #666;
+}
+div.changelog p.changelog-body {
+    margin-left: 3em;
 }