summaryrefslogtreecommitdiff
path: root/templates/public/index.html
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-22 00:36:57 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-22 00:36:57 -0400
commitdf7a6aa620af6a165bdacd755757f8cb1179331c (patch)
tree384b4c62d1f50d8effb733d81d2a810666807624 /templates/public/index.html
parent94f972bb892dbf9a86f089f1872ae6d849c0cd0e (diff)
parenta22557811a24b68ef85d4271787c48d8d1e4fc99 (diff)
Merge branch 'archweb-generic2'
Conflicts: README.BRANDING local_settings.py.example packages/templatetags/package_extras.py public/views.py releng/views.py settings.py sitestatic/archnavbar/archnavbar.css sitestatic/silhouette.png templates/base.html templates/packages/differences.html templates/packages/opensearch.xml templates/packages/search.html templates/public/donate.html templates/public/download.html templates/public/feeds.html templates/public/index.html urls.py
Diffstat (limited to 'templates/public/index.html')
-rw-r--r--templates/public/index.html80
1 files changed, 53 insertions, 27 deletions
diff --git a/templates/public/index.html b/templates/public/index.html
index ef8f2d69..40d887b7 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -1,6 +1,5 @@
{% extends "base.html" %}
-{% load markup cache %}
-{% load url from future %}
+{% load cache %}
{% load static from staticfiles %}
{% load wiki %}
@@ -45,19 +44,17 @@
<a href="/feeds/news/" title="{{ BRANDING_SHORTNAME }} News RSS Feed"
class="rss-icon"><img width="16" height="16" src="{% static "rss.png" %}" alt="RSS Feed" /></a>
- {% for news in news_updates %}
- {% if forloop.counter0 < 5 %}
+ {% for news in news_updates %}{% if forloop.counter0 < 5 %}
<h4>
<a href="{{ news.get_absolute_url }}"
title="View full article: {{ news.title }}">{{ news.title }}</a>
</h4>
<p class="timestamp">{{ news.postdate|date }}</p>
<div class="article-content">
- {% if forloop.counter0 == 0 %}{{ news.content|markdown|truncatewords_html:300 }}
- {% else %}{{ news.content|markdown|truncatewords_html:100 }}{% endif %}
+ {% if forloop.counter0 == 0 %}{{ news.html|truncatewords_html:300 }}
+ {% else %}{{ news.html|truncatewords_html:100 }}{% endif %}
</div>
- {% else %}
- {% if forloop.counter0 == 5 %}
+ {% else %}{% if forloop.counter0 == 5 %}
<h3>
<a href="{% url 'news-list' %}"
title="Browse the news archives">Older News</a>
@@ -70,17 +67,14 @@
<a href="{{ news.get_absolute_url }}"
title="View full article: {{ news.title }}">{{ news.title }}</a>
</dd>
- {% if forloop.last %}
- </dl>
- {% endif %}
- {% endif %}
- {% endfor %}
+ {% if forloop.last %}</dl>{% endif %}
+ {% endif %}{% endfor %}
</div>
{% endcache %}
{% endblock %}
{% block content_right %}
-{% cache 59 main-page-right secure %}
+{% cache 59 main-page-updates user.is_authenticated %}
<div id="pkgsearch" class="widget">
<form id="pkgsearch-form" method="get" action="/packages/">
<fieldset>
@@ -88,7 +82,6 @@
<input id="pkgsearch-field" type="text" name="q" size="18" maxlength="200" />
</fieldset>
</form>
-
</div>
<div id="pkg-updates" class="widget box">
@@ -110,7 +103,9 @@
{% endfor %}
</table>
</div>
+{% endcache %}
+{% cache 59 main-page-right secure %}
<div id="nav-sidebar" class="widget">
<h4>Documentation</h4>
@@ -148,11 +143,12 @@
<ul>
<li><a href="{% url 'mirrorlist' %}"
title="Get a custom mirrorlist from our database">Mirrorlist Updater</a></li>
+ <li><a href="{% url 'mirror-list' %}"
+ title="See a listing of all available mirrors">Mirror List</a></li>
<li><a href="{% url 'mirror-status' %}"
title="Check the status of all known mirrors">Mirror Status</a></li>
- <li><a href="/packages/differences/"
- title="See differences in packages between available architectures">Differences Reports</a>
- <img width="16" height="16" src="{% static "new.png" %}" alt="New"/></li>
+ <li><a href="{% url 'packages-differences' %}"
+ title="See differences in packages between available architectures">Differences Reports</a></li>
</ul>
<h4>Development</h4>
@@ -168,21 +164,17 @@
{% endcomment %}
<li><a href="/groups/"
title="View the available package groups">Package Groups</a></li>
- <li><a href="/todolists/"
+ <li><a href="/todo/"
title="Hacker Todo Lists">Todo Lists</a></li>
- <li><a href="{% url 'releng-test-overview' %}"
- title="Releng Testbuild Feedback">Releng Testbuild Feedback</a></li>
<li><a href="{% url 'visualize-index' %}"
- title="View visualizations">Visualizations</a>
- <img width="16" height="16" src="{% static "new.png" %}" alt="New"/></li>
+ title="View visualizations">Visualizations</a></li>
</ul>
<h4>More Resources</h4>
<ul>
<li><a href="{% url 'page-keys' %}"
- title="Package/Database signing master keys">Signing Master Keys</a>
- <img width="16" height="16" src="{% static "new.png" %}" alt="New"/></li>
+ title="Package/Database signing master keys">Signing Master Keys</a></li>
<li><a href="{% wiki_url 'Media' %}"
title="{{ BRANDING_DISTRONAME }} in the media">Press Coverage</a></li>
<li><a href="{% url 'page-art' %}" title="{{ BRANDING_SHORTNAME }} logos and other artwork for promotional use">Logos &amp; Artwork</a></li>
@@ -201,7 +193,6 @@ donate button would go here
{% endcomment %}
<div id="arch-sponsors" class="widget">
-
<a href="http://gnuchile.cl">
<img src="{% static "gnuchile.png" %}"
alt="GNU Chile - Donates the .org domain"
@@ -223,7 +214,42 @@ donate button would go here
alt="Freedom Included - Donated Lemote Yeeloongs to port Parabola to the MIPS architecture"
title="Freedom Included - Donated Lemote Yeeloongs to port Parabola to the MIPS architecture" />
</a>
-
</div>
{% endcache %}
{% endblock %}
+
+{% block script_block %}
+<div id="konami" style="display:none;"></div>
+
+{% load cdn %}{% jquery %}
+<script type="text/javascript">
+function setupTypeahead() {
+ $('#pkgsearch-field').typeahead({
+ source: function(query, callback) {
+ $.getJSON('/opensearch/packages/suggest', {q: query}, function(data) {
+ callback(data[1]);
+ });
+ },
+ matcher: function(item) { return true; },
+ sorter: function(items) { return items; },
+ menu: '<ul class="pkgsearch-typeahead"></ul>',
+ items: 10
+ }).attr('autocomplete', 'off');
+}
+function setupKonami() {
+ var konami = new Konami(function() {
+ $('#konami').html('<img src="{% static "vector_tux.png" %}" alt=""/>');
+ setTimeout(function() {
+ $('#konami').fadeIn(500);
+ }, 500);
+ $('#konami').click(function() {
+ $('#konami').fadeOut(500);
+ });
+ });
+}
+$(document).ready(function() {
+ $.ajax({ url: "{% static "bootstrap-typeahead.min.js" %}", cache: true, dataType: "script", success: setupTypeahead });
+ $.ajax({ url: "{% static "konami.min.js" %}", cache: true, dataType: "script", success: setupKonami });
+});
+</script>
+{% endblock %}