239 lines
9.6 KiB
HTML
239 lines
9.6 KiB
HTML
{% if gcode.category contains 'in-review' %}
|
|
{% alert info %}This page is marked for review. The following information may be outdated or incorrect.{% endalert %}
|
|
{% elsif gcode.category contains 'wip' %}
|
|
{% alert info %}This page is under construction and may not have complete or up-to-date information.{% endalert %}
|
|
{% endif %}
|
|
<div class="col-lg-12 row meta detail-header">
|
|
<p id="authors" class="text-right pull-right visible-lg-block hidden-print small custom-pt25">
|
|
{% assign authors = gcode.author | append: ',' | append: gcode.contrib | replace: " ","" | split: ',' %}
|
|
{% if authors %}
|
|
{% for author in authors %}
|
|
<a href="//github.com/{{ author }}" data-toggle="tooltip" data-placement="bottom" title="Visit {{ author }}'s profile on Github">{% avatar user=author size=30 %}</a>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</p>
|
|
|
|
<h1>{{ gcode.codes | codes_desc }} - {{ gcode.title }}</h1>
|
|
|
|
{% if gcode.experimental %}
|
|
<span class="label label-warning"><span data-toggle="tooltip" data-placement="bottom" title="Experimental"><i class="fa fa-flask" aria-hidden="true"></i></span></span>
|
|
{% endif %}
|
|
|
|
{% if gcode.since %}
|
|
<span class="label label-success"><span data-toggle="tooltip" data-placement="bottom" title="{% if conf.until %}Availability{% else %}Available since{% endif %}"><i class="fa fa-code" aria-hidden="true"></i> {{ gcode.since }}</span></span>
|
|
{% endif %}
|
|
|
|
{% if gcode.group %}
|
|
<span class="label label-default"><i class="fa fa-tags" aria-hidden="true"></i> {{ gcode.group }}</span>
|
|
{% endif %}
|
|
|
|
{% if gcode.brief %}
|
|
<span class="label label-primary"><i class="fa fa-pencil-square" aria-hidden="true"></i> {{gcode.brief}}</span>
|
|
{% endif %}
|
|
|
|
{% if gcode.requires %}
|
|
{% assign list = (gcode.requires | split: ',') %}
|
|
{% for item in list %}
|
|
<span class="label label-requires" data-toggle="tooltip" data-placement="bottom" title="Requires">{{item}}</span>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if gcode.related %}
|
|
<div class="col-lg-12 row related">
|
|
Related codes: {% for item in gcode.related %}<a href="/docs/gcode/{{ item | linkify }}.html"><code>{{item}}</code></a> {% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="col-lg-12 row long">
|
|
<h3>Description</h3>
|
|
{% if page.content %}{{ page.content | markdownify }}{% endif %}
|
|
</div>
|
|
|
|
{% if gcode.notes %}
|
|
<div class="col-lg-12 row notes">
|
|
<h3>Notes</h3>
|
|
{% for line in gcode.notes %}{{ line | markdownify }}{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if gcode.devnotes %}
|
|
<div class="col-lg-12 row devnotes">
|
|
<h3>Developer Notes</h3>
|
|
{% for line in gcode.devnotes %}{{ line | markdownify }}{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if gcode.pagetype != 'toc' %}
|
|
<div class="col-lg-12 row usage" id="usage-{{ gcode.tag }}">
|
|
<h3>Usage</h3>
|
|
{% for code in gcode.codes %}
|
|
<div><code>{{ code }}
|
|
{% if gcode.parameters %}
|
|
{% assign list = ('' | split: '|') %}
|
|
{% for parm in gcode.parameters %}
|
|
{% if parm.tag %}
|
|
{% assign list = list | push: parm %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if list.size > 0 %}
|
|
{% assign list = (list | sort: 'tag') %}
|
|
{% for parm in list %}<!--
|
|
--><span {% if parm.optional %}class="optional" {% endif %}data-toggle="tooltip" data-container="body" data-placement="top" data-original-title="{{ parm.description | markdownify | strip_html }}"><!--
|
|
-->{% if parm.optional %}[{% endif %}<!--
|
|
-->{{ parm.tag }}<!--
|
|
-->{% if parm.values.size > 0 %}<!--
|
|
-->{% if parm.values.size == 1 %}<!--
|
|
-->{% assign pv = parm.values[0] %}<!--
|
|
-->{% if pv.type != 'flag' %}<!--
|
|
-->{% if pv.optional %}[{% else %}<{% endif %}<!--
|
|
-->{% if pv.tag %}<!--
|
|
-->{{ pv.tag }}{% if pv.unit %} ({{ pv.unit }}){% endif %}<!--
|
|
-->{% elsif pv.unit %}<!--
|
|
-->{{ pv.unit }}<!--
|
|
-->{% elsif pv.type %}<!--
|
|
-->{{ pv.type }}<!--
|
|
-->{% else %}<!--
|
|
-->Unknown<!--
|
|
-->{% endif %}<!--
|
|
-->{% if pv.optional %}]{% else %}>{% endif %}<!--
|
|
-->{% endif %}<!--
|
|
-->{% else %}<!--
|
|
--><<!--
|
|
-->{% for pv in parm.values %}<!--
|
|
-->{{ pv.tag }}<!--
|
|
-->{% if forloop.last != true %}|{% endif %}<!--
|
|
-->{% endfor %}<!--
|
|
-->><!--
|
|
-->{% endif %}<!--
|
|
-->{% endif %}<!--
|
|
-->{% if parm.optional %}]{% endif %}<!--
|
|
--></span> <!--
|
|
-->{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
</code></div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if gcode.parameters %}
|
|
{% assign list = ('' | split: '|') %}
|
|
{% for parm in gcode.parameters %}{% if parm.tag %}{% assign list = list | push: parm %}{% endif %}{% endfor %}
|
|
|
|
{% if list.size > 0 %}
|
|
<div class="col-lg-12 row params">
|
|
<h4>Parameters</h4>
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<tbody>
|
|
{% assign list = (list | sort: 'tag') %}
|
|
{% for parm in list %}
|
|
<tr>
|
|
<td class="arg"><code>
|
|
{% if parm.optional %}[{% endif %}<!--
|
|
-->{{ parm.tag }}<!--
|
|
-->{% if parm.values.size > 0 %}<!--
|
|
-->{% if parm.values.size == 1 %}<!--
|
|
-->{% assign pv = parm.values[0] %}<!--
|
|
-->{% if pv.type != 'flag' %}<!--
|
|
-->{% if pv.optional %}[{% else %}<{% endif %}<!--
|
|
-->{% if pv.tag %}<!--
|
|
-->{{ pv.tag }}{% if pv.unit %}({{ pv.unit }}){% endif %}<!--
|
|
-->{% elsif pv.unit %}<!--
|
|
-->{{ pv.unit }}<!--
|
|
-->{% elsif pv.type %}<!--
|
|
-->{{ pv.type }}<!--
|
|
-->{% else %}<!--
|
|
-->Unknown<!--
|
|
-->{% endif %}<!--
|
|
-->{% if pv.optional %}]{% else %}>{% endif %}<!--
|
|
-->{% endif %}<!--
|
|
-->{% else %}<!--
|
|
--><<!--
|
|
-->{% for pv in parm.values %}<!--
|
|
-->{{ pv.tag }}<!--
|
|
-->{% if forloop.last != true %}|{% endif %}<!--
|
|
-->{% endfor %}<!--
|
|
-->><!--
|
|
-->{% endif %}<!--
|
|
-->{% endif %}<!--
|
|
-->{% if parm.optional %}]{% endif %}
|
|
</code><!--
|
|
-->{% if parm.since %} <span class="label label-success"><span data-toggle="tooltip" data-placement="bottom" title="Available since"><i class="fa fa-code" aria-hidden="true"></i> {{ parm.since }}</span></span>{% endif %}<!--
|
|
-->{% if parm.requires %}{% assign list = (parm.requires | split: ',') %}<!--
|
|
-->{% for item in list %}<!--
|
|
--> <span class="label label-requires"><span data-toggle="tooltip" data-placement="bottom" title="Option required">{{item}}</span></span><!--
|
|
-->{% endfor %}<!--
|
|
-->{% endif %}<!--
|
|
-->{% if parm.experimental %} <span class="label label-warning"><span data-toggle="tooltip" data-placement="bottom" title="Experimental option"><i class="fa fa-flask" aria-hidden="true"></i></span></span>{% endif %}<!--
|
|
--></td>
|
|
<td>
|
|
{{ parm.description | markdownify }}
|
|
{% if parm.values.size > 0 %}
|
|
<ul class="param-desc-list">
|
|
{% for pv in parm.values %}
|
|
{% if pv.description %}
|
|
<li><code>{{ parm.tag }}{{ pv.tag }}</code>: {{ pv.description | markdownify }}</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if gcode.images %}
|
|
<div class="col-lg-12 row gallery" id="gallery-{{ gcode.tag }}">
|
|
<h3>Gallery</h3>
|
|
{% for img in gcode.images %}
|
|
{% assign cap = img.caption | markdownify %}
|
|
{% assign ttl = img.title | markdownify | strip_html %}
|
|
<h4>{{ ttl }}</h4>
|
|
{{ cap }}
|
|
<img src="{{ img.path | prepend: '/assets/images/gcode/' }}" alt="{{ ttl | xml_escape }}" title="{{ ttl | xml_escape }}" />
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if gcode.videos %}
|
|
<div class="col-lg-12 row videos" id="videos-{{ gcode.tag }}">
|
|
<h3>Related Media</h3>
|
|
{% for videoid in gcode.videos %}
|
|
<iframe class="youtube" width="300" height="225" src="https://youtube.com/embed/{{ videoid }}"></iframe>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if conf.examples %}{% assign ex = conf.examples %}
|
|
{% elsif conf.example %}{% assign ex = conf.example %}
|
|
{% else %}{% assign ex = false %}{% endif %}
|
|
{% if ex %}
|
|
<div class="col-lg-12 row examples">
|
|
<h3>Example{% if ex[1] %}s{% endif %}</h3>
|
|
{% for example in ex %}
|
|
{% if example.pre %}
|
|
{% for line in example.pre %}
|
|
{{ line | markdownify }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% highlight gcode %}{% for line in example.code %}{{ line }}
|
|
{% endfor %}{% endhighlight %}
|
|
{% if example.post %}
|
|
<div class="post">
|
|
{% for line in example.post %}
|
|
{{ line | markdownify }}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|