Usage
To include Brick in your project, include your downloaded stylesheet and script files in your project's page like normal:
<link rel="stylesheet" type="text/css" href="brick-{{ version }}.css"/>
<script type="text/javascript" src="brick-{{ version }}.js"></script>
Using any of Brick's components is as simple as including the respective tag in your HTML markup. (See individual component docs for details.)
Important: To run code relying on any of Brick's tags, make sure to wait until the x-tags library's "DOMComponentsLoaded"
event instead of just window.onload
:
document.addEventListener('DOMComponentsLoaded', function(){
// run code here...
});
{{ tag.replace('x-tag-','') }}
{% if info.demo %}
View Demo »
{% endif %}
Tag: {{ info.tagName }}
Version: {{ info.version }}
{% if pkgJson[tag].repository %}
Source:
{{ pkgJson[tag].repository.url.replace('.git','') }}
{% endif %}
Bower: {{ tag }}
{{ info.description|escape|nl2br|preserveTabs }}
{% if info.documentation.attributes|notEmpty %}
Attributes
{% for key, value in info.documentation.attributes %}
{{ key }}
- {{ value|escape|nl2br|preserveTabs }}
{% endfor %}
{% endif %}
{% if info.documentation.methods|notEmpty %}
Methods
{% for key, value in info.documentation.methods %}
{{ key }}
- {{ value|escape|nl2br|preserveTabs }}
{% endfor %}
{% endif %}
{% if info.documentation.events|notEmpty %}
Events
{% for key, value in info.documentation.events %}
{{ key }}
- {{ value|escape|nl2br|preserveTabs }}
{% endfor %}
{% endif %}
{% if info.documentation.getters|notEmpty %}
Getters
{% for key, value in info.documentation.getters %}
{{ key }}
- {{ value|escape|nl2br|preserveTabs }}
{% endfor %}
{% endif %}
{% if info.documentation.setters|notEmpty %}
Setters
{% for key, value in info.documentation.setters %}
{{ key }}
- {{ value|escape|nl2br|preserveTabs }}
{% endfor %}
{% endif %}