assets/data/mmenu.html in j1-template-2022.3.0.rc1 vs assets/data/mmenu.html in j1-template-2022.3.0

- old
+ new

@@ -57,10 +57,15 @@ {% assign nav_menu_options = nav_menu_defaults | merge: nav_menu_settings %} {% assign themer_options = themer_defaults | merge: themer_settings %} {% assign theme_preview = themer_options.preview_page %} {% assign nav_menu_id = navigator_options.nav_mmenu.id %} +{% assign production = false %} +{% if environment == 'prod' or environment == 'production' %} + {% assign production = true %} +{% endif %} + {% assign ext = '' %} {% if site.permalink == 'none' %} {% assign ext = '.html' %} {% endif %} @@ -76,29 +81,20 @@ {% assign icon_style = navigator_options.icon_style %} {% assign icon_size = navigator_options.icon_size %} {% assign icon_color = navigator_options.icon_color %} -{% comment %} Detect prod mode --------------------------------------------------------------------------------- {% endcomment %} -{% assign production = false %} -{% if environment == 'prod' or environment == 'production' %} - {% assign production = true %} -{% endif %} - -{% comment %} Main -================================================================================ {% endcomment %} -<!-- [INFO ] [~/assets/data/mmenu.html ] [ set meta data (robots) to exclude HTML data files from index ] --> +<!-- [INFO ] [/assets/data/mmenu.html ] [ set meta data (robots) to exclude HTML data files from index ] --> <head> <meta name="robots" content="noindex, nofollow" /> </head> {% comment %} Main See: https://stackoverflow.com/questions/39935447/is-there-any-way-to-exclude-mathjax-processing-from-certain-html-elements -------------------------------------------------------------------------------- {% endcomment %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [collect all nav links for the mobile navigation ] --> - <!-- [INFO ] [~/assets/data/mmenu.html ] [id menu_mmenu set statically and MUST as configured ] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [collect all nav links for the mobile navigation ] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [id menu_mmenu set statically and MUST as configured ] --> <ul id="menu_mmenu" class="partial tex2jax_ignore" style="display:none"> {% for menu in navigator_menu_config %} {% comment %} Identify the menu (item) type @@ -123,12 +119,12 @@ {% case menu_type %} {% comment %} Collect items having a SUB menue ---------------------------------------------------------------------------- {% endcomment %} {% when 'sublevel_menu' %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [found menu-type: sub-menue] --> - <!-- [INFO ] [~/assets/data/mmenu.html ] [submenu level 1 detected] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [found menu-type: sub-menue] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [submenu level 1 detected] --> <li> {% if menu.icon == null %} <a href="#">{{menu.item}}</a> {% else %} <a href="#"> <i class="{{icon_style}} {{icon_family}}-{{menu.icon}} {{icon_size}} {{icon_color}} mr-2"></i>{{menu.item}}</a> @@ -151,11 +147,11 @@ {% endif %} {% endif %} {% endif %} {% if level_1.dropdown %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [submenu level 2 (dropdown) detected] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [submenu level 2 (dropdown) detected] --> <li> {% if level_1.icon == null %} <a href="#">{{level_1.title}}</a> {% else %} <a href="#"><i class="{{icon_style}} {{icon_family}}-{{level_1.icon}} {{icon_size}} {{icon_color}} mr-2"></i> {{level_1.title}}</a> @@ -177,11 +173,11 @@ <li><a href="{{level_2.href}}{{ext}}" target="{{level_2.target}}"><i class="{{icon_style}} {{icon_family}}-{{level_2.icon}} {{icon_size}} {{icon_color}} mr-2"></i> {{level_2.title}}</a></li> {% endif %} {% endif %} {% endif %} {% if level_2.dropdown %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [submenu level 3 detected (last level supported)] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [submenu level 3 detected (last level supported)] --> <li> {% if level_2.icon == null %} <a href="#" >{{level_2.title}}</a> {% else %} <a href="#" ><i class="{{icon_style}} {{icon_family}}-{{level_2.icon}} {{icon_size}} {{icon_color}} mr-2"></i> {{level_2.title}}</a> @@ -201,33 +197,33 @@ {% else %} <li><a href="{{level_3.href}}{{ext}}" target="{{level_3.target}}"><i class="{{icon_style}} {{icon_family}}-{{level_3.icon}} {{icon_size}} {{icon_color}} mr-2"></i> {{level_3.title}}</a></li> {% endif %} {% endif %} {% if level_3.divider %} <li class="divider"></li> {% endif %} - {% endfor %} <!-- [INFO ] [~/assets/data/mmenu.html ] [end processing: level 3] --> + {% endfor %} <!-- [INFO ] [/assets/data/mmenu.html ] [end processing: level 3] --> </ul> </li> {% endif %} - {% endfor %} <!-- [INFO ] [~/assets/data/mmenu.html ] [end processing: level 2] --> + {% endfor %} <!-- [INFO ] [/assets/data/mmenu.html ] [end processing: level 2] --> </ul> </li> {% endif %} - {% endfor %} <!-- [INFO ] [~/assets/data/mmenu.html ] [end processing: level 1] --> + {% endfor %} <!-- [INFO ] [/assets/data/mmenu.html ] [end processing: level 1] --> </ul> </li> - <!-- [INFO ] [~/assets/data/mmenu.html ] [reset menu_type for next loop] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [reset menu_type for next loop] --> {% assign menu_type = '' %} {% comment %} Collect items having a MEGA menu (disabled for now) ---------------------------------------------------------------------------- {% endcomment %} {% when 'mmmmmmmega_menu' %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [found menu-type: megamenu-menue] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [found menu-type: megamenu-menue] --> <!-- calculate size of mm_columns --> {% assign columns = menu.megamenu | size %} {% assign columns_width_md = 12 | divided_by:columns %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [Calculated size of mm_columns: {{columns_width_md}}] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [Calculated size of mm_columns: {{columns_width_md}}] --> <li> <a href="#" >{{menu.item}} </a> <ul> <li> @@ -253,99 +249,99 @@ {% endif %} {% endfor %} </ul> </div> </div> - <!-- [INFO ] [~/assets/data/mmenu.html ] [megamenu-menue: end megabox] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [megamenu-menue: end megabox] --> {% endfor %} </div> </li> </ul> </li> - <!-- [INFO ] [~/assets/data/mmenu.html ] [megamenu-menue: end mega-menu] --> - <!-- [INFO ] [~/assets/data/mmenu.html ] [reset menu_type for next loop] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [megamenu-menue: end mega-menu] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [reset menu_type for next loop] --> {% assign menu_type = '' %} {% comment %} Collect TOP-LEVEL items (NO sub-menu) -------------------------------------------------------------------------- {% endcomment %} {% when 'top_level_item' %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [found menu-type: menu-top-level-only] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [found menu-type: menu-top-level-only] --> {% if menu.icon == null %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [no icon for menu-item found --> + <!-- [INFO ] [/assets/data/mmenu.html ] [no icon for menu-item found --> {% if menu.target == null %} <li> <a href="{{menu.href}}{{ext}}">{{menu.item}}</a> </li> {% else %} <li> <a href="{{menu.href}}{{ext}}" target="{{menu.target}}">{{menu.item}}</a> </li> {% endif %} {% elsif menu.icon %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [no icon for menu-item found --> + <!-- [INFO ] [/assets/data/mmenu.html ] [no icon for menu-item found --> {% if menu.target == null %} <li> <a href="{{menu.href}}{{ext}}"><i class="{{icon_style}} {{icon_family}}-{{menu.icon}} {{icon_size}}"></i> {{menu.item}}</a> </li> {% else %} <li> <a href="{{menu.href}}{{ext}}" target="{{menu.target}}"><i class="{{icon_style}} {{icon_family}}-{{menu.icon}} {{icon_size}}"></i> {{menu.item}}</a> </li> {% endif %} {% else %} <!-- [FATAL ] [nav_menu.menu-top-level-only ] [processing menu item failed] --> {% endif %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [menu-top-level-only: end menu] --> - <!-- [INFO ] [~/assets/data/mmenu.html ] [reset menu_type for next loop] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [menu-top-level-only: end menu] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [reset menu_type for next loop] --> {% assign menu_type = '' %} {% comment %} Collect items having a LOGIN menu (disabled for now) ------------------------------------------------------------------------ {% endcomment %} {% when 'auth_client' %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [found menu-type: auth_client] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [found menu-type: auth_client] --> <li id="menuBarSignInOut" class="dropdown nav-item"> <a href="#">{{menu.item}} </a> <ul> {% assign item_found = 'false' %} {% for item in menu.auth_client %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [START: check signin] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [START: check signin] --> {% if item.mode == 'signin' %} <li> <a href="#" data-bs-toggle="modal" data-bs-target="#modalOmniSignIn"><i class="{{icon_style}} {{icon_family}}-{{item.icon}} {{icon_size}}"></i>{{item.title}}</a> </li> {% assign item_found = 'true' %} {% endif %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [END: check signin] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [END: check signin] --> - <!-- [INFO ] [~/assets/data/mmenu.html ] [START: check signout] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [START: check signout] --> {% if item.mode == 'signout' %} <li> <a href="#" data-bs-toggle="modal" data-bs-target="#modalOmniSignOut"><i class="{{icon_style}} {{icon_family}}-{{item.icon}} {{icon_size}}"></i>{{item.title}}</a> </li> {% assign item_found = 'true' %} {% endif %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [END: check signout] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [END: check signout] --> {% if item_found == 'false' %} - <!-- [FATAL ] [~/assets/data/mmenu.html ] [no valid menu item config found] --> + <!-- [FATAL ] [/assets/data/mmenu.html ] [no valid menu item config found] --> <li> {% if item.title %} <a href="#" >Invalid: {{item.title}}</a> {% else %} <a href="#" >Item invalid</a> {% endif %} </li> {% endif %} {% endfor %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [login_menu: end menu] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [login_menu: end menu] --> </ul> </li> - <!-- [INFO ] [~/assets/data/mmenu.html ] [reset menu_type for next loop] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [reset menu_type for next loop] --> {% assign menu_type = '' %} {% comment %} Collect items having a THEMES menu (disabled for now) ---------------------------------------------------------------------- {% endcomment %} {% when 'theme_select' %} {% if themer_options.enabled %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [found menu-type: theme_select] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [found menu-type: theme_select] --> <li> <a href="#">{{menu.item}} </a> {% if nav_menu_animation %} <ul> <!-- ul class="dropdown-menu data-in="{{nav_menu_animation}}" data-out="{{nav_menu_animation}}" --> @@ -387,28 +383,28 @@ </li> {% endif %} <!-- end fallback --> {% endfor %} </ul> </li> - <!-- [INFO ] [~/assets/data/mmenu.html ] [reset menu_type for next loop] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [reset menu_type for next loop] --> {% endif %} {% assign menu_type = '' %} {% comment %} Collect items failed ---------------------------------------------------------------------- {% endcomment %} {% else %} - <!-- [FATAL ] [~/assets/data/mmenu.html ] [detecting menu items|type failed] --> + <!-- [FATAL ] [/assets/data/mmenu.html ] [detecting menu items|type failed] --> {% assign menu_type = '' %} {% endcase %} {% endfor %} - <!-- [INFO ] [~/assets/data/mmenu.html ] [nav_menu_settings: end menu] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [nav_menu_settings: end menu] --> </ul> - <!-- [INFO ] [~/assets/data/mmenu.html ] [nav_menu_settings: end navbar] --> + <!-- [INFO ] [/assets/data/mmenu.html ] [nav_menu_settings: end navbar] --> <!-- div --> -<!-- [INFO ] [~/assets/data/mmenu.html ] [nav_menu_settings: end processing] --> +<!-- [INFO ] [/assets/data/mmenu.html ] [nav_menu_settings: end processing] --> {% endcapture %} {% if production %} {% capture _LINE_FEED %}{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ cache | strip_html_comments }}{% else %}{% capture _content %}{{ cache | strip_html_comments }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ cache | strip_html_comments | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %} {% else %}