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.

122 lines
4.9 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. {% set player_bar = [
  2. ('/npc/spells', 'spells', 'Spells'),
  3. ('/worldmap', 'worldmap', 'Maps'),
  4. ('https://reddit.com/r/PalismaACKS/wiki', 'redditwiki', 'Wiki'),
  5. ] %}
  6. {% set judge_bar = [
  7. ('/lairs', 'lairs', 'Lairs'),
  8. ('http://autarch.co/treasure', 'treasure', 'Treasure'),
  9. ('/quest/list', 'questlist', 'Quests'),
  10. ('/npc/party', 'npcparty', 'Generate Party'),
  11. ('/npc/single', 'npcsingle', 'Generate NPC'),
  12. ('/wiki', 'wiki', 'Wiki'),
  13. ]%}
  14. {% set navigation_bar = [
  15. ('/', 'index', 'Home'),
  16. ('/handbook', 'handbook', 'Handbook'),
  17. (player_bar, 'section', 'Player Resources'),
  18. (judge_bar, 'section', 'Judge Resources'),
  19. ('https://reddit.com/r/PalismaACKS', 'subreddit', '/r/PalismaACKS'),
  20. ] %}
  21. {% set active_page = active_page|default('index') %}
  22. <!doctype html>
  23. <html>
  24. <head>
  25. <title>{% block title %}{% endblock %} - Palisma ACKS</title>
  26. <meta charset="utf-8">
  27. <meta name="viewport" contents="width=device-width, initial-scale=1">
  28. <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
  29. <!-- UIkit CSS -->
  30. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.2.4/dist/css/uikit.min.css" />
  31. <!-- UIkit JS -->
  32. <script src="https://cdn.jsdelivr.net/npm/uikit@3.2.4/dist/js/uikit.min.js"></script>
  33. <script src="https://cdn.jsdelivr.net/npm/uikit@3.2.4/dist/js/uikit-icons.min.js"></script>
  34. <style>
  35. h1 strong {
  36. display: block;
  37. font-size: 50%;
  38. opacity: 0.65;
  39. }
  40. .uk-navbar-nav > li > a {
  41. font-size: 1em;
  42. text-transform: none;
  43. }
  44. </style>
  45. {% block head %}
  46. {% endblock %}
  47. </head>
  48. <body>
  49. <nav class="uk-navbar-container" uk-navbar>
  50. <div class="uk-navbar-left">
  51. <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>
  52. <a href="" class="uk-navbar-item uk-logo">Palisma ACKS</a>
  53. </div>
  54. <div class="uk-navbar-center uk-visible@m">
  55. <ul class="uk-navbar-nav">
  56. {% for href, id, label in navigation_bar %}
  57. {% if id == 'section' %}
  58. <li>
  59. <a href="">{{ label|e }}</a>
  60. <div class="uk-navbar-dropdown">
  61. <ul class="uk-nav uk-navbar-dropdown-nav">
  62. {% for phref, pid, plabel in href %}
  63. <li>
  64. <a href="{{ phref|e }}">{{ plabel|e }}</a>
  65. </li>
  66. {% endfor %}
  67. </ul>
  68. </div>
  69. </li>
  70. {% else %}
  71. <li {% if id == active_page %} class="uk-active" {% endif %}>
  72. <a href="{{ href|e }}">{{ label|e }}</a>
  73. </li>
  74. {% endif %}
  75. {% endfor %}
  76. </ul>
  77. </div>
  78. </nav>
  79. <div id="offcanvas-nav" uk-offcanvas="overlay: true">
  80. <div class="uk-offcanvas-bar uk-flex uk-flex-column">
  81. <ul class="uk-nav uk-nav-primary uk-nav-center uk-margin-auto-vertical">
  82. {% for href, id, label in navigation_bar %}
  83. {% if id == 'section' %}
  84. <li class="uk-nav-header uk-margin-large-top">{{ label|e }}</li>
  85. {% for phref, pid, plabel in href %}
  86. <li {% if pid == active_page %} class="uk-active" {% endif %}>
  87. <a href="{{ phref|e }}">{{ plabel|e }}</a>
  88. </li>
  89. {% endfor %}
  90. <li class="uk-margin-large-bottom"/>
  91. {% else %}
  92. <li {% if id == active_page %} class="uk-active" {% endif %}>
  93. <a href="{{ href|e }}">{{ label|e }}</a>
  94. </li>
  95. {% endif %}
  96. {% endfor %}
  97. </ul>
  98. </div>
  99. </div>
  100. <div class="uk-container uk-margin-medium-top">
  101. {% block content %}{% endblock %}
  102. </div>
  103. <footer class="uk-flex uk-flex-top uk-flex-center uk-margin-small uk-margin-medium-top">
  104. <div class="uk-text-center uk-text-small">
  105. Made by <a href="https://binaryatrocity.name">binaryatrocity</a>.
  106. ACKS &amp; related &copy; <a href="http://www.autarch.co/">Autarch</a>.
  107. </div>
  108. </footer>
  109. {% block scripts %}
  110. {% endblock %}
  111. </body>
  112. </html>