Permalink
Browse files

the javascript, it actually works

  • Loading branch information...
1 parent 11697c5 commit fe90cfe1eb3d0978b99c3cfdc270538c8b29cd52 @samanpwbb committed Dec 30, 2012
Showing with 91 additions and 3 deletions.
  1. +85 −3 _layouts/drawings.html
  2. +6 −0 _posts/0300-01-09-trythisagain.md
  3. BIN img/trythisagain/trythisagain-1.jpg
  4. BIN img/trythisagain/trythisagain-10.jpg
  5. BIN img/trythisagain/trythisagain-11.jpg
  6. BIN img/trythisagain/trythisagain-12.jpg
  7. BIN img/trythisagain/trythisagain-13.jpg
  8. BIN img/trythisagain/trythisagain-14.jpg
  9. BIN img/trythisagain/trythisagain-15.jpg
  10. BIN img/trythisagain/trythisagain-16.jpg
  11. BIN img/trythisagain/trythisagain-17.jpg
  12. BIN img/trythisagain/trythisagain-18.jpg
  13. BIN img/trythisagain/trythisagain-19.jpg
  14. BIN img/trythisagain/trythisagain-2.jpg
  15. BIN img/trythisagain/trythisagain-20.jpg
  16. BIN img/trythisagain/trythisagain-21.jpg
  17. BIN img/trythisagain/trythisagain-22.jpg
  18. BIN img/trythisagain/trythisagain-23.jpg
  19. BIN img/trythisagain/trythisagain-24.jpg
  20. BIN img/trythisagain/trythisagain-25.jpg
  21. BIN img/trythisagain/trythisagain-26.jpg
  22. BIN img/trythisagain/trythisagain-27.jpg
  23. BIN img/trythisagain/trythisagain-28.jpg
  24. BIN img/trythisagain/trythisagain-29.jpg
  25. BIN img/trythisagain/trythisagain-3.jpg
  26. BIN img/trythisagain/trythisagain-30.jpg
  27. BIN img/trythisagain/trythisagain-31.jpg
  28. BIN img/trythisagain/trythisagain-32.jpg
  29. BIN img/trythisagain/trythisagain-33.jpg
  30. BIN img/trythisagain/trythisagain-34.jpg
  31. BIN img/trythisagain/trythisagain-35.jpg
  32. BIN img/trythisagain/trythisagain-36.jpg
  33. BIN img/trythisagain/trythisagain-37.jpg
  34. BIN img/trythisagain/trythisagain-38.jpg
  35. BIN img/trythisagain/trythisagain-39.jpg
  36. BIN img/trythisagain/trythisagain-4.jpg
  37. BIN img/trythisagain/trythisagain-40.jpg
  38. BIN img/trythisagain/trythisagain-41.jpg
  39. BIN img/trythisagain/trythisagain-42.jpg
  40. BIN img/trythisagain/trythisagain-43.jpg
  41. BIN img/trythisagain/trythisagain-44.jpg
  42. BIN img/trythisagain/trythisagain-45.jpg
  43. BIN img/trythisagain/trythisagain-46.jpg
  44. BIN img/trythisagain/trythisagain-47.jpg
  45. BIN img/trythisagain/trythisagain-48.jpg
  46. BIN img/trythisagain/trythisagain-49.jpg
  47. BIN img/trythisagain/trythisagain-5.jpg
  48. BIN img/trythisagain/trythisagain-50.jpg
  49. BIN img/trythisagain/trythisagain-6.jpg
  50. BIN img/trythisagain/trythisagain-7.jpg
  51. BIN img/trythisagain/trythisagain-8.jpg
  52. BIN img/trythisagain/trythisagain-9.jpg
View
@@ -25,7 +25,89 @@
</ul>
<ul class='images'>
- {% for i in (1..page.number) %}
- <li><img id='image-{{i}}' src="{{site.baseurl}}/img/{{page.title | downcase | remove: ' '}}/{{page.title | downcase | remove: ' ' }}-{{i}}.jpg" /></li>
- {% endfor %}
+ {% if page.title != "try this again" %}
+ {% for i in (1..page.number) %}
+ <li><img id='image-{{i}}' src="{{site.baseurl}}/img/{{page.title | downcase | remove: ' '}}/{{page.title | downcase | remove: ' ' }}-{{i}}.jpg" /></li>
+ {% endfor %}
+ {% else %}
+<script type="text/javascript">
+
+ // Most noob array ever, I know
+ var images = [
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
+ '10',
+ '11',
+ '12',
+ '13',
+ '14',
+ '15',
+ '16',
+ '17',
+ '18',
+ '19',
+ '20',
+ '21',
+ '22',
+ '23',
+ '24',
+ '25',
+ '26',
+ '27',
+ '28',
+ '29',
+ '30',
+ '31',
+ '32',
+ '33',
+ '34',
+ '35',
+ '36',
+ '37',
+ '38',
+ '39',
+ '40',
+ '41',
+ '42',
+ '43',
+ '44',
+ '45',
+ '46',
+ '47',
+ '48',
+ '49',
+ '50'
+ ];
+
+ // Shuffle stuff in the array
+ var shuffleThings = function shuffle(array) {
+ var tmp, current, top = array.length;
+
+ if(top) while(--top) {
+ current = Math.floor(Math.random() * (top + 1));
+ tmp = array[current];
+ array[current] = array[top];
+ array[top] = tmp;
+ }
+ return array;
+ };
+
+ // Call the shuffle function
+ shuffleThings(images);
+
+ // Loop over stuff in the array
+ for (var i=0;i<images.length;i++) {
+ document.write("<li>" + "<img src='/img/trythisagain/trythisagain-" + images[i] + ".jpg' /></li>");
+ };
+
+</script>
+
+{% endif %}
</ul>
@@ -0,0 +1,6 @@
+---
+layout: drawings
+category: series
+number: 50
+title: try this again
+---
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

0 comments on commit fe90cfe

Please sign in to comment.