Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
5 lars 1
<!doctype html>
2
<title>CodeMirror: SLIM mode</title>
3
<meta charset="utf-8" />
4
<link rel=stylesheet href="../../doc/docs.css">
5
<link rel="stylesheet" href="../../lib/codemirror.css">
6
<link rel="stylesheet" href="../../theme/ambiance.css">
7
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
8
<script src="https://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
9
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
10
<script src="../../lib/codemirror.js"></script>
11
<script src="../xml/xml.js"></script>
12
<script src="../htmlembedded/htmlembedded.js"></script>
13
<script src="../htmlmixed/htmlmixed.js"></script>
14
<script src="../coffeescript/coffeescript.js"></script>
15
<script src="../javascript/javascript.js"></script>
16
<script src="../ruby/ruby.js"></script>
17
<script src="../markdown/markdown.js"></script>
18
<script src="slim.js"></script>
19
<style>
20
    .CodeMirror {
21
        background: #f8f8f8;
22
    }
23
</style>
24
<div id=nav>
25
    <a href="http://codemirror.net">
26
        <h1>CodeMirror</h1>
27
        <img id=logo src="../../doc/logo.png">
28
    </a>
29
    <ul>
30
        <li>
31
            <a href="../../index.html">Home</a>
32
            <li>
33
                <a href="../../doc/manual.html">Manual</a>
34
                <li>
35
                    <a href="https://github.com/codemirror/codemirror">Code</a>
36
    </ul>
37
    <ul>
38
        <li>
39
            <a href="../index.html">Language modes</a>
40
            <li>
41
                <a class=active href="#">SLIM</a>
42
    </ul>
43
</div>
44
<article>
45
    <h2>SLIM mode</h2>
46
    <form>
47
        <textarea id="code" name="code"> body table - for user in users td id="user_#{user.id}" class=user.role a href=user_action(user, :edit) Edit #{user.name} a href=(path_to_user user) = user.name body h1(id="logo") = page_logo h2[id="tagline" class="small tagline"] = page_tagline
48
            h2[id="tagline" class="small tagline"] = page_tagline h1 id = "logo" = page_logo h2 [ id = "tagline" ] = page_tagline / comment second line /! html comment second line
49
            <!-- html comment -->
50
            <a href="#{'hello' if set}">link</a> a.slim href="work" disabled=false running==:atom Text
51
            <b>bold</b> .clazz data-id="test" == 'hello' unless quark | Text mode #{12} Second line = x ||= :ruby_atom #menu.left - @env.each do |x| li: a = x *@dyntag attr="val" .first *{:class => [:second, :third]} Text .second class=["text","more"] .third
52
            class=:text,:symbol </textarea>
53
    </form>
54
    <script>
55
        var editor = CodeMirror.fromTextArea(document.getElementById("code"),
56
        {
57
            lineNumbers: true,
58
            theme: "ambiance",
59
            mode: "application/x-slim"
60
        });
61
        $('.CodeMirror').resizable(
62
        {
63
            resize: function()
64
            {
65
                editor.setSize($(this).width(), $(this).height());
66
                //editor.refresh();
67
            }
68
        });
69
    </script>
70
    <p>
71
        <strong>MIME types defined:</strong> <code>application/x-slim</code>.</p>
72
    <p>
73
        <strong>Parsing/Highlighting Tests:</strong>
74
        <a href="../../test/index.html#slim_*">normal</a>,
75
        <a href="../../test/index.html#verbose,slim_*">verbose</a>. </p>
76
</article>