This commit is contained in:
inkss 2021-02-22 23:25:05 +08:00 committed by GitHub
parent b1b577f331
commit 611d4b9e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -25,7 +25,7 @@
<% 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='/wiki/'><%- __('btn.wiki') %></a>
<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) %>

View File

@ -1,9 +1,9 @@
<div class='nav-wrap'>
<nav class='sub wiki cap green'>
<% if (page.layout == 'index' && page.title && page.wiki) { %>
<a href='/wiki/'><%- __('btn.all_wiki') %></a>
<a href='<%- url_for(config.wiki_dir || "wiki" ) %>'><%- __('btn.all_wiki') %></a>
<% } else { %>
<a class='active' href='/wiki/'><%- __('btn.all_wiki') %></a>
<a class='active' href='<%- url_for(config.wiki_dir || "wiki" ) %>'><%- __('btn.all_wiki') %></a>
<% } %>
<%
var groups = [];

View File

@ -24,8 +24,12 @@ hexo.extend.tag.register('friends', function(args) {
el += '">';
function groupHeader(group) {
var header = '<div class="group-header">';
header += '<p class="title">' + group.title + '</p>';
header += '<p class="description">' + group.description + '</p>';
if (!!group.title) {
header += '<p class="title">' + group.title + '</p>';
}
if (!!group.description) {
header += '<p class="description">' + group.description + '</p>';
}
header += '</div>';
return header;
}