163 lines
6.2 KiB
HTML
163 lines
6.2 KiB
HTML
{% if page.name == conf.name %}
|
|
{% assign ispage = true %}
|
|
{% if page.category contains 'in-review' %}
|
|
{% alert info %}This page is marked for review. The following information may be outdated or may no longer apply to the latest Marlin.{% endalert %}
|
|
{% elsif page.category contains 'wip' %}
|
|
{% alert info %}This page is under construction and may not have complete or up-to-date information.{% endalert %}
|
|
{% endif %}
|
|
{% assign h1 = "h1" %}{% assign h3 = "h3" %}
|
|
{% if page.label %}{% assign title = page.label %}{% else %}{% assign title = false %}{% endif %}
|
|
{% if page.since %}{% assign since = page.since %}{% else %}{% assign since = false %}{% endif %}
|
|
{% if page.tags %}{% assign tags = page.tags | join: ", " %}{% else %}{% assign tags = false %}{% endif %}
|
|
<p id="authors" class="text-right pull-right visible-lg-block hidden-print small custom-pt25">
|
|
{% assign authors = conf.author | append: ',' | append: conf.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>
|
|
{% else %}
|
|
{% assign ispage = false %}
|
|
{% assign h1 = "h4" %}{% assign h3 = "h5" %}
|
|
{% assign title = "#define <span>" | append: conf.name | append: "</span> <em>" | append: conf.type | append: "</em>" %}
|
|
{% if conf.disabled %}{% assign title = "//" | append: title %}{% endif %}
|
|
{% if conf.since %}{% assign since = conf.since %}
|
|
{% elsif parsince %}{% assign since = parsince %}
|
|
{% else %}{% assign since = false %}{% endif %}
|
|
{% if conf.tags %}{% assign tags = conf.tags | join: ", " %}
|
|
{% elsif partags %}{% assign tags = partags | join: ", " %}
|
|
{% else %}{% assign tags = false %}{% endif %}
|
|
{%- endif -%}
|
|
|
|
<div class="detail-header">
|
|
{%- if since -%}
|
|
<div class="since">
|
|
<span class="label label-success"><i class="fa fa-code" aria-hidden="true"></i>
|
|
{{- since }}{% if conf.until %} - {{ conf.until }}{% endif %}</span>
|
|
</div>
|
|
{%- endif -%}
|
|
|
|
<a name="{{ conf.name }}"></a><{{ h1 }}{% if conf.disabled %} class="dis"{% endif %}>{{ title }}</{{ h1 }}>
|
|
|
|
{% if conf.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 %}
|
|
</div>
|
|
|
|
{% if conf.related %}
|
|
<div class="related">
|
|
Related codes: {% for item in conf.related %}<a href="/docs/gcode/{{ item | linkify }}.html"><code>{{item}}</code></a> {% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if ispage %}
|
|
{% if page.content %}<{{ h3 }}>Description</{{ h3 }}>{% endif %}
|
|
{% endif %}
|
|
|
|
{% if conf.brief %}
|
|
<div class="brief">{{conf.brief | markdownify }}</div>
|
|
{% endif %}
|
|
|
|
{% if conf.requires %}
|
|
<div class="requires"><strong>⚠️ Requires: {{ conf.requires }}</strong></div>
|
|
{% endif %}
|
|
|
|
<div class="long">
|
|
{% if tags %}
|
|
<div class="tags"><span class="label label-default"><i class="fa fa-tags" aria-hidden="true"></i> {{ tags }}</span></div>
|
|
{% endif %}
|
|
{% if ispage %}
|
|
{% if page.content %}{{ page.content | markdownify }}{% endif %}
|
|
{% else %}
|
|
{% if conf.long %}{{ conf.long | markdownify }}{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if conf.options %}
|
|
{% if conf.options >= 0 and page.shared[conf.options] %}
|
|
{% assign options = page.shared[conf.options].options %}
|
|
{% else %}
|
|
{% assign options = conf.options %}
|
|
{% endif %}
|
|
{% else %}
|
|
{% assign options = false %}
|
|
{% endif %}
|
|
{%- if options %}
|
|
<div class="options">
|
|
<{{ h3 }}>Options</{{ h3 }}>
|
|
{% if options[0].value %}
|
|
<table{% if options.size > 4 %} class="table-striped"{% endif %}>
|
|
{%- for op in options -%}
|
|
<tr><th>{{ op.value }}</th><td>{% if op.brief %}{{ op.brief }}{% endif %}</td></tr>
|
|
{%- endfor -%}
|
|
</table>
|
|
{% else %}
|
|
{{ options | join: ", " }}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if conf.example %}{% assign example = conf.example %}
|
|
{% elsif conf.examples %}{% assign example = conf.examples %}
|
|
{% else %}{% assign example = false %}{% endif %}
|
|
{%- if example %}
|
|
<div class="examples">
|
|
<{{ h3 }}>Example{% if example[1] %}s{% endif %}</{{ h3 }}>
|
|
{% for ex in example %}
|
|
{% if ex.pre %}
|
|
{% for line in ex.pre %}
|
|
{{ line | markdownify }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if ex.value or ex.code %}
|
|
{% highlight cpp %}{% if ex.value %}#define {{ conf.name }} {{ ex.value }}{% if ex.comment %} // {{ ex.comment }}{% endif %}{% endif %}
|
|
{%- for line in ex.code %}{{ line }}{% endfor %}{% endhighlight %}
|
|
{% endif %}
|
|
{% if ex.post %}
|
|
<div class="post">
|
|
{% for line in ex.post %}
|
|
{{ line | markdownify }}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if conf.images %}
|
|
<div class="gallery" id="gallery-{{ conf.tag }}">
|
|
<{{ h3 }}>Gallery</{{ h3 }}>
|
|
{% for img in conf.images %}
|
|
{% assign cap = img.caption | markdownify %}
|
|
{% assign ttl = img.title | markdownify | strip_html %}
|
|
<h4>{{ ttl }}</h4>
|
|
{{ cap }}
|
|
<img src="{{ img.path | prepend: '/assets/images/config/' }}" alt="{{ ttl | xml_escape }}" title="{{ ttl | xml_escape }}" />
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if conf.videos %}
|
|
<div class="videos" id="videos-{{ conf.tag }}">
|
|
<{{ h3 }}>Related Media</{{ h3 }}>
|
|
{% for videoid in conf.videos %}
|
|
<iframe class="youtube" width="300" height="225" src="https://youtube.com/embed/{{ videoid }}"></iframe>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Recursively display sub-options by re-including this template -->
|
|
{% if conf.subopts %}{% assign sub = conf.subopts %}{% assign label = "Sub-Options" %}
|
|
{% elsif conf.settings %}{% assign sub = conf.settings %}{% assign label = "Settings" %}
|
|
{% else %}{% assign sub = false %}{% endif %}
|
|
{% if sub %}
|
|
{% assign thisconf = conf %}
|
|
{% for conf in sub %}
|
|
{% if conf contains 'since' %}{% else %}{% assign parsince = thisconf.since %}{% endif %}
|
|
{% if conf contains 'tags' %}{% else %}{% assign partags = thisconf.tags %}{% endif %}
|
|
<div class="subopt">{% include setting-info.html %}</div>
|
|
{% endfor %}
|
|
{% assign conf = thisconf %}
|
|
{% endif %}
|