Merge remote-tracking branch 'origin/master'

This commit is contained in:
Adam Bradley
2015-10-01 15:49:02 -05:00
23 changed files with 655 additions and 117 deletions

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- https://www.chromium.org/developers/design-documents/chromium-graphics/how-to-get-gpu-rasterization -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link href="/css/v2-demos/css/ionic.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="app.css">
</head>
<body>
<ion-app>
<ion-loading-icon></ion-loading-icon>
</ion-app>
<script src="/js/ionic.bundle.js"></script>
<script>
System.config({
"paths": {
"*": "*.js",
"ionic/*": "ionic/*",
"angular2/*": "angular2/*",
"rx": "rx"
}
})
System.import("index");
</script>
</body>
</html>

View File

@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link href="../../css/ionic.css" rel="stylesheet">
</head>
<body>

View File

@@ -1,31 +1,47 @@
module.exports = function jekyll(renderDocsProcessor){
module.exports = function jekyll(renderDocsProcessor) {
return {
name: 'jekyll',
description: 'Create jekyll includes',
$runAfter: ['adding-extra-docs'],
$runBefore: ['extra-docs-added'],
$runAfter: ['paths-computed'],
$runBefore: ['rendering-docs'],
$process: function(docs) {
var currentVersion = renderDocsProcessor.extraData.version.current.name;
// pretty up and sort the docs object for menu generation
docs = docs.filter(function(doc) {
return !!doc.name && !!doc.outputPath;
});
docs.sort(function(a, b) {
textA = a.name ? a.name.toUpperCase() : '';
textB = b.name ? b.name.toUpperCase() : '';
return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
});
docs.forEach(function(doc, i) {
docs[i].URL = doc.outputPath.replace('docs/v2//','docs/v2/')
.replace('/index.md','');
});
docs.push({
docType: 'api-menu',
id: 'api-menu',
template: 'api_menu.template.html',
outputPath: '_includes/v2/api_menu.html'
outputPath: '_includes/v2_fluid/api_menu.html'
});
//TODO autogenerate this
docs.push({
docType: 'api-menu-version',
id: 'api-menu-version',
template: 'api_menu_version.template.html',
outputPath: '_includes/v2/api_menu_' + currentVersion + '.html'
docType: 'api-menu-flat-version',
id: 'api-menu-flat-version',
template: 'api_menu_flat_version.template.html',
outputPath: '_includes/v2_fluid/api_menu_flat_' + currentVersion + '.html'
});
docs.push({
docType: 'api-version-select',
id: 'api-version-select',
template: 'api_version_select.template.html',
outputPath: '_includes/v2/api_version_select.html'
outputPath: '_includes/v2_fluid/api_version_select.html'
});
// returning docs will replace docs object in the next process
return docs;
}
}
};
};

View File

@@ -1,9 +1,10 @@
---
layout: "v2/docs_base"
layout: "v2_fluid/docs_base"
version: "<$ version.current.name $>"
versionHref: "<$ version.current.href $>"
path: ""
category: api
id: api
title: Javascript
header_sub_title: Extend Ionic even further with the power of AngularJS

View File

@@ -5,10 +5,10 @@
<@ else @>
{% elsif page.versionHref == "<$ ver.href $>" %}
<@ endif @>
{% include v2/api_menu_<$ ver.name $>.html %}
{% include v2_fluid/api_menu_flat_<$ ver.name $>.html %}
<@ endif @>
<@ endfor @>
<# make the last case always be to show latest version #>
{% else %}
{% include v2/api_menu_<$ version.latest.name $>.html %}
{% include v2_fluid/api_menu_flat_<$ version.latest.name $>.html %}
{% endif %}

View File

@@ -0,0 +1,4 @@
<@ for doc in docs @><@ if doc.URL @>
<li class="{% if page.id == '{{<$ doc.name $> | slugify}}' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $></a>
</li><@ endif @><@ endfor @>

View File

@@ -1,4 +1,6 @@
<select onchange="window.location.href=this.options[this.selectedIndex].value">
<select name="version"
id="version-toggle"
onchange="window.location.href=this.options[this.selectedIndex].value">
<@ for ver in version.list @>
<option
value="<$ ver.href $>/{% if page.path != ''%}{{page.path}}{% else %}api/{% endif %}"
@@ -7,5 +9,3 @@
</option>
<@ endfor @>
</select>

View File

@@ -1,9 +1,10 @@
---
layout: "v2/docs_base"
layout: "v2_fluid/docs_base"
version: "<$ version.current.name $>"
versionHref: "<$ version.current.href $>"
path: "<$ doc.path $>"
id: api
category: api
id: "{{<$ doc.name $> | slugify}}"
title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>"
header_sub_title: "<$ doc.docType | capital $> in module <$ doc.module $>"
doc: "<$ doc.name $>"