This commit is contained in:
2019-05-30 18:52:14 +08:00
commit aa360a22bf
341 changed files with 30369 additions and 0 deletions

View File

@ -0,0 +1,39 @@
<div class="site-brand-wrapper">
<div class="site-meta{% if theme.custom_logo.enable %} custom-logo{% endif %}">
{% if theme.custom_logo.enable and theme.custom_logo.image and theme.scheme === 'Muse' %}
<div class="site-meta-headline">
<a>
<img class="custom-logo-image" src="{{ theme.custom_logo.image }}" alt="{{ title }}"/>
</a>
</div>
{% endif %}
<div class="custom-logo-site-title">
<a href="{{ config.root }}" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">{{ title }}</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
{% if subtitle %}
{% if theme.seo %}
<h1 class="site-subtitle" itemprop="description">{{ subtitle }}</h1>
{% else %}
<p class="site-subtitle">{{ subtitle }}</p>
{% endif %}
{% endif %}
{% if theme.custom_logo.enable and theme.custom_logo.image and (theme.scheme === 'Gemini' or theme.scheme === 'Pisces') %}
<a>
<img class="custom-logo-image" src="{{ theme.custom_logo.image }}" alt="{{ title }}"/>
</a>
{% endif %}
</div>
<div class="site-nav-toggle">
<button aria-label="{{ __('accessibility.nav_toggle') }}">
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
</div>

View File

@ -0,0 +1,9 @@
{{ partial('_partials/header/brand.swig', {}, {cache: theme.cache.enable}) }}
{% include 'menu.swig' %}
{% if theme.custom_file_path.header %}
{% set custom_header = '../../../../../' + theme.custom_file_path.header %}
{% else %}
{% set custom_header = '../../_custom/header.swig' %}
{% endif %}
{% include custom_header %}

View File

@ -0,0 +1,52 @@
{% import '../../_macro/menu/menu-item.swig' as menu_item %}
<nav class="site-nav">
{% if theme.menu %}
<ul id="menu" class="menu">
{% for name, path in theme.menu %}
{% set respath = path %}
{% if path == '[object Object]' %}
{# Main Menu (default menu item for Submenu) #}
{% for subname, subpath in path %}
{% set itemName = subname.toLowerCase() %}
{% set respath = subpath %}
{% if itemName == 'default' %}
{% set itemName = name.toLowerCase() %}
{{ menu_item.render(name, respath) }}
{% endif %}
{% endfor %}
{% else %}
{# Main Menu (standart menu items) #}
{% set itemName = name.toLowerCase() %}
{{- menu_item.render(name, respath) | trim -}}
{%- endif -%}
{%- endfor %}
{% set hasSearch = theme.swiftype_key || theme.algolia_search.enable || theme.local_search.enable %}
{% if hasSearch %}
<li class="menu-item menu-item-search">
{% if theme.swiftype_key %}
<a href="javascript:;" class="st-search-show-outputs">
{% elif theme.local_search.enable || theme.algolia_search.enable %}
<a href="javascript:;" class="popup-trigger">
{% endif %}
{% if theme.menu_settings.icons %}
<i class="menu-item-icon fa fa-search fa-fw"></i> <br/>{#
#}{% endif %}{#
#}{{ __('menu.search') }}{#
#}</a>
</li>
{% endif %}
</ul>
{% endif %}
{% if theme.scheme === 'Muse' || theme.scheme === 'Mist' %}
{% include 'sub-menu.swig' %}
{% endif %}
{% if hasSearch %}
<div class="site-search">
{% include '../search/index.swig' %}
</div>
{% endif %}
</nav>

View File

@ -0,0 +1,100 @@
{% if not is_home() && not is_post() %}
{% if theme.menu %}
{% import '../../_macro/menu/menu-item.swig' as menu_item %}
{# Submenu & Submenu-2 #}
{% for name, value in theme.menu %}
{% set respath = value %}
{% if value == '[object Object]' %}
{# If current URL is value of parent submenu 'default' path #}
{% set currentParentUrl = page.path.split('/')[0] | trim %}
{% if currentParentUrl == value.default.split('||')[0] | trim | replace('/', '', 'g') %}
{# Submenu items #}
<ul id="sub-menu" class="sub-menu menu">
{% for subname, subvalue in value %}
{# For main submenu items #}
{% if subvalue != '[object Object]' %}
{% set itemName = subname.toLowerCase() %}
{% if itemName == 'default' %}
{% set parentValue = subvalue.split('||')[0] | trim %}
{% else %}
{% if subvalue.indexOf('http') == 0 %}
{% set respath = subvalue %}
{% else %}
{% set respath = parentValue + subvalue %}
{% endif %}
{{ menu_item.render(subname, respath) }}
{% endif %}
{% else %}
{# For 'default' submenu item in main submenu #}
{% set itemName = subname.toLowerCase() %}
{% for subname2, subvalue2 in subvalue %}
{% if subname2 == 'default' %}
{% set respath = parentValue + subvalue2 %}
{{ menu_item.render(subname, respath) }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{# End Submenu items #}
{# Submenu-2 #}
{% for name, value in theme.menu %}
{% set respath = value %}
{% if value == '[object Object]' %}
{% for subname, subvalue in value %}
{% set itemName = subname.toLowerCase() %}
{% if itemName == 'default' %}
{% set parentValue = subvalue.split('||')[0] | trim %}
{% endif %}
{% if subvalue == '[object Object]' %}
{# If current URL is value of parent submenu 'default' path #}
{% set paths = page.path.split('/') %}
{% if paths.length > 2 %}
{% if paths[1] == subvalue.default.split('||')[0] | trim | replace('/', '', 'g') %}
{# Submenu-2 items #}
<ul id="sub-menu-2" class="sub-menu menu">
{% for subname2, subvalue2 in subvalue %}
{% set respath2 = subvalue %}
{% set itemName = subname2.toLowerCase() %}
{% if itemName == 'default' %}
{% set parentSubValue = subvalue2.split('||')[0] | trim %}
{% else %}
{% if subvalue2.indexOf('http') == 0 %}
{% set respath2 = subvalue2 %}
{% else %}
{% set respath2 = parentValue + parentSubValue + subvalue2 %}
{% endif %}
{{ menu_item.render(subname2, respath2) }}
{% endif %}
{% endfor %}
</ul>
{# End Submenu-2 items #}
{% endif %}
{% endif %}
{# End URL & path comparing #}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{# End Submenu-2 #}
{% endif %}
{# End URL & path comparing #}
{% endif %}
{% endfor %}
{# End Submenu & Submenu-2 #}
{% endif %}
{% endif %}