--- regenerate: true --- {% capture cache %} {% comment %} # ----------------------------------------------------------------------------- # ~/assets/data/mmenu_sidebar.html # Liquid PROCEDURE template to create the HTML portion of the MMenu Sidebar # NOTE: Loaded dynamically by J1 NAV Manager module (AJAX) # # Product/Info: # https://jekyll.one # # Copyright (C) 2020 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE # ----------------------------------------------------------------------------- # Test data: # liquid_var: {{ liquid_var | debug }} # ----------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% capture select_color %}themes/{{site.template.name}}/procedures/global/select_color.proc{% endcapture %} {% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %} {% comment %} Liquid var initialization -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign navigator_defaults = site.data.modules.defaults.navigator.defaults %} {% assign navigator_settings = site.data.modules.navigator.settings %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign nav_mmenu_defaults = navigator_defaults.nav_mmenu %} {% assign nav_mmenu_settings = navigator_settings.nav_mmenu %} {% comment %} Set config options ------------------------------------------------------------------------------ {% endcomment %} {% assign nav_mmenu_options = nav_mmenu_defaults | merge: nav_mmenu_settings %} {% comment %} Set sidebar properties ------------------------------------------------------------------------------ {% endcomment %} {% assign display_user_info = sidebar_options.display_user_info %} {% assign display_theme = sidebar_options.display_theme %} {% assign close_icon = sidebar_options.close_icon %} {% comment %} Set global settings ------------------------------------------------------------------------------ {% endcomment %} {% assign nav_bar_id = navigator_defaults.id %} {% assign nav_navbar_media_breakpoint = navigator_defaults.nav_bar.media_breakpoint %} {% comment %} Main ------------------------------------------------------------------------------ {% endcomment %} {% for item in nav_mmenu_options.menus %} {% if item.menu.xhr_container_id == "navigator_sidebar_mmenu" %} {% assign sidebar_options = item.menu.content %} {% endif %} {% endfor %} {% if sidebar_options.icon_family == 'FontAwesome' or sidebar_options.icon_family == 'FontAwesome4' or sidebar_options.icon_family == 'FontAwesome5' %} {% assign icon_family = 'fa' %} {% elsif sidebar_options.icon_family == 'MDI' or sidebar_options.icon_family == 'Material Design Icons'%} {% assign icon_family = 'mdi' %} {% else %} {% assign icon_family = 'mdi' %} {% endif %} {% include {{select_color}} color=sidebar_options.icon_color fallback="#9E9E9E" %} {% capture icon_color %}style="color: {{color}}"{% endcapture %} {% include {{select_icon_size}} family=icon_family size=sidebar_options.icon_size %} {% assign icon_size = size %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %}
{% for boxes in sidebar_options.boxes %} {% for box in boxes %} {% for item in box[1] %} {% assign key = item[0] %} {% assign value = item[1] %} {% if key == 'enabled' %} {% assign enabled = value %} {% endif %} {% if key == 'type' %} {% assign type = value %} {% endif %} {% if key == 'title' %} {% assign title = value %} {% endif %} {% if key == 'type' %} {% assign type = value %} {% endif %} {% if key == 'links' %} {% assign links = value %} {% endif %} {% endfor %} {% if enabled %} {% case type %} {% comment %} Collect USER info ---------------------------------------------------------------------- {% endcomment %} {% when 'user_info' %}

{{title}}

{% comment %} END Collect USER info ---------------------------------------------------------------------- {% endcomment %} {% comment %} Reset element variables ---------------------------------------------------------------------- {% endcomment %} {% assign enabled = nil %} {% assign type = nil %} {% assign title = nil %} {% assign type = nil %} {% assign links = nil %} {% comment %} Collect THEME info ---------------------------------------------------------------------- {% endcomment %} {% when 'theme_info' %}

{{title}}

{% comment %} END Collect THEME info ---------------------------------------------------------------------- {% endcomment %} {% comment %} Reset element variables ---------------------------------------------------------------------- {% endcomment %} {% assign enabled = nil %} {% assign type = nil %} {% assign title = nil %} {% assign type = nil %} {% assign links = nil %} {% comment %} Collect SITE info ---------------------------------------------------------------------- {% endcomment %} {% when 'site_info' %}

{{title}}

{% comment %} END Collect SITE info ---------------------------------------------------------------------- {% endcomment %} {% comment %} Reset element variables ---------------------------------------------------------------------- {% endcomment %} {% assign enabled = nil %} {% assign type = nil %} {% assign title = nil %} {% assign type = nil %} {% assign links = nil %} {% endcase %} {% endif %} {% endfor %} {% endfor %}
{% endcapture %} {{ cache | pretty_print | remove:'' | remove:'' | strip_empty_lines }} {% assign cache = nil %}