Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
Created March 29, 2012 13:35
Show Gist options
  • Save mattintosh4/2237477 to your computer and use it in GitHub Desktop.
Save mattintosh4/2237477 to your computer and use it in GitHub Desktop.
So-netブログ用パンくずリスト
<ol class="breadcrumbs">
<li><a href="" title="blog name">blog name</a></li>
<li><a href="" title="category name">category name</a></li>
<li>article name</li>
</ol>
<ol class="breadcrumbs">
<li><a href="" title="blog name">blog name</a></li>
<li>article name</li>
</ol>
.breadcrumbs{
margin:1em 0;
padding:0;
list-style:none;
}
.breadcrumbs li{
display:inline;
}
.breadcrumbs li:before{
content:"\003e";
margin:0 .5em;
}
.breadcrumbs li:first-child:before{
content:"";
margin:0;
}
<% if:page_name eq 'article' -%>
<ol class="breadcrumbs">
<li><a href="<% blog.page_url | html %>" title="<% blog.title | html %>"><% blog.title | html %></a></li>
<% unless:article_category.name eq '未分類' -%>
<li><a href="<% article_category.page_url | html %>" title="<% article_category.name | html %>"><% article_category.name | html %></a></li>
<% /unless -%>
<li><% article.subject | html %></li>
</ol><!-- / .breadcrumbs -->
<!-- / if:page_name eq 'article --><% /if -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment