diff --git a/_includes/api-member.html b/_includes/api-member.html index cb057a0..7336a86 100644 --- a/_includes/api-member.html +++ b/_includes/api-member.html @@ -1,87 +1,218 @@ {% if include.data.borrows.size > 0 %} -## Extends -{% for item in include.data.borrows %} -[{{ item }}]({{ site.baseurl }}/api/{{ item | api_url }}) -{% endfor %} + +

Extends

+ {% for item in include.data.borrows %} + {{ item }} + {% endfor %} +{% endif %} + +{% if include.data.examples.size > 0 %} +

Examples

+ + {% for example in include.data.examples %} +
{{example.content | filter_code}}
+ {% endfor %} +{% endif %} + +{% if include.data.settings.size > 0 %} + +

Settings

+ + + + + + + + + + + + {% for item in include.data.settings %} + + + + + + + {% endfor %} + +
nametypesummarydefined by
{{ item.name }} + {% if item.dataTypes[0] contains 'tinymce' %} + {{ item.dataTypes[0] }} + {% else %} + {{ item.dataTypes[0] }} + {% endif %} + {{ item.desc | no_nl }} + {{ item.definedBy }} +
{% endif %} {% if include.data.properties.size > 0 %} -## Properties -name | type | summary | defined by ---- | --- | --- | --- -{% for item in include.data.properties %}{{ item.name }} | {% if item.dataTypes[0] contains 'tinymce' %}[`{{ item.dataTypes[0] }}`]({{ site.baseurl }}/api/{{ item.dataTypes[0] | api_url }}){% else %}`{{ item.dataTypes[0] }}`{% endif %}| {{ item.desc | no_nl }} | [{{ item.definedBy }}]({{ site.baseurl }}/api/{{ item.definedBy | api_url }}) -{% endfor %} + +

Properties

+ + + + + + + + + + + + {% for item in include.data.properties %} + + + + + + + {% endfor %} + +
nametypesummarydefined by
{{ item.name }} + {% if item.dataTypes[0] contains 'tinymce' %} + {{ item.dataTypes[0] }} + {% else %} + {{ item.dataTypes[0] }} + {% endif %} + {{ item.desc | no_nl }} + {{ item.definedBy }} +
{% endif %} {% if include.data.methods.size > 0 %} -## Methods -name | summary | defined by ---- | --- | --- -{% for item in include.data.methods %}[{{ item.name }}()](#{{ item.name | anchor }}) | {{ item.desc | no_nl }} | [{{ item.definedBy }}]({{ site.baseurl }}/api/{{ item.definedBy | api_url }}) -{% endfor %} + +

Methods

+ + + + + + + + + + + {% for item in include.data.methods %} + + + + + + {% endfor %} + +
namesummarydefined by
{{ item.name }}(){{ item.desc | no_nl }} + {{ item.definedBy }} +
{% endif %} {% if include.data.events.size > 0 %} -## Events -name | summary | defined by ---- | --- | --- -{% for item in include.data.events %}[{{ item.name }}](#{{ item.name | anchor }}) | {{ item.desc | no_nl }} | [{{ item.definedBy }}]({{ site.baseurl }}/api/{{ item.definedBy | api_url }}) -{% endfor %} + +

Events

+ + + + + + + + + + + {% for item in include.data.events %} + + + + + + {% endfor %} + +
namesummarydefined by
{{ item.name }}{{ item.desc | no_nl }} + {{ item.definedBy }} +
{% endif %} {% if include.data.methods.size > 0 %} -## Methods -{% for item in include.data.methods %} +

Methods

-### {{ item.name }}() -```js -{{ include.data.name }}#{{ item.signature }} -``` + {% for item in include.data.methods %} + +

{{ item.name }}

+
{{ item.signature }}
-{{ item.desc | no_nl }} +

{{ item.desc | no_nl }}

-{% if item.examples.size > 0 %} -##### Examples + {% if item.examples.size > 0 %} +
Examples
-{% for example in item.examples %} -```js -{{example.content}} -``` -{% endfor %} -{% endif %} + {% for example in item.examples %} +
{{example.content | filter_code}}
+ {% endfor %} + {% endif %} -{% if item.params.size > 0 %} -##### Parameters + {% if item.params.size > 0 %} +
Parameters
-{% for param in item.params %}* `{{ param.name }}` ({% if param.types[0] contains 'tinymce' %}[{{ param.types[0] }}]({{ site.baseurl }}/api/{{ param.types[0] | api_url }}){% else %}`{{ param.types[0] }}`{% endif %}) - {{ param.desc | no_nl }} -{% endfor %} -{% endif %} + + {% endif %} -{% if item.return.types.size > 0 %} -##### Return value + {% if item.return.types.size > 0 %} +
Return value
-{% for type in item.return.types %}* {% if type contains 'tinymce' %}[`{{ type }}`]({{ site.baseurl }}/api/{{ type | api_url }}){% else %}`{{ type }}`{% endif %} - {{ item.return.desc | no_nl }} -{% endfor %} -{% endif %} - -{% endfor %} + + {% endif %} + {% endfor %} {% endif %} {% if include.data.events.size > 0 %} -## Events +

Events

-{% for item in include.data.events %} -### {{ item.name }} -{{ item.desc | no_nl }} + {% for item in include.data.events %} + +

{{ item.name }}

+

{{ item.desc | no_nl }}

-{% if item.params.size > 0 %} -##### Parameters + {% if item.params.size > 0 %} +
Parameters
-name | type | description ---- | --- | --- -{% for param in item.params %}{{ param.name }} | {% if param.types[0] contains 'tinymce' %}[`{{ param.types[0] }}`]({{ site.baseurl }}/api/{{ param.types[0] | api_url }}){% else %}`{{ param.types[0] }}`{% endif %} | {{ param.desc | no_nl }} -{% endfor %} -{% endif %} - -{% endfor %} + + {% endif %} + {% endfor %} {% endif %} diff --git a/_plugins/filter_code.rb b/_plugins/filter_code.rb new file mode 100644 index 0000000..43d3ec3 --- /dev/null +++ b/_plugins/filter_code.rb @@ -0,0 +1,11 @@ +require 'cgi' + +module Jekyll + module FilterCode + def filter_code(input) + CGI.escapeHTML(input.gsub(/\t/, " ")) if !input.nil? + end + end +end + +Liquid::Template.register_filter(Jekyll::FilterCode)