diff options
author | Dan McGee <dan@archlinux.org> | 2013-01-16 05:59:13 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-01-16 06:17:40 +0100 |
commit | 131d238ae38034c3df0ab1dbc307773ac6a38442 (patch) | |
tree | 5ac6a206c449b4c6524720ac00dcadb6eaa3f956 | |
parent | 8eaa63b2976e697cd2e6adca43f5d6d9cf7a8eda (diff) | |
download | archweb-131d238ae38034c3df0ab1dbc307773ac6a38442.tar.gz archweb-131d238ae38034c3df0ab1dbc307773ac6a38442.tar.xz |
Add a little easter egg for people to find
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | sitestatic/archweb.css | 11 | ||||
-rw-r--r-- | sitestatic/konami.pack.js | 1 | ||||
-rw-r--r-- | sitestatic/vector_tux.png | bin | 0 -> 165926 bytes | |||
-rw-r--r-- | templates/base.html | 1 | ||||
-rw-r--r-- | templates/public/index.html | 16 |
5 files changed, 29 insertions, 0 deletions
diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index 149f2b4..f43bba1 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -599,6 +599,17 @@ div.widget { margin-bottom: 1.5em; } +/* home: other stuff */ +#konami { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + text-align: center; + opacity: 0.6; +} + /* feeds page */ #rss-feeds .rss { padding-right: 20px; diff --git a/sitestatic/konami.pack.js b/sitestatic/konami.pack.js new file mode 100644 index 0000000..bff279f --- /dev/null +++ b/sitestatic/konami.pack.js @@ -0,0 +1 @@ +(function(){"use strict";var a=Function("return this")(),b=function(){var a={addEvent:function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&(a["e"+b+c]=c,a[b+c]=function(){a["e"+b+c](window.event,d)},a.attachEvent("on"+b,a[b+c]))},input:"",pattern:"3838404037393739666513",load:function(b){this.addEvent(document,"keydown",function(c,d){return d&&(a=d),a.input+=c?c.keyCode:event.keyCode,a.input.length>a.pattern.length&&(a.input=a.input.substr(a.input.length-a.pattern.length)),a.input==a.pattern?(a.code(b),a.input="",void 0):void 0},this),this.iphone.load(b)},code:function(a){window.location=a},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(b){a.code(b)},load:function(b){this.orig_keys=this.keys,a.addEvent(document,"touchmove",function(b){if(1==b.touches.length&&1==a.iphone.capture){var c=b.touches[0];a.iphone.stop_x=c.pageX,a.iphone.stop_y=c.pageY,a.iphone.tap=!1,a.iphone.capture=!1,a.iphone.check_direction()}}),a.addEvent(document,"touchend",function(){1==a.iphone.tap&&a.iphone.check_direction(b)},!1),a.addEvent(document,"touchstart",function(b){a.iphone.start_x=b.changedTouches[0].pageX,a.iphone.start_y=b.changedTouches[0].pageY,a.iphone.tap=!0,a.iphone.capture=!0})},check_direction:function(a){x_magnitude=Math.abs(this.start_x-this.stop_x),y_magnitude=Math.abs(this.start_y-this.stop_y),x=0>this.start_x-this.stop_x?"RIGHT":"LEFT",y=0>this.start_y-this.stop_y?"DOWN":"UP",result=x_magnitude>y_magnitude?x:y,result=1==this.tap?"TAP":result,result==this.keys[0]&&(this.keys=this.keys.slice(1,this.keys.length)),0==this.keys.length&&(this.keys=this.orig_keys,this.code(a))}}};return a};"undefined"!=typeof module?module.exports=b:a.Konami=b})(); diff --git a/sitestatic/vector_tux.png b/sitestatic/vector_tux.png Binary files differnew file mode 100644 index 0000000..ab4be6d --- /dev/null +++ b/sitestatic/vector_tux.png diff --git a/templates/base.html b/templates/base.html index a7ebc7d..c6aa3f1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -68,6 +68,7 @@ {% block content_right %}{% endblock %} </div> {% endblock %} + {% block content_after %}{% endblock %} <div id="footer"> <p>Copyright © 2002-{% now "Y" %} <a href="mailto:jvinet@zeroflux.org" title="Contact Judd Vinet">Judd Vinet</a> and <a href="mailto:aaron@archlinux.org" diff --git a/templates/public/index.html b/templates/public/index.html index 0be4f18..abf16af 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -211,9 +211,14 @@ </a> </div> {% endcache %} +{% endblock %} + +{% block content_after %} +<div id="konami" style="display:none;"></div> {% load cdn %}{% jquery %} <script type="text/javascript" src="{% static "bootstrap-typeahead.min.js" %}"></script> +<script type="text/javascript" src="{% static "konami.pack.js" %}"></script> <script type="text/javascript"> $(document).ready(function() { $('#pkgsearch-field').typeahead({ @@ -228,5 +233,16 @@ $(document).ready(function() { items: 10 }).attr('autocomplete', 'off'); }); +$(document).ready(function() { + var konami = new Konami(); + konami.code = function() { + $('#konami').html('<img src="{% static "vector_tux.png" %}" alt=""/>'); + setTimeout(function() { + $('#konami').fadeIn(500); + }, 500); + }; + konami.iphone.code = konami.code; + konami.load(); +}); </script> {% endblock %} |