Enumerate examples

This commit is contained in:
Andrea Cardaci 2018-05-22 12:24:49 +02:00
parent 67a480ccce
commit 386b467490
2 changed files with 27 additions and 1 deletions

View File

@ -21,6 +21,8 @@ layout: common
{{ site.data.functions[function_name].description | markdownify }} {{ site.data.functions[function_name].description | markdownify }}
<div class="examples">
{% for example in examples %} {% for example in examples %}
<div class="example"> <div class="example">
@ -43,4 +45,6 @@ sudo chmod +s ./{{ bin_name }}
{% endfor %} {% endfor %}
</div>
{% endfor %} {% endfor %}

View File

@ -104,7 +104,29 @@ a:hover {
} }
} }
// classes // bin examples
.examples {
display: table;
width: 100%;
table-layout: fixed;
counter-reset: item;
.example:not(:only-child) {
display: table-row;
&:before {
display: table-cell;
font-size: 0.8rem;
width: 2em;
text-align: center;
counter-increment: item;
content: counter(item) ".";
}
}
}
// other classes
.bin-name { .bin-name {
font-family: monospace; font-family: monospace;