summaryrefslogtreecommitdiffstats
path: root/demo
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-09-14 18:20:20 +0200
committerManolo Carrasco <manolo@apache.org>2015-09-14 18:22:39 +0200
commit60d701b462284c07a99089480f27ab183318a953 (patch)
tree6a831a953a1e6aad66db91bf87d76fc1a3f1f277 /demo
parent4a10c10802d6eec581ee02402dc023df0189317c (diff)
downloadvaadin-core-60d701b462284c07a99089480f27ab183318a953.tar.gz
vaadin-core-60d701b462284c07a99089480f27ab183318a953.zip
Adding demos launch page
Diffstat (limited to 'demo')
-rw-r--r--demo/index.html57
1 files changed, 57 insertions, 0 deletions
diff --git a/demo/index.html b/demo/index.html
new file mode 100644
index 0000000..4bb7a71
--- /dev/null
+++ b/demo/index.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<html>
+<head>
+ <title>Vaadin Components Code Examples</title>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <script src="../../marked/lib/marked.js"></script>
+
+ <script src="../../code-example/vendor/prismjs/prism.js"></script>
+ <link rel="stylesheet" href="../../code-example/vendor/prismjs/prism.css">
+ <link rel="stylesheet" href="../../components-demo-resources/demo.css">
+
+ <script src="ga.js"></script>
+ <style type="text/css">
+ #readme code {
+ font-size: 12px;
+ max-height: none !important;
+ }
+ </style>
+</head>
+<body>
+
+ <section id="readme">
+ </section>
+ <script>
+ var readme = document.getElementById("readme");
+ var xhr = new XMLHttpRequest();
+
+ xhr.onload = function (e) {
+ if (xhr.readyState === 4) {
+ if (xhr.status === 200) {
+ readme.innerHTML = marked(xhr.responseText);
+ [].forEach.call(readme.querySelectorAll("pre"), function(pre) {
+ var code = document.createElement("code");
+ code.innerHTML = pre.innerHTML;
+ var parent = pre.parentElement;
+ parent.insertBefore(code, pre);
+ parent.removeChild(pre);
+
+ code.className = "language-markup";
+ Prism.highlightElement(code);
+ });
+ } else {
+ console.error(xhr.statusText);
+ }
+ }
+ };
+ xhr.onerror = function (e) {
+ console.error(xhr.statusText);
+ };
+ xhr.open("GET", "../README.html");
+ xhr.send();
+
+ </script>
+
+</body>
+</html>