Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Refactor sub-menu
  • Loading branch information
stevenjoezhang committed Oct 17, 2019
commit 1354fda3c2c301eaa70458070914fbdbcdc4e7ec
3 changes: 0 additions & 3 deletions layout/_layout.swig
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
<main class="main">
<div class="main-inner">
<div class="content-wrap">
{%- if theme.scheme === 'Pisces' or theme.scheme === 'Gemini' %}
{% include '_partials/header/sub-menu.swig' %}
{%- endif %}
<div class="content">
{% block content %}{% endblock %}
</div>
Expand Down
4 changes: 0 additions & 4 deletions layout/_partials/header/index.swig
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

<nav class="site-nav">
{{ partial('_partials/header/menu.swig', {}, {cache: theme.cache.enable}) }}

{%- if theme.scheme === 'Muse' or theme.scheme === 'Mist' %}
{% include 'sub-menu.swig' %}
{%- endif %}
</nav>

{%- if hasSearch %}
Expand Down
5 changes: 3 additions & 2 deletions layout/_partials/header/sub-menu.swig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{%- if theme.menu and not is_home() and not is_post() %}
{% import 'menu-item.swig' as menu_item %}
{% import 'menu-item.swig' as menu_item %}

{%- if theme.menu %}

{# Submenu & Submenu-2 #}
{%- for name, value in theme.menu %}
Expand Down
2 changes: 2 additions & 0 deletions layout/page.swig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

{% block content %}

{% include '_partials/header/sub-menu.swig' %}

<div class="posts-expand">
{##################}
{### PAGE BLOCK ###}
Expand Down