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.

85 lines
2.3 KiB

  1. {% extends "base.html" %}
  2. {% set active_page = "treasure" %}
  3. {% set treasure_letters = [
  4. ("A", "Incidental 275gp"),
  5. ("B", "Hoarder 500gp"),
  6. ("C", "Incidental 700gp"),
  7. ("D", "Hoarder 1,000gp"),
  8. ("E", "Raider 1,250gp"),
  9. ("F", "Incidental 1,500gp"),
  10. ("G", "Raider 2,000gp"),
  11. ("H", "Hoarder 2,500gp"),
  12. ("I", "Incidental 3,250gp"),
  13. ("J", "Raider 4,000gp"),
  14. ("K", "Incidental 5,000gp"),
  15. ("L", "Raider 6,000gp"),
  16. ("M", "Incidental 8,000gp"),
  17. ("N", "Hoarder 9,000gp"),
  18. ("O", "Raider 12,000gp"),
  19. ("P", "Incidental 17,000gp"),
  20. ("Q", "Hoarder 22,000gp"),
  21. ("R", "Hoarder 45,000gp"),
  22. ] %}
  23. {% block title %}ACKS Treasure Generator{% endblock %}
  24. {% block content %}
  25. <div class="uk-flex uk-flex-center uk-margin-bottom uk-margin-top">
  26. <h1 class="uk-text-center"><strong>Legends of Palisma</strong>Treasure Generator</h1>
  27. </div>
  28. <div id="frame-container">
  29. <iframe id="treasure-frame" src="http://autarch.co/treasure"/>
  30. </div>
  31. <!--
  32. <div class="uk-flex uk-flex-bottom uk-flex-center uk-margin-large-bottom">
  33. <div>
  34. <label for="treasure-type" class="uk-form-label">Select Treasure Type</label>
  35. <select id="treasure-type" class="uk-select">
  36. <option value="">Please select one</option>
  37. {% for v, l in treasure_letters %}
  38. <option value="{{ v }}" {% if treasure_type == v %} selected="true" {% endif %}>{{ v }} ({{ l }})</option>
  39. {% endfor %}
  40. </select>
  41. </div>
  42. <div class="uk-margin-left">
  43. <button class="uk-button uk-button-primary" onclick="generateTreasure();">Generate</button>
  44. </div>
  45. </div>
  46. {% if generated_treasure %}
  47. <div class="uk-flex uk-flex-bottom uk-flex-center uk-margin-large-bottom">
  48. <div id="treasure-content">
  49. {{ generated_treasure|safe }}
  50. </div>
  51. </div>
  52. {% endif %}
  53. -->
  54. {% endblock %}
  55. {% block head %}
  56. <style>
  57. #frame-container {
  58. display: flex;
  59. width: 100%;
  60. height: 85vh;
  61. flex-direction: column:
  62. }
  63. #treasure-frame {
  64. flex-grow: 1;
  65. border: none;
  66. margin: 0;
  67. padding: 0;
  68. }
  69. h1 strong {
  70. display: block;
  71. font-size: 50%;
  72. opacity: 0.65;
  73. }
  74. </style>
  75. <script>
  76. function generateTreasure() {
  77. var treasure_type = document.querySelector("select#treasure-type").value;
  78. window.location = "/treasure/" + treasure_type.toString();
  79. }
  80. </script>
  81. {% endblock %}