move a few things away in to-be-integrated/
[myslice.git] / to-be-integrated / third-party / codemirror-3.15 / demo / theme.html
diff --git a/to-be-integrated/third-party/codemirror-3.15/demo/theme.html b/to-be-integrated/third-party/codemirror-3.15/demo/theme.html
new file mode 100644 (file)
index 0000000..62544be
--- /dev/null
@@ -0,0 +1,100 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CodeMirror: Theme Demo</title>
+    <link rel="stylesheet" href="../lib/codemirror.css">
+    <script src="../lib/codemirror.js"></script>
+    <link rel="stylesheet" href="../theme/neat.css">
+    <link rel="stylesheet" href="../theme/elegant.css">
+    <link rel="stylesheet" href="../theme/erlang-dark.css">
+    <link rel="stylesheet" href="../theme/night.css">
+    <link rel="stylesheet" href="../theme/monokai.css">
+    <link rel="stylesheet" href="../theme/cobalt.css">
+    <link rel="stylesheet" href="../theme/eclipse.css">
+    <link rel="stylesheet" href="../theme/rubyblue.css">
+    <link rel="stylesheet" href="../theme/lesser-dark.css">
+    <link rel="stylesheet" href="../theme/xq-dark.css">
+    <link rel="stylesheet" href="../theme/xq-light.css">
+    <link rel="stylesheet" href="../theme/ambiance.css">
+    <link rel="stylesheet" href="../theme/blackboard.css">
+    <link rel="stylesheet" href="../theme/vibrant-ink.css">
+    <link rel="stylesheet" href="../theme/solarized.css">
+    <link rel="stylesheet" href="../theme/twilight.css">
+    <link rel="stylesheet" href="../theme/midnight.css">
+    <link rel="stylesheet" href="../theme/3024-day.css">
+    <link rel="stylesheet" href="../theme/3024-night.css">
+    <link rel="stylesheet" href="../theme/base16-light.css">
+    <link rel="stylesheet" href="../theme/base16-dark.css">
+    <link rel="stylesheet" href="../theme/tomorrow-night-eighties.css">
+    <script src="../mode/javascript/javascript.js"></script>
+    <script src="../keymap/extra.js"></script>
+    <link rel="stylesheet" href="../doc/docs.css">
+
+    <style type="text/css">
+      .CodeMirror {border: 1px solid black; font-size:13px}
+    </style>
+  </head>
+  <body>
+    <h1>CodeMirror: Theme demo</h1>
+
+    <form><textarea id="code" name="code">
+function findSequence(goal) {
+  function find(start, history) {
+    if (start == goal)
+      return history;
+    else if (start > goal)
+      return null;
+    else
+      return find(start + 5, "(" + history + " + 5)") ||
+             find(start * 3, "(" + history + " * 3)");
+  }
+  return find(1, "1");
+}</textarea></form>
+
+<p>Select a theme: <select onchange="selectTheme()" id=select>
+    <option selected>default</option>
+    <option>3024-day</option>
+    <option>3024-night</option>
+    <option>ambiance</option>
+    <option>base16-dark</option>
+    <option>base16-light</option>
+    <option>blackboard</option>
+    <option>cobalt</option>
+    <option>eclipse</option>
+    <option>elegant</option>
+    <option>erlang-dark</option>
+    <option>lesser-dark</option>
+    <option>midnight</option>
+    <option>monokai</option>
+    <option>neat</option>
+    <option>night</option>
+    <option>rubyblue</option>
+    <option>solarized dark</option>
+    <option>solarized light</option>
+    <option>tomorrow-night-eighties</option>
+    <option>twilight</option>
+    <option>vibrant-ink</option>
+    <option>xq-dark</option>
+    <option>xq-light</option>
+</select>
+</p>
+
+<script>
+  var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+    lineNumbers: true
+  });
+  var input = document.getElementById("select");
+  function selectTheme() {
+    var theme = input.options[input.selectedIndex].innerHTML;
+    editor.setOption("theme", theme);
+  }
+  var choice = document.location.search &&
+               decodeURIComponent(document.location.search.slice(1));
+  if (choice) {
+    input.value = choice;
+    editor.setOption("theme", choice);
+  }
+</script>
+  </body>
+</html>