DotaNoobs main site.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
4.2 KiB

  1. {% extends "layout.html" %}
  2. {% block head %}
  3. <link rel="stylesheet" href="{{ url_for('static', filename='css/heropedia.css') }}" >
  4. {% endblock %}
  5. {% block title %} A-Z Challenge: {{ user.nickname }}{% endblock %}
  6. {% block content %}
  7. {% set taverns = heropedia() %}
  8. <h2 class="uk-text-center">{{ user.nickname }}'s A-Z Challenge</h2>
  9. <hr />
  10. <div class="uk-grid">
  11. <div class="uk-width-large-1-3 uk-width-medium-1-1 uk-panel uk-text-center uk-margin-bottom">
  12. <h3 class="uk-panel-title">Current Hero</h3>
  13. <h4 class="uk-text-bold uk-margin-remove">{{ user.random_hero['localized_name'] }}</h4>
  14. <img src="{{ url_for('static', filename=hero_image_large(user.random_hero)) }}" class="dn-hero-icon" />
  15. <p>
  16. <span id="heroes_completed">Heroes Completed: {{ user.random_heroes.completed | length }}</span><br/>
  17. <span id="heroes_left">Heroes Left: {{ total_hero_pool() - user.random_heroes.completed|length }}</span>
  18. </span>
  19. </p>
  20. {% if g.user and g.user.steamid == user.steamid %}
  21. <form action="{{ url_for('user_random_hero', userid=g.user.id) }}" method="post" id="random_form" class="uk-margin">
  22. <input type="checkbox" name="completed" id="completed_checkbox" style="display:none;">
  23. <input type="checkbox" name="skip" id="skip_checkbox" style="display:none;">
  24. <a class="uk-button uk-button-success" id="completed_button">Completed!</a>
  25. <a class="uk-button uk-button-primary" id="skip_button">Skip</a>
  26. </form>
  27. {% endif %}
  28. </div>
  29. <div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel uk-text-center uk-margin">
  30. <div class="uk-badge uk-panel-badge uk-badge-notification uk-badge-success">x1</div>
  31. <h3 class="uk-panel-title">Completed</h3>
  32. {% for hero in user.random_heroes.completed %}
  33. <img src="{{ url_for('static', filename=hero_image_small(hero)) }}" class="dn-hero-icon" />
  34. {% endfor %}
  35. <br/><br/>
  36. <br/><br/>
  37. </div>
  38. <div class="uk-width-large-2-3 uk-width-medium-1-1 uk-container-center">
  39. <ul class="uk-tab" data-uk-tab="{connect:'#taverns'}">
  40. <li class="uk-active"><a href="">Strength</a></li>
  41. <li><a href="">Agility</a></li>
  42. <li><a href="">Intelligence</a></li>
  43. </ul>
  44. <ul id="taverns" class="uk-switcher uk-margin">
  45. <li><div class="uk-panel tavern">
  46. <label id="tavernStrength">Strength</label>
  47. {% for hero in taverns[0][1] + taverns[3][1] %}
  48. <img class="{{hero['name'] in user.random_completed and 'filterUnmatchedHero' or 'filterMatchedHero' }}" id="{{ hero['name'] }}" src="{{ url_for('static', filename=hero_image_small(hero)) }}" />
  49. {% endfor %}
  50. </div></li>
  51. <li><div class="uk-panel tavern">
  52. <label id="tavernAgility">Agility</label>
  53. {% for hero in taverns[1][1] + taverns[4][1] %}
  54. <img class="{{hero['name'] in user.random_completed and 'filterUnmatchedHero' or 'filterMatchedHero' }}" id="{{ hero['name'] }}" src="{{ url_for('static', filename=hero_image_small(hero)) }}" />
  55. {% endfor %}
  56. </div> </li>
  57. <li><div class="uk-panel tavern">
  58. <label id="tavernIntelligence">Intelligence</label>
  59. {% for hero in taverns[2][1] + taverns[5][1] %}
  60. <img class="{{hero['name'] in user.random_completed and 'filterUnmatchedHero' or 'filterMatchedHero' }}" id="{{ hero['name'] }}" src="{{ url_for('static', filename=hero_image_small(hero)) }}" />
  61. {% endfor %}
  62. </div> </li>
  63. </ul>
  64. </div>
  65. </div>
  66. {% endblock %}
  67. {% if g.user and g.user.id == user.id %}
  68. {% block pagescripts %}
  69. <script>
  70. $(document).ready(function() {
  71. $('#completed_button').click( function() {
  72. $('#completed_checkbox').attr('checked', true);
  73. $('#random_form').submit();
  74. });
  75. $('#skip_button').click( function() {
  76. $('#skip_checkbox').attr('checked', true);
  77. $('#random_form').submit();
  78. });
  79. });
  80. </script>
  81. {% endblock %}
  82. {% endif %}