Source

neorg / neorg / templates / layout.html

Full commit
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>
      {%- block title_prefix %}{% endblock -%}
      {%- if title -%}
          {%- block title_normal -%}
              {{ title }}
          {%- endblock %}
      {%- else -%}
          {%- block title_root -%}
              {{ "<root page>" }}
          {%- endblock %}
      {%- endif %} | NEOrg</title>
    <link rel="stylesheet type=text/css"
          href="{{ url_for('static', filename='html4css1.css') }}" />
    <link rel="stylesheet type=text/css"
          href="{{ url_for('static', filename='style.css') }}" />
    <link rel="shortcut icon"
          href="{{ url_for('favicon') }}" />
    <link rel="stylesheet type=text/css"
          href="{{ url_for('static', filename='jslib/colorbox/colorbox.css') }}" />
    <script src="{{ url_for('static', filename='jslib/jquery-1.6.4.min.js') }}"></script>
    <script src="{{ url_for('static', filename='jslib/jquery.colorbox-min.js') }}"></script>
    <script src="{{ url_for('static', filename='jslib/jquery.hotkeys.js') }}"></script>
    <script src="{{ url_for('static', filename='neorg.js') }}"></script>
  </head>
  <body{% if temp_path %} class="gene"{% endif %}>
    <div class="page">
      <div class="search-box">
        <form action="{{ url_for('search_results') }}"
              method="get" class="search-form">
          <input type="text" name="q" value="{{ search_query }}" />
          <input type="submit" value="Search" />
        </form>
        <div style="clear: both;"> </div>
      </div>
      {% macro menu() %}
      <div class="page-menu">
        <div class="page-path">
          <a href="/">NEOrg::</a>/
          {%- if page_path -%}
          {%- set page_path_as_list = page_path.split('/') -%}
          {%- for p in page_path_as_list -%}
          <a href="/{{ '/'.join(page_path_as_list[:loop.index]) }}">
            {{- p -}}
          </a>/
          {%- endfor %}
          {% endif %}
          {% if temp_path %}
          (generated)
          {% endif %}
        </div>
        <div class="page-actions">
          <a href="{{ url_for('help', filename='index.html') }}">Help</a> |
          <a href="{{ url_for('history', page_path=page_path) }}">History</a> |
          <a href="{{ url_for('descendants', page_path=page_path) }}">Descendants</a> |
          {% if temp_path %}
          <a href="{{ url_for('edit', page_path=temp_path) }}">Edit Template</a>
          {% else %}
          <a href="{{ url_for('edit', page_path=page_path) }}">Edit</a>
          {% endif %}
        </div>
        <div style="clear: both;"> </div>
      </div>
      {% endmacro %}
      {{ menu() }}
      <div class="contents">
        {% for message in get_flashed_messages() %}
        <div class="flash">{{ message }}</div>
        {% endfor %}
        {% block body %}{% endblock %}
      </div>
      {{ menu() }}
    </div>
  <script type='text/javascript'>
    neorgInit();
  </script>
  </body>
</html>