Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update indentation
  • Loading branch information
theangryhobbit committed Mar 30, 2021
commit c47d73bbc3a203a6fdef0e323bdc3338d40d7dc5
29 changes: 15 additions & 14 deletions _layouts/benchmarks.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@

{% assign folders = "" | split: ", " %}
{% for image in site.static_files %}
{% if image.path contains 'criterion/' %}
{% assign imagepath = image.path | split: "/" %}
{% for subpath in imagepath %}
{% if forloop.index0 == 3 %}
{% assign folders = folders | append: pathName %}
{% endif %}
{% endfor %}
{% endif %}
{% if image.path contains 'criterion/' %}
{% assign imagepath = image.path | split: "/" %}
{% for subpath in imagepath %}
{% if forloop.index0 == 3 %}
{% assign folders = folders | append: pathName %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% assign folders = folders | uniq %}

<!-- The code block below does exactly the same as the one above, which one is cleaner? -->
<!-- {% assign folders = "" | split: ", " %}
{% for folder in site.static_files %}
{% if folder.path contains 'criterion/' %}
Expand Down Expand Up @@ -63,12 +64,12 @@
<li {% if forloop.index==1 %} class="active" {% endif %}>
<br>
{% for image in site.static_files %}
{% if image.path contains folder %}
<figure>
<img src="{{ site.baseurl }}{{ image.path }}" alt="image" />
<figcaption>{{ image.name }}</figcaption>
</figure>
{% endif %}
{% if image.path contains folder %}
<figure>
<img src="{{ site.baseurl }}{{ image.path }}" alt="image" />
<figcaption>{{ image.name }}</figcaption>
</figure>
{% endif %}
{% endfor%}
</li>
{% endfor%}
Expand Down