hyde_admin 0.0.1 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +3 -0
  3. data/.idea/hyde_admin.iml +2 -0
  4. data/.idea/vcs.xml +6 -0
  5. data/CHANGELOG.md +35 -0
  6. data/README.md +23 -0
  7. data/TODO.md +3 -0
  8. data/bin/admin_views/admin_layout.html.erb +204 -108
  9. data/bin/admin_views/configuration.erb +13 -0
  10. data/bin/admin_views/dashboard.erb +1 -1
  11. data/bin/admin_views/editor_html.erb +24 -0
  12. data/bin/admin_views/editor_js.erb +120 -0
  13. data/bin/admin_views/files/edit.erb +30 -0
  14. data/bin/admin_views/files/listing.erb +111 -0
  15. data/bin/admin_views/partials/image_element.html.erb +4 -0
  16. data/bin/admin_views/partials/images_page.html.erb +8 -0
  17. data/bin/admin_views/posts/edit.erb +158 -0
  18. data/bin/admin_views/posts/listing.erb +37 -0
  19. data/bin/admin_views/upload_image_form.erb +45 -0
  20. data/bin/fslightbox/fslightbox.js +1 -0
  21. data/bin/hyde_admin +3 -0
  22. data/bin/hyde_admin.ru +306 -56
  23. data/bin/hyde_admin.yml +12 -5
  24. data/bin/hyde_assets/hyde_admin.css +37 -0
  25. data/bin/hyde_assets/hyde_admin.js +24 -0
  26. data/bin/i18n/en.yml +77 -1
  27. data/bin/i18n/fr.yml +77 -1
  28. data/bin/lib/codemirror.css +349 -0
  29. data/bin/lib/codemirror.js +9833 -0
  30. data/bin/mode/css/css.js +864 -0
  31. data/bin/mode/css/gss.html +104 -0
  32. data/bin/mode/css/gss_test.js +17 -0
  33. data/bin/mode/css/index.html +81 -0
  34. data/bin/mode/css/less.html +152 -0
  35. data/bin/mode/css/less_test.js +54 -0
  36. data/bin/mode/css/scss.html +158 -0
  37. data/bin/mode/css/scss_test.js +110 -0
  38. data/bin/mode/css/test.js +217 -0
  39. data/bin/mode/htmlembedded/htmlembedded.js +37 -0
  40. data/bin/mode/htmlembedded/index.html +60 -0
  41. data/bin/mode/htmlmixed/htmlmixed.js +153 -0
  42. data/bin/mode/htmlmixed/index.html +100 -0
  43. data/bin/mode/javascript/index.html +118 -0
  44. data/bin/mode/javascript/javascript.js +959 -0
  45. data/bin/mode/javascript/json-ld.html +72 -0
  46. data/bin/mode/javascript/test.js +521 -0
  47. data/bin/mode/javascript/typescript.html +62 -0
  48. data/bin/mode/markdown/index.html +418 -0
  49. data/bin/mode/markdown/markdown.js +886 -0
  50. data/bin/mode/markdown/test.js +1319 -0
  51. data/bin/mode/ruby/index.html +183 -0
  52. data/bin/mode/ruby/ruby.js +303 -0
  53. data/bin/mode/ruby/test.js +23 -0
  54. data/bin/mode/sass/index.html +68 -0
  55. data/bin/mode/sass/sass.js +459 -0
  56. data/bin/mode/sass/test.js +122 -0
  57. data/bin/mode/spreadsheet/index.html +42 -0
  58. data/bin/mode/spreadsheet/spreadsheet.js +112 -0
  59. data/bin/mode/xml/index.html +61 -0
  60. data/bin/mode/xml/test.js +51 -0
  61. data/bin/mode/xml/xml.js +417 -0
  62. data/bin/mode/yaml/index.html +80 -0
  63. data/bin/mode/yaml/yaml.js +120 -0
  64. data/bin/mode/yaml-frontmatter/index.html +121 -0
  65. data/bin/mode/yaml-frontmatter/yaml-frontmatter.js +72 -0
  66. data/hyde_admin.gemspec +7 -1
  67. data/lib/hyde_admin/version.rb +1 -1
  68. metadata +131 -7
  69. data/bin/admin_views/edit.erb +0 -57
  70. data/bin/admin_views/listing.erb +0 -32
  71. data/bin/hyde_admin.sh +0 -3
@@ -0,0 +1,118 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: JavaScript 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="../../addon/edit/matchbrackets.js"></script>
10
+ <script src="../../addon/comment/continuecomment.js"></script>
11
+ <script src="../../addon/comment/comment.js"></script>
12
+ <script src="javascript.js"></script>
13
+ <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
14
+ <div id=nav>
15
+ <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
16
+
17
+ <ul>
18
+ <li><a href="../../index.html">Home</a>
19
+ <li><a href="../../doc/manual.html">Manual</a>
20
+ <li><a href="https://github.com/codemirror/codemirror">Code</a>
21
+ </ul>
22
+ <ul>
23
+ <li><a href="../index.html">Language modes</a>
24
+ <li><a class=active href="#">JavaScript</a>
25
+ </ul>
26
+ </div>
27
+
28
+ <article>
29
+ <h2>JavaScript mode</h2>
30
+
31
+
32
+ <div><textarea id="code" name="code">
33
+ // Demo code (the actual new parser character stream implementation)
34
+
35
+ function StringStream(string) {
36
+ this.pos = 0;
37
+ this.string = string;
38
+ }
39
+
40
+ StringStream.prototype = {
41
+ done: function() {return this.pos >= this.string.length;},
42
+ peek: function() {return this.string.charAt(this.pos);},
43
+ next: function() {
44
+ if (this.pos &lt; this.string.length)
45
+ return this.string.charAt(this.pos++);
46
+ },
47
+ eat: function(match) {
48
+ var ch = this.string.charAt(this.pos);
49
+ if (typeof match == "string") var ok = ch == match;
50
+ else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);
51
+ if (ok) {this.pos++; return ch;}
52
+ },
53
+ eatWhile: function(match) {
54
+ var start = this.pos;
55
+ while (this.eat(match));
56
+ if (this.pos > start) return this.string.slice(start, this.pos);
57
+ },
58
+ backUp: function(n) {this.pos -= n;},
59
+ column: function() {return this.pos;},
60
+ eatSpace: function() {
61
+ var start = this.pos;
62
+ while (/\s/.test(this.string.charAt(this.pos))) this.pos++;
63
+ return this.pos - start;
64
+ },
65
+ match: function(pattern, consume, caseInsensitive) {
66
+ if (typeof pattern == "string") {
67
+ function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
68
+ if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
69
+ if (consume !== false) this.pos += str.length;
70
+ return true;
71
+ }
72
+ }
73
+ else {
74
+ var match = this.string.slice(this.pos).match(pattern);
75
+ if (match &amp;&amp; consume !== false) this.pos += match[0].length;
76
+ return match;
77
+ }
78
+ }
79
+ };
80
+ </textarea></div>
81
+
82
+ <script>
83
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
84
+ lineNumbers: true,
85
+ matchBrackets: true,
86
+ continueComments: "Enter",
87
+ extraKeys: {"Ctrl-Q": "toggleComment"}
88
+ });
89
+ </script>
90
+
91
+ <p>
92
+ JavaScript mode supports several configuration options:
93
+ <ul>
94
+ <li><code>json</code> which will set the mode to expect JSON
95
+ data rather than a JavaScript program.</li>
96
+ <li><code>jsonld</code> which will set the mode to expect
97
+ <a href="http://json-ld.org">JSON-LD</a> linked data rather
98
+ than a JavaScript program (<a href="json-ld.html">demo</a>).</li>
99
+ <li><code>typescript</code> which will activate additional
100
+ syntax highlighting and some other things for TypeScript code
101
+ (<a href="typescript.html">demo</a>).</li>
102
+ <li><code>trackScope</code> can be set to false to turn off
103
+ tracking of local variables. This will prevent locals from
104
+ getting the <code>"variable-2"</code> token type, and will
105
+ break completion of locals with javascript-hint.</li>
106
+ <li><code>statementIndent</code> which (given a number) will
107
+ determine the amount of indentation to use for statements
108
+ continued on a new line.</li>
109
+ <li><code>wordCharacters</code>, a regexp that indicates which
110
+ characters should be considered part of an identifier.
111
+ Defaults to <code>/[\w$]/</code>, which does not handle
112
+ non-ASCII identifiers. Can be set to something more elaborate
113
+ to improve Unicode support.</li>
114
+ </ul>
115
+ </p>
116
+
117
+ <p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/javascript</code>, <code>application/x-javascript</code>, <code>text/ecmascript</code>, <code>application/ecmascript</code>, <code>application/json</code>, <code>application/x-json</code>, <code>application/manifest+json</code>, <code>application/ld+json</code>, <code>text/typescript</code>, <code>application/typescript</code>.</p>
118
+ </article>