Skip to content

Commit

Permalink
パンくずリストが冗長な問題に対応 #18
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Aug 23, 2017
1 parent 6d46673 commit d13dd1e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cpprefjp/templates/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,21 @@
<ol class="breadcrumb">
{% for header in content_header.headers %}
<li {{ 'class="active"' if header.is_active }} itemscope itemtype="http://www.schema.org/SiteNavigationElement">
<span>
{% if not header.is_active and header.href %}
<a href="{{ header.href }}" itemprop="url">
<span itemprop="name">
{{ header.title|e }}
</span>
{% if loop.index == 1 %}
<i class="glyphicon glyphicon-home"></i>
{% else %}
<span itemprop="name">{{ header.title|e }}</span>
{% endif %}
</a>
{% else %}
<span itemprop="name">
{{ header.title|e }}
</span>
{% if loop.index == 1 %}
<i class="glyphicon glyphicon-home"></i>
{% else %}
<span itemprop="name">{{ header.title|e }}</span>
{% endif %}
{% endif %}
</span>
</li>
Expand Down

0 comments on commit d13dd1e

Please sign in to comment.