55 lines
2.4 KiB
Plaintext
55 lines
2.4 KiB
Plaintext
<% if (page.breadcrumb != false) { %>
|
|
<div class='breadcrumb-navigation'>
|
|
<% if (page.layout == 'post') { %>
|
|
<div id='breadcrumb'>
|
|
<a class='cap breadcrumb' href='/'><%- __('btn.home') %></a>
|
|
<span class="sep"></span>
|
|
<a class='cap breadcrumb' href='/'><%- __('btn.blog') %></a>
|
|
<% if (page.layout == 'post' && page.categories && page.categories.length > 0) { %>
|
|
<span class="sep"></span>
|
|
<%- list_categories(page.categories, {
|
|
class: 'cap breadcrumb cat',
|
|
show_count: false,
|
|
separator: ' <span class="sep"></span> ',
|
|
style: 'none'
|
|
}) %>
|
|
<% } %>
|
|
</div>
|
|
<div id='post-meta'>
|
|
<%- __('meta.created') %> <time datetime='<%- date_xml(page.date) %>'><%- date(page.date, config.date_format) %></time>
|
|
</div>
|
|
<% } else if (page.layout == 'wiki') { %>
|
|
<div id='breadcrumb'>
|
|
<a class='cap breadcrumb' href='/'><%- __('btn.home') %></a>
|
|
<span class="sep"></span>
|
|
<% if (page.menu_id && theme.sidebar.menu[page.menu_id] && theme.sidebar.menu[page.menu_id].url) { %>
|
|
<a class='cap breadcrumb' href='<%- url_for(theme.sidebar.menu[page.menu_id].url) %>'><%- __(theme.sidebar.menu[page.menu_id].title) %></a>
|
|
<% } else { %>
|
|
<a class='cap breadcrumb' href='<%- url_for(config.wiki_dir || "wiki" ) %>'><%- __('btn.wiki') %></a>
|
|
<% } %>
|
|
<% site.pages.filter(function (p) { %>
|
|
<% return p.layout == 'index' && p.title && p.wiki && p.wiki.includes(page.wiki) %>
|
|
<% }).limit(1).each(function(p) { %>
|
|
<span class="sep"></span>
|
|
<a class='cap breadcrumb' href='<%- url_for(p.path) %>'><%- p.title %></a>
|
|
<% }); %>
|
|
<% site.pages.filter(function (p) { %>
|
|
<% return p.layout == 'wiki' && p.wiki == page.wiki && p.description %>
|
|
<% }).limit(1).each(function(p) { %>
|
|
<span class="sep"></span>
|
|
<a class='cap breadcrumb' href='<%- url_for(p.path) %>'><%- page.wiki %></a>
|
|
<% }); %>
|
|
</div>
|
|
<div id='post-meta'>
|
|
<%- __('meta.updated') %> <time datetime='<%- date_xml(page.updated) %>'><%- date(page.updated, config.date_format) %></time>
|
|
</div>
|
|
<% } else { %>
|
|
<div id='breadcrumb'>
|
|
<a class='cap breadcrumb' href='/'><%- __('btn.home') %></a>
|
|
<span class="sep"></span>
|
|
<a class='cap breadcrumb' href='<%- url_for(page.path) %>'><%- page.title || page.seo_title %></a>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
<% } %>
|