move a few things away in to-be-integrated/
[myslice.git] / to-be-integrated / third-party / codemirror-3.15 / mode / smartymixed / index.html
1 <!doctype html>
2 <html>
3   <head>
4     <meta charset="utf-8">
5     <title>CodeMirror: Smarty mixed mode</title>
6     <link rel="stylesheet" href="../../lib/codemirror.css">
7     <script src="../../lib/codemirror.js"></script>
8     <link rel="stylesheet" href="../../doc/docs.css">
9
10     <!-- smartymixed dependencies -->
11     <script src="../../mode/xml/xml.js"></script>
12     <script src="../../mode/javascript/javascript.js"></script>
13     <script src="../../mode/css/css.js"></script>
14     <script src="../../mode/htmlmixed/htmlmixed.js"></script>
15     <script src="../../mode/smarty/smarty.js"></script>
16
17     <!-- smartymixed -->
18     <script src="../../mode/smartymixed/smartymixed.js"></script>
19   </head>
20   <body>
21     <h1>CodeMirror: Smarty mixed mode</h1>
22     <form><textarea id="code" name="code">
23 {**
24 * @brief Smarty mixed mode
25 * @author Ruslan Osmanov
26 * @date 29.06.2013
27 *}
28 <html>
29 <head>
30   <title>{$title|htmlspecialchars|truncate:30}</title>
31 </head>
32 <body>
33   {* Multiline smarty
34   * comment, no {$variables} here
35   *}
36   {literal}
37   {literal} is just an HTML text.
38   <script type="text/javascript">//<![CDATA[
39     var a = {$just_a_normal_js_object : "value"};
40     var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
41       mode           : "smartymixed",
42       tabSize        : 2,
43       indentUnit     : 2,
44       indentWithTabs : false,
45       lineNumbers    : true,
46       smartyVersion  : 3
47     });
48     // ]]>
49   </script>
50   <style>
51     /* CSS content 
52     {$no_smarty} */
53     .some-class { font-weight: bolder; color: "orange"; }
54   </style>
55   {/literal}
56
57   {extends file="parent.tpl"}
58   {include file="template.tpl"}
59
60   {* some example Smarty content *}
61   {if isset($name) && $name == 'Blog'}
62     This is a {$var}.
63     {$integer = 4511}, {$array[] = "a"}, {$stringvar = "string"}
64     {$integer = 4512} {$array[] = "a"} {$stringvar = "string"}
65     {assign var='bob' value=$var.prop}
66   {elseif $name == $foo}
67     {function name=menu level=0}
68     {foreach $data as $entry}
69       {if is_array($entry)}
70       - {$entry@key}
71       {menu data=$entry level=$level+1}
72       {else}
73       {$entry}
74       {* One
75       * Two
76       * Three
77       *}
78       {/if}
79     {/foreach}
80     {/function}
81   {/if}
82   </body>
83   <!-- R.O. -->
84 </html>
85 </textarea></form>
86
87     <script type="text/javascript">
88       var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
89         mode           : "smartymixed",
90         tabSize        : 2,
91         indentUnit     : 2,
92         indentWithTabs : false,
93         lineNumbers    : true,
94         smartyVersion  : 3,
95         matchBrackets  : true,
96       });
97     </script>
98
99     <p>The Smarty mixed mode depends on the Smarty and HTML mixed modes. HTML
100     mixed mode itself depends on XML, JavaScript, and CSS modes.</p>
101
102     <p>It takes the same options, as Smarty and HTML mixed modes.</p>
103
104     <p><strong>MIME types defined:</strong> <code>text/x-smarty</code>.</p>
105   </body>
106 </html>
107 <!-- vim: set ft=html ts=2 sts=2 sw=2 et: -->