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.

105 lines
4.7 KiB

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