github.com/jancarloviray/community@v0.41.1-0.20170124221257-33a66c87cf2f/app/public/codemirror/mode/django/index.html (about)

     1  <!doctype html>
     2  
     3  <title>CodeMirror: Django template mode</title>
     4  <meta charset="utf-8"/>
     5  <link rel=stylesheet href="../../doc/docs.css">
     6  
     7  <link rel="stylesheet" href="../../lib/codemirror.css">
     8  <link rel="stylesheet" href="../../theme/mdn-like.css">
     9  <script src="../../lib/codemirror.js"></script>
    10  <script src="../../addon/mode/overlay.js"></script>
    11  <script src="../xml/xml.js"></script>
    12  <script src="../htmlmixed/htmlmixed.js"></script>
    13  <script src="django.js"></script>
    14  <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
    15  <div id=nav>
    16    <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
    17  
    18    <ul>
    19      <li><a href="../../index.html">Home</a>
    20      <li><a href="../../doc/manual.html">Manual</a>
    21      <li><a href="https://github.com/codemirror/codemirror">Code</a>
    22    </ul>
    23    <ul>
    24      <li><a href="../index.html">Language modes</a>
    25      <li><a class=active href="#">Django</a>
    26    </ul>
    27  </div>
    28  
    29  <article>
    30  <h2>Django template mode</h2>
    31  <form><textarea id="code" name="code">
    32  <!doctype html>
    33  <html>
    34    <head>
    35      <title>My Django web application</title>
    36    </head>
    37    <body>
    38      <h1>
    39        {{ page.title|capfirst }}
    40      </h1>
    41      <ul class="my-list">
    42        {# traverse a list of items and produce links to their views. #}
    43        {% for item in items %}
    44        <li>
    45          <a href="{% url 'item_view' item.name|slugify %}">
    46            {{ item.name }}
    47          </a>
    48        </li>
    49        {% empty %}
    50        <li>You have no items in your list.</li>
    51        {% endfor %}
    52      </ul>
    53      {% comment "this is a forgotten footer" %}
    54      <footer></footer>
    55      {% endcomment %}
    56    </body>
    57  </html>
    58  </textarea></form>
    59  
    60      <script>
    61        var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
    62          lineNumbers: true,
    63          mode: "django",
    64          indentUnit: 2,
    65          indentWithTabs: true,
    66          theme: "mdn-like"
    67        });
    68      </script>
    69  
    70      <p>Mode for HTML with embedded Django template markup.</p>
    71  
    72      <p><strong>MIME types defined:</strong> <code>text/x-django</code></p>
    73    </article>