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
templates/kit/changeset.tmpl
Permissions: -rw-r--r--
<title>{rev}:{node|short} · {repo|escape}</title> <link rel="alternate" type="application/atom+xml" href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"> <link rel="alternate" type="application/rss+xml" href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"> <div class="uk-container uk-container-center uk-margin-large-bottom"> <div class="uk-tab-center uk-margin-top"> <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">Summary</a></li> <li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">Shortlog</a></li> <li class="uk-active"><a href="{url|urlescape}log/{symrev}{sessionvars%urlparameter}">Changelog</a></li> <li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">Graph</a></li> <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">Branches</a></li> <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">Tags</a></li> <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">Bookmarks</a></li> <li><a href="{url|urlescape}file/{symrev}{sessionvars%urlparameter}">Files</a></li> <div class="uk-clearfix uk-margin-top"> <div class="uk-float-right"> <span class="uk-margin-left">Download:</span> <div class="uk-button-group"> <a class="uk-button uk-button-small" href="{url|urlescape}raw-rev/{node|short}">Patch</a> <table class="uk-margin-top"> {ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)} <a class="kit-monospace" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{rev}:{node|short}</a> <div>{author|obfuscate}, <span class="age">{date|rfc822date}</span></div> <div class="uk-margin-top kit-commit-message">{desc|strip|escape|websub|nonempty}</div> {if(obsolete, succsandmarkers%obsfateentry)} {if(instabilities, whyunstable%whyunstableentry)} <a id="diffstatexpand" class="diffstattoggle" href="#">[<tt>+</tt>]</a> <div id="diffstatdetails" style="display: none;"> <a class="diffstattoggle" href="#">[<tt>-</tt>]</a> <table>{diffstat}</table> <table class="uk-table uk-table-hover uk-text-nowrap">{files}</table> <div class="kit-diffs">{diff}</div>