diff --git a/_layouts/bin.html b/_layouts/bin.html index 92caa10..ef14d09 100644 --- a/_layouts/bin.html +++ b/_layouts/bin.html @@ -21,6 +21,8 @@ layout: common {{ site.data.functions[function_name].description | markdownify }} +
+ {% for example in examples %}
@@ -43,4 +45,6 @@ sudo chmod +s ./{{ bin_name }} {% endfor %} +
+ {% endfor %} diff --git a/style.scss b/style.scss index 2dd6be2..136b421 100644 --- a/style.scss +++ b/style.scss @@ -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 { font-family: monospace;