mercurial/templates/monoblue/graph.tmpl
author Yuya Nishihara <yuya@tcha.org>
Sun, 02 Sep 2018 16:26:33 +0900
changeset 39402 ecbab8be7470
parent 38482 5faaa31a6082
permissions -rw-r--r--
test-check-py3-compat: don't run py3 part if not build against python3 This test depends on C extensions built for python3, which aren't available if run-tests.py runs on python2 and no -l/--local is specified.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
     1
{header}
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
     2
    <title>{repo|escape}: graph</title>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
     3
    <link rel="alternate" type="application/atom+xml" href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
     4
    <link rel="alternate" type="application/rss+xml" href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
     5
</head>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
     6
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
     7
<body>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
     8
<div id="container">
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
     9
    <div class="page-header">
18258
bebb05a7e249 hgweb: add a "URL breadcrumb" to the index and repository pages
Angel Ezquerra <angel.ezquerra at gmail.com>
parents: 17580
diff changeset
    10
        <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / graph</h1>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    11
32759
265196cd7d7f hgweb: consolidate search form for monoblue
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30766
diff changeset
    12
        {searchform}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    13
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    14
        <ul class="page-nav">
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    15
            <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    16
            <li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    17
            <li><a href="{url|urlescape}changelog{sessionvars%urlparameter}">changelog</a></li>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    18
            <li class="current">graph</li>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    19
            <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    20
            <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    21
            <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
25604
0cdcbc477cac hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net>
parents: 24129
diff changeset
    22
            <li><a href="{url|urlescape}file/{symrev}{sessionvars%urlparameter}">files</a></li>
38482
5faaa31a6082 hgweb: add archive entries to graph page
Anton Shestakov <av6@dwimlabs.net>
parents: 35654
diff changeset
    23
            {archives%archiveentry}
24129
3fc86f1c39d8 hgweb: don't mix tabs and spaces in monoblue templates
Anton Shestakov <engored@ya.ru>
parents: 20255
diff changeset
    24
            <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    25
        </ul>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    26
    </div>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    27
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    28
    <h2 class="no-link no-border">graph</h2>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    29
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    30
    <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    31
    <div id="wrapper">
35407
27ab3150cd50 hgweb: calculate <canvas> width and height client-side
Anton Shestakov <av6@dwimlabs.net>
parents: 35255
diff changeset
    32
        <canvas id="graph"></canvas>
35221
75f9f366e5cc monoblue: render changesets server-side on /graph page
Anton Shestakov <av6@dwimlabs.net>
parents: 35160
diff changeset
    33
        <ul id="graphnodes">{nodes%graphentry}</ul>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    34
    </div>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    35
30766
d7bf7d2bd5ab hgweb: support Content Security Policy
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27913
diff changeset
    36
    <script{if(nonce, ' nonce="{nonce}"')}>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    37
    document.getElementById('noscript').style.display = 'none';
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    38
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    39
    var data = {jsdata|json};
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    40
    var graph = new Graph();
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    41
    graph.scale({bg_height});
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    42
    graph.render(data);
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    43
    </script>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    44
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    45
    <div class="page-path">
25604
0cdcbc477cac hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net>
parents: 24129
diff changeset
    46
        <a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a>
0cdcbc477cac hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net>
parents: 24129
diff changeset
    47
        <a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a>
10254
8d5de52431f2 hgweb: changenav: separate pages before and after the current position
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9999
diff changeset
    48
        | {changenav%navgraph}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    49
    </div>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
    50
30766
d7bf7d2bd5ab hgweb: support Content Security Policy
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27913
diff changeset
    51
    <script type="text/javascript"{if(nonce, ' nonce="{nonce}"')}>
20255
b1d65cb8c759 hgweb: infinite scroll support for monoblue style
Takumi IINO <trot.thunder@gmail.com>
parents: 18526
diff changeset
    52
    ajaxScrollInit(
35409
f84b01257e06 hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents: 35407
diff changeset
    53
            '{url|urlescape}graph/%next%{graphvars%urlparameter}',
f84b01257e06 hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents: 35407
diff changeset
    54
            '{nextentry%"{node}"}', <!-- NEXTHASH
35654
59c842a3d1e1 hgweb: remove unused second argument of nextPageVarGet()
Anton Shestakov <av6@dwimlabs.net>
parents: 35605
diff changeset
    55
            function (htmlText) \{
35409
f84b01257e06 hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents: 35407
diff changeset
    56
                var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
f84b01257e06 hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents: 35407
diff changeset
    57
                return m ? m[1] : null;
f84b01257e06 hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents: 35407
diff changeset
    58
            },
20255
b1d65cb8c759 hgweb: infinite scroll support for monoblue style
Takumi IINO <trot.thunder@gmail.com>
parents: 18526
diff changeset
    59
            '#wrapper',
b1d65cb8c759 hgweb: infinite scroll support for monoblue style
Takumi IINO <trot.thunder@gmail.com>
parents: 18526
diff changeset
    60
            '<div class="%class%" style="text-align: center;">%text%</div>',
b1d65cb8c759 hgweb: infinite scroll support for monoblue style
Takumi IINO <trot.thunder@gmail.com>
parents: 18526
diff changeset
    61
            'graph'
b1d65cb8c759 hgweb: infinite scroll support for monoblue style
Takumi IINO <trot.thunder@gmail.com>
parents: 18526
diff changeset
    62
    );
b1d65cb8c759 hgweb: infinite scroll support for monoblue style
Takumi IINO <trot.thunder@gmail.com>
parents: 18526
diff changeset
    63
    </script>
b1d65cb8c759 hgweb: infinite scroll support for monoblue style
Takumi IINO <trot.thunder@gmail.com>
parents: 18526
diff changeset
    64
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
    65
{footer}