Diff

graph.tmpl @ 0:2f78b9100113 draft

Init.
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Mon, 10 Jul 2023 23:41:04 +0700
child 2:5ffc6136763b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graph.tmpl	Mon Jul 10 23:41:04 2023 +0700
@@ -0,0 +1,100 @@
+{header}
+<title>Graph {repo|escape}: revision</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}: log" />
+<link rel="alternate" type="application/rss+xml"
+   href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}: log" />
+</head>
+<body>
+    <div class="main">
+        <div class="dd-hover menu">
+        <div class="dd-content">
+            <hr />
+            <h6>{repo|escape}</h6>
+            <ul>
+                <li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+                <li class="active">Graph</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}branches{sessionvars%urlparameter}">branches</a></li>
+            </ul>
+            <hr />
+            <h6>{symrev}</h6>
+            <ul>
+                <li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+                <li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+            </ul>
+            <ul>
+                {archives%archiveentry}
+            </ul>
+            <hr />
+            <ul>
+                 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
+            </ul>
+            <div class="atom-logo">
+                <a href="{url|urlescape}rss-bookmarks" title="subscribe to RSS feed">
+                    RSS: <img class="rss-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="RSS feed" />
+                </a>
+                <a href="{url|urlescape}atom-log" title="subscribe to Atom feed">
+                    Atom: <img class="atom-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="Atom feed" />
+                </a>
+            </div>
+        </div>
+            {logo}
+        </div>
+        <main>
+            <hr />
+            <h1 class="breadcrumb"><a href="/">Software</a> {pathdef%breadcrumb}</h1>
+
+            {searchform}
+
+            <h2>Graph</h3>
+            <div class="navigate">
+                <a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a>
+                <a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a>
+                | rev {rev}: {changenav%navgraph}
+            </div>
+
+            <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
+
+            <div id="wrapper">
+            <canvas id="graph"></canvas>
+            <ul id="graphnodes" class="stripes2">{nodes%graphentry}</ul>
+            </div>
+
+            <script type="text/javascript"{if(nonce, ' nonce="{nonce}"')}>
+            var data = {jsdata|json};
+            var graph = new Graph();
+            graph.scale({bg_height});
+            graph.render(data);
+            </script>
+
+            <div class="navigate">
+                <a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a>
+                <a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a>
+                | rev {rev}: {changenav%navgraph}
+            </div>
+
+            <p>Scroll all the way down to load more.</p>
+
+            <script type="text/javascript"{if(nonce, ' nonce="{nonce}"')}>
+            ajaxScrollInit(
+                    '{url|urlescape}graph/%next%{graphvars%urlparameter}',
+                    '{nextentry%"{node}"}', <!-- NEXTHASH
+                    function (htmlText) \{
+                    var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
+                    return m ? m[1] : null;
+                    },
+                    '#wrapper',
+                    '<div class="%class%" style="text-align: center;">%text%</div>',
+                    'graph'
+                    );
+            </script>
+
+        <p></p>
+        <hr />
+        </main>
+    </div>
+{logo}
+    {banner}
+{footer}