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.

104 lines
4.6 KiB

4 years ago
  1. {% set navigation_bar = [
  2. ('/', 'index', 'Home'),
  3. ('/handbook', 'handbook', 'Handbook'),
  4. ('/worldmap', 'worldmap', 'Maps'),
  5. ('.header', 'generate', 'Generate'),
  6. ('.header', 'other', 'Other'),
  7. ('/npc/spells', 'spells', 'Spells'),
  8. ('/quest/list', 'questlist', 'Quests'),
  9. ('/wiki', 'wiki', 'Wiki'),
  10. ] %}
  11. {% set generation_bar = [
  12. ('/npc/party', 'npcparty', 'NPC Party'),
  13. ('/npc/single', 'npcsingle', 'Single NPC'),
  14. ('http://autarch.co/treasure', 'treasure', 'Treasure'),
  15. ] %}
  16. {% set active_page = active_page|default('index') %}
  17. <!doctype html>
  18. <html>
  19. <head>
  20. <title>{% block title %}{% endblock %} - Palisma ACKS</title>
  21. <meta charset="utf-8">
  22. <meta name="viewport" contents="width=device-width, initial-scale=1">
  23. <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
  24. <!-- UIkit CSS -->
  25. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.2.4/dist/css/uikit.min.css" />
  26. <!-- UIkit JS -->
  27. <script src="https://cdn.jsdelivr.net/npm/uikit@3.2.4/dist/js/uikit.min.js"></script>
  28. <script src="https://cdn.jsdelivr.net/npm/uikit@3.2.4/dist/js/uikit-icons.min.js"></script>
  29. {% block head %} {% endblock %}
  30. </head>
  31. <body>
  32. <nav class="uk-navbar-container" uk-navbar>
  33. <div class="uk-navbar-left">
  34. <a href="" class="uk-hidden@m uk-button-default uk-margin-small-left uk-margin-small-right" uk-toggle="target: #offcanvas-nav" uk-icon="menu"></a>
  35. <a href="" class="uk-navbar-item uk-logo">Palisma ACKS</a>
  36. </div>
  37. <div class="uk-navbar-center uk-visible@m">
  38. <ul class="uk-navbar-nav">
  39. {% for href, id, label in navigation_bar %}
  40. <li {% if id == active_page %} class="uk-active" {% endif %}>
  41. {% if id == 'generate' %}
  42. <a href="">{{ label |e }}</a>
  43. <div class="uk-navbar-dropdown">
  44. <ul class="uk-nav uk-navbar-dropdown-nav">
  45. {% for ghref, gid, glabel in generation_bar %}
  46. <li>
  47. <a href="{{ ghref | e }}" {% if gid == 'treasure' %}target="_blank"{% endif %}>
  48. {{ glabel|e }}
  49. </a>
  50. </li>
  51. {% endfor %}
  52. </ul>
  53. </div>
  54. {% else %}
  55. {% if href != '.header' %}
  56. <a href="{{ href|e }}">{{ label|e }}</a>
  57. {% endif %}
  58. {% endif %}
  59. </li>
  60. {% endfor %}
  61. </ul>
  62. </div>
  63. </nav>
  64. <div id="offcanvas-nav" uk-offcanvas="overlay: true">
  65. <div class="uk-offcanvas-bar uk-flex uk-flex-column">
  66. <ul class="uk-nav uk-nav-primary uk-nav-center uk-margin-auto-vertical">
  67. {% for href, id, label in navigation_bar %}
  68. {% if href == '.header' %}
  69. <li class="uk-nav-header">{{ label|e }}</li>
  70. {% if id == 'generate' %}
  71. {% for ghref, gid, glabel in generation_bar %}
  72. <li {% if gid == active_page %} class="uk-active" {% endif %}>
  73. <a href="{{ ghref | e }}" {% if gid == 'treasure' %}target="_blank"{% endif %}>
  74. {{ glabel|e }}
  75. </a>
  76. </li>
  77. {% endfor %}
  78. {% endif %}
  79. {% else %}
  80. <li {% if id == active_page %} class="uk-active" {% endif %}>
  81. <a href="{{ href|e }}">{{ label|e }}</a>
  82. </li>
  83. {% endif %}
  84. {% endfor %}
  85. </ul>
  86. </div>
  87. </div>
  88. <div class="uk-container uk-margin-medium-top">
  89. {% block content %}{% endblock %}
  90. </div>
  91. <footer class="uk-flex uk-flex-top uk-flex-center uk-margin-small uk-margin-medium-top">
  92. <div class="uk-text-center uk-text-small">
  93. Made by <a href="https://binaryatrocity.name">binaryatrocity</a>.
  94. ACKS &amp; related &copy; <a href="http://www.autarch.co/">Autarch</a>.
  95. </div>
  96. </footer>
  97. </body>
  98. </html>