From 386b467490abd1838ce1ca3535155d7190f30ab5 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Tue, 22 May 2018 12:24:49 +0200 Subject: [PATCH] Enumerate examples --- _layouts/bin.html | 4 ++++ style.scss | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) 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;