mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 15:39:08 +00:00
Deployed 046569e1
to dev with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
parent
33b81d0f2e
commit
06c057263b
4 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1024 target=_blank>See source code</a></p> <p>Marks location where CSS link tags should be rendered after the whole HTML has been generated.</p> <p>Generally, this should be inserted into the <code><head></code> tag of the HTML.</p> <p>If the generated HTML does NOT contain any <code>{% component_css_dependencies %}</code> tags, CSS links are by default inserted into the <code><head></code> tag of the HTML. (See <a href=../../concepts/advanced/rendering_js_css/#default-js-css-locations>Default JS / CSS locations</a>)</p> <p>Note that there should be only one <code>{% component_css_dependencies %}</code> for the whole HTML document. If you insert this tag multiple times, ALL CSS links will be duplicately inserted into ALL these places.</p> <h2 id=component_js_dependencies>component_js_dependencies<a class=headerlink href=#component_js_dependencies title="Permanent link">¤</a></h2> <div class=highlight><pre><span></span><code><a id=__codelineno-2-1 name=__codelineno-2-1 href=#__codelineno-2-1></a><span class=cp>{%</span> <span class=k>component_js_dependencies</span> <span class=cp>%}</span>
|
||||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1046 target=_blank>See source code</a></p> <p>Marks location where JS link tags should be rendered after the whole HTML has been generated.</p> <p>Generally, this should be inserted at the end of the <code><body></code> tag of the HTML.</p> <p>If the generated HTML does NOT contain any <code>{% component_js_dependencies %}</code> tags, JS scripts are by default inserted at the end of the <code><body></code> tag of the HTML. (See <a href=../../concepts/advanced/rendering_js_css/#default-js-css-locations>Default JS / CSS locations</a>)</p> <p>Note that there should be only one <code>{% component_js_dependencies %}</code> for the whole HTML document. If you insert this tag multiple times, ALL JS scripts will be duplicately inserted into ALL these places.</p> <h2 id=component>component<a class=headerlink href=#component title="Permanent link">¤</a></h2> <div class=highlight><pre><span></span><code><a id=__codelineno-3-1 name=__codelineno-3-1 href=#__codelineno-3-1></a><span class=cp>{%</span> <span class=k>component</span> <span class=o>*</span><span class=nv>args</span><span class=o>:</span> <span class=nv>Any</span><span class=o>,</span> <span class=o>**</span><span class=nv>kwargs</span><span class=o>:</span> <span class=nv>Any</span> <span class=o>[</span><span class=nv>only</span><span class=o>]</span> <span class=cp>%}</span>
|
||||
<a id=__codelineno-3-2 name=__codelineno-3-2 href=#__codelineno-3-2></a><span class=cp>{%</span> <span class=k>endcomponent</span> <span class=cp>%}</span>
|
||||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L3113 target=_blank>See source code</a></p> <p>Renders one of the components that was previously registered with <a href=../api/#django_components.register><code>@register()</code></a> decorator.</p> <p>The <code>{% component %}</code> tag takes:</p> <ul> <li>Component's registered name as the first positional argument,</li> <li>Followed by any number of positional and keyword arguments.</li> </ul> <div class=highlight><pre><span></span><code><a id=__codelineno-4-1 name=__codelineno-4-1 href=#__codelineno-4-1></a><span class=cp>{%</span> <span class=k>load</span> <span class=nv>component_tags</span> <span class=cp>%}</span>
|
||||
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L3110 target=_blank>See source code</a></p> <p>Renders one of the components that was previously registered with <a href=../api/#django_components.register><code>@register()</code></a> decorator.</p> <p>The <code>{% component %}</code> tag takes:</p> <ul> <li>Component's registered name as the first positional argument,</li> <li>Followed by any number of positional and keyword arguments.</li> </ul> <div class=highlight><pre><span></span><code><a id=__codelineno-4-1 name=__codelineno-4-1 href=#__codelineno-4-1></a><span class=cp>{%</span> <span class=k>load</span> <span class=nv>component_tags</span> <span class=cp>%}</span>
|
||||
<a id=__codelineno-4-2 name=__codelineno-4-2 href=#__codelineno-4-2></a><span class=x><div></span>
|
||||
<a id=__codelineno-4-3 name=__codelineno-4-3 href=#__codelineno-4-3></a><span class=x> </span><span class=cp>{%</span> <span class=k>component</span> <span class=s2>"button"</span> <span class=nv>name</span><span class=o>=</span><span class=s2>"John"</span> <span class=nv>job</span><span class=o>=</span><span class=s2>"Developer"</span> <span class=o>/</span> <span class=cp>%}</span>
|
||||
<a id=__codelineno-4-4 name=__codelineno-4-4 href=#__codelineno-4-4></a><span class=x></div></span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue