cmd: theme data file support menu
This commit is contained in:
parent
e7fb4f86bd
commit
f1b58aa447
3 changed files with 28 additions and 15 deletions
|
@ -1,3 +1,7 @@
|
|||
menu:
|
||||
Home: /
|
||||
Archives: /archives
|
||||
|
||||
copyright_addtional: ""
|
||||
|
||||
copyright_year_string: "2020-2021"
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
|
||||
# html lang
|
||||
language:
|
||||
- zh-cn
|
||||
- en
|
||||
|
||||
# main menu navigation
|
||||
menu:
|
||||
Home: /
|
||||
About: /about
|
||||
Contact: /contact
|
||||
Archives: /archives
|
||||
|
||||
# stylesheets loaded in the <head>
|
||||
|
@ -27,10 +24,10 @@ copyright_year_string: "2020-2021"
|
|||
|
||||
theme_self_claim: true
|
||||
|
||||
about_this_blog: 这里是Rubicon's Rubicon。我在无界之点的偏安之地。
|
||||
about_this_blog: This blog is created with Classical Material Desgin theme, which is a original taste of Material Design for hexo.
|
||||
|
||||
my_mastodon: "https://mastodon.social/@thislight"
|
||||
my_mastodon: https://mastodon.example.com/@example
|
||||
|
||||
footer_links:
|
||||
GitHub: "https://github.com/thislight"
|
||||
GitLab: "https://gitlab.com/thislight"
|
||||
Link 1: "https://example.org"
|
||||
Link 2: "https://example.com"
|
||||
|
|
|
@ -46,17 +46,29 @@
|
|||
</head>
|
||||
<body>
|
||||
<ul id="nav-mobile" class="sidenav">
|
||||
{% if site.data.theme.menu %}
|
||||
{% for key in Object.keys(site.data.theme.menu) %}
|
||||
<li><a href="{{ site.data.theme.menu[key] }}">{{ key }}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key in Object.keys(theme.menu) %}
|
||||
<li><a href="{{ theme.menu[key] }}">{{ key }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
<nav class="light-blue lighten-1" role="navigation">
|
||||
<a href="#" data-target="nav-mobile" class="sidenav-trigger"><div class="mdi mdi-menu"></div></a>
|
||||
<div class="nav-wrapper">
|
||||
<ul class="right hide-on-med-and-down">
|
||||
{% if site.data.theme.menu %}
|
||||
{% for key in Object.keys(site.data.theme.menu) %}
|
||||
<li><a href="{{ site.data.theme.menu[key] }}">{{ key }}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for key in Object.keys(theme.menu) %}
|
||||
<li><a href="{{ theme.menu[key] }}">{{ key }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in a new issue