Permalink
Browse files

bugfix or something

  • Loading branch information...
1 parent 1fbc431 commit 6a45b186fa08222442f0fec562aeb5da36eb67d7 @fangeugene fangeugene committed Mar 25, 2015
Showing with 13 additions and 0 deletions.
  1. +11 −0 static/javascript/tba_js/tba.js
  2. +2 −0 templates/team_partials/team_info.html
@@ -63,4 +63,15 @@ $(document).ready(function(){
$(this).css('display', 'inline');
}
});
+
+ // For 4/1
+ var today = new Date();
+ var dd = today.getDate();
+ var mm = today.getMonth() + 1;
+ if (dd == 1 && mm == 4) {
+ var urls = ['http://i.imgur.com/hGmvG8L.jpg', 'http://i.imgur.com/bC3gvxa.jpg', 'http://i.imgur.com/8lLN9jB.jpg', 'http://i.imgur.com/qiRHQtB.jpg', 'http://i.imgur.com/zWyyZ2N.jpg', 'http://i.imgur.com/ZUcX3Hw.jpg'];
+ var randInt = Math.floor(Math.random() * 6);
+ var url = urls[randInt];
+ $("#robot-image").html('<div class="thumbnail carousel team-media-carousel"><a href="' + url + '" target="_blank"><img src="' + url + '" alt="April Fools!"></a></div>');
+ }
});
@@ -50,13 +50,15 @@ <h3 class="panel-title">
</div>
</div>
{% else %}
+ <div id="robot-image">
{% if medias_by_slugname.cdphotothread %}
{% include "media_partials/image_carousel_partial.html" %}
{% else %}
{% if year %}
<a class="btn btn-lg btn-success btn-block" href="/suggest/team/media?team_key={{team.key_name}}&year={{year}}" target="_blank"><span class="glyphicon glyphicon-plus"></span> Add robot image!</a>
{% endif %}
{% endif %}
+ </div>
{% endif %}
</div>
</div>

0 comments on commit 6a45b18

Please sign in to comment.