Refactor examples using an unordered list

This commit is contained in:
Andrea Cardaci 2018-06-04 21:58:16 +02:00
parent 2696bc3cde
commit 7ffd50392b
2 changed files with 7 additions and 5 deletions

View File

@ -21,7 +21,7 @@ layout: common
{{ site.data.functions[function_name].description | markdownify }} {{ site.data.functions[function_name].description | markdownify }}
<div class="examples"> <ul class="examples">
{% for example in examples %} {% for example in examples %}
@ -33,13 +33,13 @@ sudo sh -c 'chown 0 ./{{ bin_name }}; chmod +s ./{{ bin_name }}'
{{ example.code }} {{ example.code }}
{% endcapture %} {% endcapture %}
<div class="example"> <li>
{{ example.description | markdownify }} {{ example.description | markdownify }}
<pre><code>{{- code | strip -}}</code></pre> <pre><code>{{- code | strip -}}</code></pre>
</div> </li>
{% endfor %} {% endfor %}
</div> </ul>
{% endfor %} {% endfor %}

View File

@ -149,8 +149,10 @@ h2, h3, h4, h5, h5 {
width: 100%; width: 100%;
table-layout: fixed; table-layout: fixed;
counter-reset: item; counter-reset: item;
margin: 0;
padding: 0;
.example:not(:only-child) { li:not(:only-child) {
display: table-row; display: table-row;
&:before { &:before {