wikiarticle.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {% extends "base.html" %}
  2. {% block title %}{{ meta.title }} - {{ SITENAME }}{% endblock %}
  3. {% block head %}<script src="{{ SITEURL }}/theme/js/wiki.js"></script>{% endblock %}
  4. {% block banner %}{{ meta.title }}{% endblock banner %}
  5. {% block content %}
  6. <div class="article-content">
  7. <h1 class="article-title">{{ meta.title }}</h1>
  8. <nav><a class="wiki-nav-button">Expand Menu</a> / <a class="wiki-crumbs" href="{{ SITEURL }}/wiki/Home.html">Home</a>
  9. {% set total_path = SITEURL + "/wiki" %}
  10. {% for page, type in breadcrumbs %}
  11. {% set total_path = total_path + "/" + page %}
  12. {% if type == "a" %}
  13. / <a class="wiki-crumbs" href="{{ total_path }}">{{ page }}</a>
  14. {% elif type == "p" %}
  15. / <p class="wiki-crumbs">{{ page }}</p>
  16. {% endif %}
  17. {% endfor %}</nav>
  18. <nav class="wiki-nav">
  19. <ul class="wiki-links nodisplay">
  20. {% set vars = {'level': 0} %}
  21. {% for link in links %}
  22. {% if link[0] != "_Footer.md" %}
  23. {% set linklevel = link[2] %}
  24. {% if linklevel > vars.level %}
  25. {% if vars.update({'level':linklevel}) %} {% endif %}
  26. <ul class="nodisplay">
  27. {% elif linklevel < vars.level %}
  28. {% for i in range(vars.level - linklevel) %}
  29. </ul>
  30. {% endfor %}
  31. {% if vars.update({'level':linklevel}) %} {% endif %}
  32. {% endif %}
  33. {% if not loop.last %}
  34. {% if links[loop.index][2] > vars.level %}
  35. {% if link[1] == "indexdir" %}
  36. <li class="wiki-link"><a href="{{ SITEURL }}/wiki/{{ link[0].replace('.md','.html') }}">{{ link[0].replace('.md','') }}</a> <a class="wiki-dir-expander">+</a></li>
  37. {% else %}
  38. <li class="wiki-link">{{ link[0].replace('.md','') }} <a class="wiki-dir-expander">+</a></li>
  39. {% endif %}
  40. {% else %}
  41. <li class="wiki-link"><a href="{{ SITEURL }}/wiki/{{ link[0].replace('.md','.html') }}">{{ link[0].replace('.md','') }}</a></li>
  42. {% endif %}
  43. {% else %}
  44. <li class="wiki-link"><a href="{{ SITEURL }}/wiki/{{ link[0].replace('.md','.html') }}">{{ link[0].replace('.md','') }}</a></li>
  45. {% endif %}
  46. {% endif %}
  47. {% endfor %}
  48. </ul>
  49. </nav>
  50. {{ content }}
  51. <p>
  52. <a href="https://github.com/YOUR_USER/YOUR_REPO/wiki/{{ file.replace(".md","") }}/_edit">Edit page.</a><br>
  53. <a href="https://github.com/YOUR_USER/YOUR_REPO/wiki/_new">Add new page.</a>
  54. </p>
  55. </div>
  56. {% endblock %}