mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Allow empty menu items
This commit is contained in:
parent
75695df76a
commit
a527bfdf11
10
_config.yml
10
_config.yml
@ -3,12 +3,6 @@
|
||||
# See: https://theme-next.org/docs/theme-settings/
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# If false, merge configs from `_data/next.yml` into default configuration (rewrite).
|
||||
# If true, will fully override default configuration by options from `_data/next.yml` (override). Only for NexT settings.
|
||||
# And if true, all config from default NexT `_config.yml` have to be copied into `next.yml`. Use if you know what you are doing.
|
||||
# Useful if you want to comment some options from NexT `_config.yml` by `next.yml` without editing default config.
|
||||
override: false
|
||||
|
||||
# Console reminder if new version released.
|
||||
reminder: false
|
||||
|
||||
@ -116,11 +110,11 @@ darkmode: false
|
||||
# When running the site in a subdirectory (e.g. yoursite.com/blog), remove the leading slash from link value (/archives -> archives).
|
||||
# External url should start with http:// or https://
|
||||
menu:
|
||||
home: / || fa fa-home
|
||||
#home: / || fa fa-home
|
||||
#about: /about/ || fa fa-user
|
||||
#tags: /tags/ || fa fa-tags
|
||||
#categories: /categories/ || fa fa-th
|
||||
archives: /archives/ || fa fa-archive
|
||||
#archives: /archives/ || fa fa-archive
|
||||
#schedule: /schedule/ || fa fa-calendar
|
||||
#sitemap: /sitemap.xml || fa fa-sitemap
|
||||
#commonweal: /404/ || fa fa-heartbeat
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
<div class="site-brand-container">
|
||||
<div class="site-nav-toggle">
|
||||
<div class="toggle" aria-label="{{ __('accessibility.nav_toggle') }}">
|
||||
<span class="toggle-line toggle-line-first"></span>
|
||||
<span class="toggle-line toggle-line-middle"></span>
|
||||
<span class="toggle-line toggle-line-last"></span>
|
||||
{%- if theme.menu %}
|
||||
<span class="toggle-line toggle-line-first"></span>
|
||||
<span class="toggle-line toggle-line-middle"></span>
|
||||
<span class="toggle-line toggle-line-last"></span>
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{% import 'menu-item.njk' as menu_item with context %}
|
||||
|
||||
<nav class="site-nav">
|
||||
{%- if theme.menu %}
|
||||
<nav class="site-nav">
|
||||
<ul id="menu" class="main-menu menu">
|
||||
{%- for name, path in theme.menu %}
|
||||
{%- set respath = path %}
|
||||
@ -30,5 +30,5 @@
|
||||
</li>
|
||||
{%- endif %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
</nav>
|
||||
{%- endif %}
|
||||
|
||||
@ -11,6 +11,7 @@ NexT.boot.registerEvents = function() {
|
||||
document.querySelector('.site-nav-toggle .toggle').addEventListener('click', () => {
|
||||
event.currentTarget.classList.toggle('toggle-close');
|
||||
var siteNav = document.querySelector('.site-nav');
|
||||
if (!siteNav) return;
|
||||
var animateAction = siteNav.classList.contains('site-nav-on') ? 'slideUp' : 'slideDown';
|
||||
|
||||
if (typeof Velocity === 'function') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user