summaryrefslogtreecommitdiffstats
path: root/apidoc
diff options
context:
space:
mode:
authorTeemu Pòˆntelin <teemu@vaadin.com>2015-11-18 14:30:14 +0200
committerTeemu Pòˆntelin <teemu@vaadin.com>2015-11-18 14:44:43 +0200
commit89abefc57ce902fd4d406c8127f8f87eabec07a2 (patch)
treea875844107de452caa1993fa8c2ccafc8de42631 /apidoc
parentda1836a25b501bc5dbde710ec5802552a9bea218 (diff)
downloadvaadin-core-89abefc57ce902fd4d406c8127f8f87eabec07a2.tar.gz
vaadin-core-89abefc57ce902fd4d406c8127f8f87eabec07a2.zip
Add index page for apidocs contained within the elements
Diffstat (limited to 'apidoc')
-rw-r--r--apidoc/index.html167
1 files changed, 51 insertions, 116 deletions
diff --git a/apidoc/index.html b/apidoc/index.html
index 522a6a1..1ff94a5 100644
--- a/apidoc/index.html
+++ b/apidoc/index.html
@@ -2,123 +2,58 @@
<html>
<head lang="en">
<meta charset="UTF-8">
- <title></title>
-
- <script src="../ga.js"></script>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <script src="../../lodash/lodash.js"></script>
- <link rel="import" href="../../polymer/polymer.html">
- <link rel="import" href="../../hydrolysis/hydrolysis-analyzer.html">
- <link rel="import" href="../../iron-doc-viewer/iron-doc-viewer.html">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>vaadin-elements</title>
+ <style>
+ body {
+ font-family: 'Roboto', 'Noto', sans-serif;
+ font-size: 16px;
+ background: #fafafa;
+ color: #212121;
+ }
+ section {
+ width: 50%;
+ margin: 50px auto;
+ background: #fff;
+ border: 1px solid #e5e5e5;
+ }
+ @media (max-width: 700px) {
+ section {
+ width: 100%;
+ }
+ }
+ h1 {
+ font-size: 150%;
+ font-weight: 400;
+ }
+ ul {
+ padding-left: 0;
+ list-style: none;
+ border-bottom: 1px solid #e5e5e5;
+ }
+ li {
+ line-height: 1.4;
+ border-top: 1px solid #e5e5e5;
+ }
+ li p {
+ margin: 0;
+ }
+ h1,
+ li {
+ padding: 14px 24px;
+ }
+ </style>
</head>
-<body>
- <div id="container" style="display:none">
- <div id="viewer" style="width: 60%;left: 20%; position: absolute;">
- <iron-doc-viewer></iron-doc-viewer>
- </div>
- </div>
- <script>
- window.addEventListener("WebComponentsReady", function() {
- var hyd = require('hydrolysis');
-
- function hidePrivateToggle() {
- document.querySelector('#togglePrivate').setAttribute('style', 'display:none');
- }
-
- function hideCollapsedToggle() {
- var collapsed = document.querySelector('#toggleCollapsed');
- if(collapsed) {
- collapsed.setAttribute('style', 'display:none');
- }
- }
-
- function getElementTag() {
- var elementTag = window.location.search.replace('?', '');
- if(elementTag === '') {
- elementTag = 'vaadin-grid';
- }
-
- return elementTag;
- }
-
- function getPropertyType(type) {
- return type.textContent.replace('Array.<', '').replace('>', '');
- }
-
- function createLinkElement(type) {
- var a = document.createElement('a');
- a.textContent = type.textContent;
- a.setAttribute('href', '?' + getPropertyType(type));
-
- return a;
- }
-
- function addLinkElementsForDocumentedTypes(result) {
- var types = document.querySelectorAll('.type');
-
- for(var i=0;i < types.length; i++) {
- var type = getPropertyType(types[i]);
-
- if(result.elementsByTagName[type] || result.behaviorsByName[type]) {
- var a = createLinkElement(types[i]);
- types[i].textContent = '';
- types[i].appendChild(a);
- }
- }
-
- return result;
- }
-
- function hidePropertySetterMethods() {
- var propertyNames = _.map(document.querySelector('#properties').querySelectorAll('.name'), function(p) {
- return p.textContent;
- });
-
- var methods = document.querySelector('#methods').querySelectorAll('iron-doc-property');
-
- _.forEach(methods, function(m) {
- if(_.contains(propertyNames, m.querySelector('.name').textContent)) {
- m.setAttribute('style', 'display:none');
- }
- });
- }
-
- function hideDefaultValuesForNonPrimitiveTypes(result) {
- function isPrimitiveType(t) {
- return /^([Nn]umber|[Bb]oolean|[Ss]tring).*/.test(t);
- }
-
- _.forEach(document.querySelector('#properties').querySelectorAll('iron-doc-property'), function(p) {
- if(!isPrimitiveType(p.querySelector('#type').textContent)) {
- p.querySelector('.annotation').setAttribute('style', 'display:none');
- }
- });
-
- return result;
- }
-
- function showDocViewer() {
- document.querySelector('#container').setAttribute('style', 'display:block');
- }
-
- //*** Main script starts here. ***//
-
- hidePrivateToggle();
- hideCollapsedToggle();
-
- hyd.Analyzer.analyze('../../vaadin-grid/vaadin-grid-doc.html')
- .then(function(result) {
- var descriptor = result.elementsByTagName[getElementTag()] || result.behaviorsByName[getElementTag()];
- document.querySelector('iron-doc-viewer').descriptor = descriptor;
-
- return result;
- })
- .then(hideDefaultValuesForNonPrimitiveTypes)
- .then(addLinkElementsForDocumentedTypes)
- .then(hidePropertySetterMethods)
- .then(showDocViewer);
- });
-</script>
+<body>
+ <section>
+ <h1>API documentation for vaadin-elements</h1>
+ <ul>
+ <li>
+ <a id="vaadin-grid" href="../../vaadin-grid/index.html">vaadin-grid</a>
+ <p>Data grid for showing large amounts of tabular data.</p>
+ </li>
+ </ul>
+ </section>
</body>
</html>