37:5f59998fb5eb
Anton Shestakov <av6@dwimlabs.net>, Wed, 15 Apr 2020 15:20:29 +0800
kit: use CSS counters to render line numbers where possible Affects changeset, file view, file diff and file annotate pages. Doesn't affect file comparison page (aka side-by-side file diff). Page size, regular file view (mercurial/commands.py): - 987963 B before - 596244 B after Page size, changeset (4441705b7111): - 1319976 B before - 923672 B after

previous change 35:46d32d01fa47

templates/kit/map

Permissions: -rw-r--r--

Other formats: Feeds:
default = 'summary'
mimetype = 'text/html; charset={encoding}'
header = header.tmpl
footer = footer.tmpl
search = search.tmpl
changelog = changelog.tmpl
summary = summary.tmpl
error = error.tmpl
notfound = notfound.tmpl
help = help.tmpl
helptopics = helptopics.tmpl
helpentry = '
<dt>
<a href="{url|urlescape}help/{topic|escape}{sessionvars%urlparameter}">
{if(basename, '{basename|escape}', '{topic|escape}')}
</a>
</dt>
<dd>{summary|escape}</dd>'
navbar = navbar.tmpl
naventry = '<li><a href="{url|urlescape}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a></li> '
navshortentry = '<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a></li> '
navgraphentry = '<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a></li> '
filenaventry = '<li><a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a></li> '
filedifflink = '<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
filenodelink = '
<tr>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a>
</td>
<td></td>
<td>
<a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
<a href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a> |
<a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
</td>
</tr>'
filenolink = '
<tr>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a>
</td>
<td></td>
<td>
file |
annotate |
<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
<a href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a> |
<a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
</td>
</tr>'
nav = '{before%naventry} {after%naventry}'
navshort = '{before%navshortentry}{after%navshortentry}'
navgraph = '{before%navgraphentry}{after%navgraphentry}'
filenav = '{before%filenaventry}{after%filenaventry}'
fileellipses = '...'
changelogentry = changelogentry.tmpl
searchentry = changelogentry.tmpl
changeset = changeset.tmpl
manifest = manifest.tmpl
updirentry = '
<tr>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}file/{symrev}{up|urlescape}{sessionvars%urlparameter}"><i class="uk-icon-folder-open-o kit-item-icon"></i>..</a>
</td>
<td></td>
<td class="kit-monospace">drwxr-xr-x</td>
<td></td>
</tr>'
direntry = '
<tr>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}"><i class="uk-icon-folder-o kit-item-icon"></i>{basename|escape}/</a>
<a href="{url|urlescape}file/{symrev}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">{emptydirs|escape}</a>
</td>
<td></td>
<td class="kit-monospace">drwxr-xr-x</td>
<td>
<a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
fileentry = '
<tr>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}"><i class="uk-icon-file-o kit-item-icon"></i>{basename|escape}</a>
</td>
<td>{size}</td>
<td class="kit-monospace">{permissions|permissions}</td>
<td>
<a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
<a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
<a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
</td>
</tr>'
filerevision = filerevision.tmpl
fileannotate = fileannotate.tmpl
filediff = filediff.tmpl
filecomparison = filecomparison.tmpl
filelog = filelog.tmpl
fileline = '<div id="{lineid}"><a href="#{lineid}"></a>{strip(line|escape, '\r\n')}</div>'
annotateline = '
<tr id="{lineid}" {ifeq(node, originalnode, ' class="kit-this-rev"')}>
<td class="uk-visible-hover uk-position-relative uk-text-top kit-block-parity{blockparity}">
{if(blockhead, '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">{rev}</a>')}
<div class="uk-hidden uk-panel uk-panel-box uk-text-nowrap kit-annotate-panel">
<div>
<a class="kit-monospace" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{rev}:{node|short}</a>
{desc|escape|firstline}
</div>
<div>{author|obfuscate}</div>
<div>previous changes: {parents%annotateparent}</div>
<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">line</a> |
<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>
</div>
</td>
<td class="kit-monospace kit-annotate-line"><a href="#{lineid}"></a>{line|escape}</td>
</tr>'
annotateparent = '<a class="kit-monospace" href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a>'
difflineplus = '<div id="{lineid}" class="kit-line-plus"><a href="#{lineid}"></a>{strip(line|escape, '\r\n')}</div>'
difflineminus = '<div id="{lineid}" class="kit-line-minus"><a href="#{lineid}"></a>{strip(line|escape, '\r\n')}</div>'
difflineat = '<div id="{lineid}" class="kit-line-at"><a href="#{lineid}"></a>{strip(line|escape, '\r\n')}</div>'
diffline = '<div id="{lineid}"><a href="#{lineid}"></a>{strip(line|escape, '\r\n')}</div>'
comparisonblock = '<tbody class="kit-monospace kit-comparison">{lines}</tbody>'
comparisonline = '
<tr id="{lineid}" class="kit-comparison-{type}">
<td><a href="#{lineid}" class="kit-line-number" data-line-number="{leftlinenumber}"></a>{leftline|escape}</td>
<td><a href="#{lineid}" class="kit-line-number" data-line-number="{rightlinenumber}"></a>{rightline|escape}</td>
</tr>'
difffrom = '<a href="{url|urlescape}rev/{node|short}:{originalnode|short}{sessionvars%urlparameter}">diff</a>'
changesetlink = '<a class="kit-monospace" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{rev}:{node|short}</a>'
changesetparent = '
<tr>
<td class="uk-text-right">parent</td>
<td>{changesetlink}</td>
</tr>'
changesetparentdiff = '
<tr>
<td class="uk-text-right">parent</td>
<td>{changesetlink} {ifeq(node, basenode, '(current diff)', '({difffrom})')}</td>
</tr>'
changesetchild = '
<tr>
<td class="uk-text-right">child</td>
<td>{changesetlink}</td>
</tr>'
filerename = '{file|escape}@'
filelogrename = '| <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">base</a>'
filerevparent = '
<tr>
<td class="uk-text-right">previous change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{rev}:{node|short}</a>
</td>
</tr>'
filerevchild = '
<tr>
<td class="uk-text-right">next change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a></td>
</tr>'
fileannotateparent = '
<tr>
<td class="uk-text-right">previous change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{rev}:{node|short}</a>
</td>
</tr>'
fileannotatechild = '
<tr>
<td class="uk-text-right">next change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a></td>
</tr>'
tags = tags.tmpl
tagentry = '
<tr>
<td class="age">{date|rfc822date}</td>
<td class="uk-width-1-1 uk-text-break">
<a href="{url|urlescape}rev/{tag|revescape}{sessionvars%urlparameter}">{tag|escape}</a>
</td>
<td>
<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url|urlescape}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
<a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
bookmarks = bookmarks.tmpl
bookmarkentry = '
<tr>
<td class="age">{date|rfc822date}</td>
<td class="uk-width-1-1 uk-text-break">
<a href="{url|urlescape}rev/{bookmark|revescape}{sessionvars%urlparameter}">{bookmark|escape}</a>
</td>
<td>
<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url|urlescape}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
<a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
branches = branches.tmpl
branchentry = '
<tr>
<td class="age">{date|rfc822date}</td>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}shortlog/{branch|revescape}{sessionvars%urlparameter}">{branch|escape}</a>
<span class="uk-badge kit-badge-branch-{status}">{status}</span>
</td>
<td>
<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url|urlescape}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
<a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
diffblock = '<pre class="kit-diff">{lines}</pre>'
diffstatlink = diffstatlink.tmpl
diffstatnolink = diffstatlink.tmpl
filediffparent = '
<tr>
<td class="uk-text-right">previous change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a>
</td>
</tr>'
filediffchild = '
<tr>
<td class="uk-text-right">next change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a>
</td>
</tr>'
filecompparent = '
<tr>
<td class="uk-text-right">previous change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a>
</td>
</tr>'
filecompchild = '
<tr>
<td class="uk-text-right">next change</td>
<td>
<a class="kit-monospace" href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rev}:{node|short}</a>
</td>
</tr>'
shortlog = shortlog.tmpl
graph = graph.tmpl
graphentry = graphentry.tmpl
phasetag = '{ifeq(phase, 'public', '', '<span class="uk-badge kit-badge-phase-{phase|escape}" title="Phase: {phase|escape}">{phase|escape}</span> ')}'
obsoletetag = '{if(obsolete, '<span class="uk-badge kit-badge-obsolete" title="Obsolete commit">obsolete</span> ')}'
instabilitytag = '<span class="uk-badge kit-badge-instability" title="Instability: {instability|escape}">{instability|escape}</span> '
tagtag = '<a href="{url|urlescape}rev/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-tag" title="Tag: {name|escape}">{name|escape}</span></a> '
branchtag = '<a href="{url|urlescape}shortlog/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-branch-head" title="A head of branch: {name|escape}">{name|escape}</span></a> '
inbranchtag = '<a href="{url|urlescape}shortlog/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-branch" title="Branch: {name|escape}">{name|escape}</span></a> '
bookmarktag = '<a href="{url|urlescape}rev/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-bookmark" title="Bookmark: {name|escape}">{name|escape}</span></a> '
alltags = '<span>{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>'
successorlink = '<a class="kit-monospace" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{rev}:{node|short}</a> '
obsfatesuccessors = '{if(successors, ' as ')}{successors%successorlink}'
obsfateverb = '{obsfateverb(successors, markers)}'
obsfateoperations = '{if(obsfateoperations(markers), ' using {join(obsfateoperations(markers), ', ')}')}'
obsfateusers = '{if(obsfateusers(markers), ' by {join(obsfateusers(markers)%'{user|obfuscate}', ', ')}')}'
obsfatedate = '{if(obsfatedate(markers), ' {ifeq(min(obsfatedate(markers)), max(obsfatedate(markers)), '<span class="age">{min(obsfatedate(markers))|rfc822date}</span>', 'between <span class="age">{min(obsfatedate(markers))|rfc822date}</span> and <span class="age">{max(obsfatedate(markers))|rfc822date}</span>')}')}'
obsfateentry = '
<div>
<span class="uk-badge kit-badge-obsolete">obsolete</span>
{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}
</div>'
instabilitychangesetlink = '<a class="kit-monospace" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>'
divergentnode = '{instabilitychangesetlink} ({phase})'
whyunstableentry = '
<div>
<span class="uk-badge kit-badge-instability">{instability}</span>
{if(divergentnodes, divergentnodes%divergentnode)} {reason} {instabilitychangesetlink}
</div>'
shortlogentry = '
<tr>
<td class="age">{date|rfc822date}</td>
<td>{author|person}</td>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
{alltags}
</td>
<td>
<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
filelogentry = '
<tr>
<td class="age">{date|rfc822date}</td>
<td>{author|person}</td>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">
<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
{alltags}
</td>
<td>
<a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
<a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
{rename%filelogrename}
</td>
</tr>'
labelentry = '<span class="uk-badge kit-badge-label">{label|escape}</span> '
archiveentry = '<a class="uk-button uk-button-small" href="{url|urlescape}archive/{symrev}{extension}{ifeq(path, '/', '', path|urlescape)}">{type|escape}</a>'
indexentry = '
<tr>
<td>
<a href="{url|urlescape}{sessionvars%urlparameter}">{name|escape}</a>
{labels%labelentry}
</td>
<td class="uk-width-1-1 uk-text-break kit-white-space-normal">{description}</td>
<td>{contact|obfuscate}</td>
<td class="age">{lastchange|rfc822date}</td>
<td>{archives%indexarchiveentry}</td>
<td>{if(isdirectory, '', '<div><a href="{url|urlescape}rss-log"><i class="uk-icon-rss"></i> RSS</a> <a href="{url|urlescape}atom-log"><i class="uk-icon-rss"></i> Atom</a></div>')}</td>
</tr>'
indexarchiveentry = ' <a href="{url|urlescape}archive/{node|short}{extension}">{type|escape}</a> '
index = index.tmpl
urlparameter = '{separator}{name}={value|urlescape}'
hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}">'
breadcrumb = '<li><a href="{url|urlescape}">{name|escape}</a></li>'