forked from amehime/hexo-theme-shoka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
198 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ title: | |
|
||
menu: | ||
home: Home | ||
posts: Posts | ||
archives: Archives | ||
categories: Categories | ||
tags: Tags | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ title: | |
|
||
menu: | ||
home: 首页 | ||
posts: 文章 | ||
archives: 归档 | ||
categories: 分类 | ||
tags: 标签 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{% macro item(name, path, parent) %} | ||
{%- set path = path.split('||') %} | ||
{%- set itemURL = path[0] | trim %} | ||
{%- if not itemURL.startsWith('http') %} | ||
{%- set itemURL = itemURL | replace('//', '/') %} | ||
{%- endif %} | ||
{%- set menuIcon = '<i class="ic i-' + path[1] | trim + '"></i>' %} | ||
{%- set menuText = __('menu.' + name) | replace('menu.', '') %} | ||
{%- if parent %} | ||
<li class="item"> | ||
<a href="javascript:void(0);">{{menuIcon + menuText}}</a> | ||
<ul class="sub menu"> | ||
{%- else %} | ||
<li class="item"> | ||
{{ _url(itemURL, menuIcon + menuText, {rel: 'section'}) }} | ||
</li> | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
{%- for name, value in theme.menu %} | ||
{%- if value == '[object Object]' %} | ||
{%- for subname, subvalue in value %} | ||
{%- if subname == 'default' %} | ||
{{ item(name, subvalue, true) }} | ||
{%- else %} | ||
{{ item(subname, subvalue) }} | ||
{%- endif %} | ||
{%- endfor %} | ||
</ul> | ||
{%- else %} | ||
{{ item(name, value) }} | ||
{%- endif %} | ||
{%- endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.