14:5cd490f68c80
Anton Shestakov <av6@dwimlabs.net>, Sat, 12 Aug 2017 13:27:40 +0800
manifest: move ".."/"[up]" entry to map file and show it only when needed

next change 18:305bd086b730
previous change 6:63ac0f5af5d5

templates/kit/graph.tmpl

Permissions: -rw-r--r--

Other formats: Feeds:
{header}
<title>Graph at {symrev|escape} · {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}">
<!--[if IE]><script type="text/javascript" src="{staticurl|urlescape}excanvas.js"></script><![endif]-->
</head>
<body>
{navbar}
<div class="uk-container uk-container-center uk-margin-large-bottom">
<div class="uk-tab-center uk-margin-top">
<ul class="uk-tab">
<li><a href="{url|urlescape}summary{sessionvars%urlparameter}">Summary</a></li>
<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">Shortlog</a></li>
<li><a href="{url|urlescape}log/{symrev}{sessionvars%urlparameter}">Changelog</a></li>
<li class="uk-active"><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>
</ul>
</div>
<div class="uk-text-right uk-margin-top">
<span class="uk-margin-left">Other formats:</span>
<a class="uk-button uk-button-small" href="{url|urlescape}raw-graph">Raw</a>
<span class="uk-margin-left">Feeds:</span>
<div class="uk-button-group">
<a class="uk-button uk-button-small" href="{url|urlescape}atom-log">Atom</a>
<a class="uk-button uk-button-small" href="{url|urlescape}rss-log">RSS</a>
</div>
</div>
<noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
<ul class="uk-pagination">
<li><a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a></li>
<li><a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a></li>
{changenav%navgraph}
</ul>
<div class="uk-position-relative" data-scroll-target>
<ul id="nodebgs"></ul>
<canvas id="graph" width="{canvaswidth}" height="{canvasheight}"></canvas>
<ul id="graphnodes"></ul>
</div>
<ul class="uk-pagination">
<li><a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a></li>
<li><a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a></li>
{changenav%navgraph}
</ul>
</div>
<script>
<!-- hide script content
var data = {jsdata|json};
var graph = new Graph();
graph.scale({bg_height});
graph.vertex = function(x, y, color, parity, cur) \{
this.ctx.beginPath();
color = this.setColor(color, 0.25, 0.75);
this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
this.ctx.fill();
var bg = '<li class="bg parity' + parity + '"></li>';
var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
var nstyle = 'padding-left: ' + left + 'px;';
var tagspan = '';
if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{
if (cur[6][1]) \{
tagspan += '<span class="uk-badge kit-badge-branch-head" title="' + cur[6][0] + '">';
tagspan += cur[6][0] + '</span> ';
} else if (!cur[6][1] && cur[6][0] != 'default') \{
tagspan += '<span class="uk-badge kit-badge-branch" title="' + cur[6][0] + '">';
tagspan += cur[6][0] + '</span> ';
}
if (cur[7].length) \{
for (var t in cur[7]) \{
var tag = cur[7][t];
tagspan += '<span class="uk-badge kit-badge-tag">' + tag + '</span> ';
}
}
if (cur[8].length) \{
for (var t in cur[8]) \{
var bookmark = cur[8][t];
tagspan += '<span class="uk-badge kit-badge-bookmark">' + bookmark + '</span> ';
}
}
}
var item = '<li style="' + nstyle + '"><span class="desc">';
item += '<a href="{url|urlescape}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '">' + cur[3] + '</a>';
item += '</span> ' + tagspan;
item += '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
return [bg, item];
}
graph.render(data);
// stop hiding script -->
</script>
<script type="text/javascript">
ajaxScrollInit(
'{url|urlescape}graph/{rev}?revcount=%next%&style={style}',
{revcount}+60,
function (htmlText, previousVal) \{ return previousVal + 60; },
'[data-scroll-target]',
'<div class="%class%" style="text-align: center;">%text%</div>',
'graph'
);
</script>
{footer}