summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-10-05 15:45:44 -0500
committerDan McGee <dan@archlinux.org>2011-10-05 15:45:44 -0500
commitd5063bd1d2cae79df7ce6e826c7413fed61ff9db (patch)
treec2e80d2cdcd1407ee5e65a2d3dd5f5d58a78d63b /templates
parente157f942e96ba827aebf08dd253c866fec88beaa (diff)
Add package visualizations page
Why the hell not? Have fun clicking all the pretty buttons. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/public/index.html8
-rw-r--r--templates/visualize/index.html43
2 files changed, 47 insertions, 4 deletions
diff --git a/templates/public/index.html b/templates/public/index.html
index bea19e0f..b63876ac 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -26,10 +26,10 @@
<p>Our strong community is diverse and helpful, and we pride ourselves
on the range of skillsets and uses for Arch that stem from it. Please
- check out our <a href="https://bbs.archlinux.org" title="Arch Forums">forums</a>
+ check out our <a href="https://bbs.archlinux.org/" title="Arch Forums">forums</a>
and <a href="http://mailman.archlinux.org/mailman/listinfo/"
title="Arch Mailing Lists">mailing lists</a>
- to get your feet wet. Also glance through our <a href="https://wiki.archlinux.org"
+ to get your feet wet. Also glance through our <a href="https://wiki.archlinux.org/"
title="Arch Wiki">wiki</a>
if you want to learn more about Arch.</p>
@@ -174,8 +174,8 @@
title="View/search the package repository database">Packages</a></li>
<li><a href="/groups/"
title="View the available package groups">Package Groups</a></li>
- <li><a href="https://bugs.archlinux.org/"
- title="Report/track bugs or make feature requests">Bug Tracker</a></li>
+ <li><a href="{% url visualize-index %}"
+ title="View visualizations">Visualizations</a></li>
<li><a href="{% url page-svn %}"
title="View SVN entries for packages">SVN Repositories</a></li>
<li><a href="http://projects.archlinux.org/"
diff --git a/templates/visualize/index.html b/templates/visualize/index.html
new file mode 100644
index 00000000..99525e69
--- /dev/null
+++ b/templates/visualize/index.html
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+
+{% block title %}Arch Linux - Visualizations{% endblock %}
+
+{% block content %}
+<div class="box">
+
+ <h2>Visualizations of Packaging Data</h2>
+
+ <h3>Package Treemap</h3>
+
+ <div class="visualize-buttons">
+ <div>
+ <span>Scale Using:</span>
+ <button id="visualize-archrepo-count" class="visualize-archrepo-scaleby active">Package Count</button>
+ <button id="visualize-archrepo-flagged" class="visualize-archrepo-scaleby">Flagged</button>
+ <button id="visualize-archrepo-csize" class="visualize-archrepo-scaleby">Compressed Size</button>
+ <button id="visualize-archrepo-isize" class="visualize-archrepo-scaleby">Installed Size</button>
+ </div>
+ <div>
+ <span>Group By:</span>
+ <button id="visualize-archrepo-repo" class="visualize-archrepo-groupby active">Repository</button>
+ <button id="visualize-archrepo-arch" class="visualize-archrepo-groupby">Architecture</button>
+ </div>
+ </div>
+ <div id="visualize-archrepo" class="visualize-chart"></div>
+</div>
+
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/d3.min.js"></script>
+<script type="text/javascript" src="/media/d3.layout.min.js"></script>
+<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="/media/visualize.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ var orderings = {
+ "repo": { url: "{% url visualize-byrepo %}", color_attr: "repo" },
+ "arch": { url: "{% url visualize-byarch %}", color_attr: "arch" },
+ };
+ packages_treemap("#visualize-archrepo", orderings, "repo");
+});
+</script>
+{% endblock %}