comparison .cms/lib/codemirror/mode/haml/index.html @ 0:78edf6b517a0 draft

24.10
author Coffee CMS <info@coffee-cms.ru>
date Fri, 11 Oct 2024 22:40:23 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:78edf6b517a0
1 <!doctype html>
2
3 <title>CodeMirror: HAML 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 <script src="../../lib/codemirror.js"></script>
9 <script src="../xml/xml.js"></script>
10 <script src="../htmlmixed/htmlmixed.js"></script>
11 <script src="../javascript/javascript.js"></script>
12 <script src="../ruby/ruby.js"></script>
13 <script src="haml.js"></script>
14 <style>.CodeMirror {background: #f8f8f8;}</style>
15 <div id=nav>
16 <a href="https://codemirror.net/5"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></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/codemirror5">Code</a>
22 </ul>
23 <ul>
24 <li><a href="../index.html">Language modes</a>
25 <li><a class=active href="#">HAML</a>
26 </ul>
27 </div>
28
29 <article>
30 <h2>HAML mode</h2>
31 <form><textarea id="code" name="code">
32 !!!
33 #content
34 .left.column(title="title"){:href => "/hello", :test => "#{hello}_#{world}"}
35 <!-- This is a comment -->
36 %h2 Welcome to our site!
37 %p= puts "HAML MODE"
38 .right.column
39 = render :partial => "sidebar"
40
41 .container
42 .row
43 .span8
44 %h1.title= @page_title
45 %p.title= @page_title
46 %p
47 /
48 The same as HTML comment
49 Hello multiline comment
50
51 -# haml comment
52 This wont be displayed
53 nor will this
54 Date/Time:
55 - now = DateTime.now
56 %strong= now
57 - if now > DateTime.parse("December 31, 2006")
58 = "Happy new " + "year!"
59
60 %title
61 = @title
62 \= @title
63 <h1>Title</h1>
64 <h1 title="HELLO">
65 Title
66 </h1>
67 </textarea></form>
68 <script>
69 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
70 lineNumbers: true,
71 mode: "text/x-haml"
72 });
73 </script>
74
75 <p><strong>MIME types defined:</strong> <code>text/x-haml</code>.</p>
76
77 <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#haml_*">normal</a>, <a href="../../test/index.html#verbose,haml_*">verbose</a>.</p>
78
79 </article>