{% comment %} # ----------------------------------------------------------------------------- # ~/_includes/themes/j1/modules/navigator/generator.html # Liquid HTML template to create the Navigation System for J1 Template # (includes all containers needed for MMenu) # # 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 %} {% include themes/{{site.template.name}}/procedures/global/setup.proc %} {% capture select_color %}themes/{{site.template.name}}/procedures/global/select_color.proc{% endcapture %} {% capture topsearch_create %}themes/{{site.template.name}}/modules/navigator/procedures/topsearch.proc{% endcapture %} {% comment %} Not longer used (loaded via AJAX) -------------------------------------------------------------------------------- {% capture sidebar_create %}themes/{{site.template.name}}/modules/navigator/procedures/sidebar.proc{% endcapture %} {% capture quicklinks_create %}themes/{{site.template.name}}/modules/navigator/procedures/quicklinks.proc{% endcapture %} -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Process YML config data ================================================================================ {% endcomment %} {% comment %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign site_config = site %} {% assign template_config = site.data.template_settings %} {% assign blocks = site.data.blocks %} {% assign modules = site.data.modules %} {% comment %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign authentication_defaults = modules.defaults.authentication.defaults %} {% assign authentication_settings = modules.authentication.settings %} {% assign navigator_defaults = site.data.modules.defaults.navigator.defaults %} {% assign navigator_settings = site.data.modules.navigator.settings %} {% assign consent_defaults = site.data.modules.defaults.cookie_consent.defaults %} {% assign consent_settings = site.data.modules.cookie_consent.settings %} {% assign cookiebar_defaults = site.data.modules.defaults.cookiebar.defaults %} {% assign cookiebar_settings = site.data.modules.cookiebar.settings %} {% assign ssm_settings = modules.ssm.settings %} {% assign ssm_defaults = modules.defaults.ssm.defaults %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign nav_bar_defaults = navigator_defaults.nav_bar %} {% assign nav_bar_settings = navigator_settings.nav_bar %} {% assign nav_quicklinks_defaults = navigator_defaults.nav_quicklinks %} {% assign nav_quicklinks_settings = navigator_settings.nav_quicklinks %} {% assign nav_topsearch_defaults = navigator_defaults.nav_topsearch %} {% assign nav_topsearch_settings = navigator_settings.nav_topsearch %} {% assign nav_authclient_defaults = authentication_defaults.auth_client %} {% assign nav_authclient_settings = authentication_settings.auth_client %} {% assign nav_mmenu_defaults = navigator_defaults.nav_mmenu %} {% assign nav_mmenu_settings = navigator_settings.nav_mmenu %} {% comment %} Set config options -------------------------------------------------------------------------------- {% endcomment %} {% assign nav_bar_options = nav_bar_defaults | merge: nav_bar_settings %} {% assign quicklinks_options = nav_quicklinks_defaults | merge: nav_quicklinks_settings %} {% assign topsearch_options = nav_topsearch_defaults | merge: nav_topsearch_settings %} {% assign authclient_options = nav_authclient_defaults | merge: nav_authclient_settings %} {% assign cookie_consent_options = consent_defaults | merge: consent_settings %} {% assign authentication_options = authentication_defaults | merge: authentication_settings %} {% assign auth_manager_options = authentication_options.j1_auth %} {% assign nav_mmenu_options = nav_mmenu_defaults | merge: nav_mmenu_settings %} {% assign ssm_options = ssm_defaults | merge: ssm_settings %} {% comment %} Set navBarOptions -------------------------------------------------------------------------------- {% endcomment %} {% assign brand_position = nav_bar_options.brand_position %} {% assign nav_fixed = nav_bar_options.fixed %} {% assign nav_style = nav_bar_options.style %} {% assign nav_color = nav_bar_options.color %} {% comment %} Set global settings -------------------------------------------------------------------------------- {% endcomment %} {% assign nav_bar_id = navigator_defaults.nav_bar.xhr_container_id %} {% assign nav_menu_id = navigator_defaults.nav_menu.xhr_container_id %} {% assign nav_mmenu_id = navigator_defaults.nav_mmenu.xhr_container_id %} {% assign nav_sidebar_id = navigator_defaults.nav_sidebar.xhr_container_id %} {% assign nav_quicklinks_id = navigator_defaults.nav_quicklinks.xhr_container_id %} {% assign authclient_modals_id = authclient_options.xhr_container_id %} {% assign nav_navbar_media_breakpoint = navigator_defaults.nav_bar.media_breakpoint %} {% comment %} Set navBarProperties -------------------------------------------------------------------------------- {% endcomment %} {% if nav_fixed %} {% assign nav_bar_fixed = 'navbar-fixed' %} {% if nav_style == 'overlay' %} {% assign nav_bar_style = 'navbar-transparent' %} {% endif %} {% endif %} {% if nav_color == 'light' %} {% assign nav_bar_color = 'light' %} {% endif %} {% capture nav_bar_default_css_classes %}navbar navigator navbar-expand-{{nav_navbar_media_breakpoint}} navbar-default{% endcapture %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Generate SSM container -------------------------------------------------------------------------------- {% endcomment %} {% if ssm_options.enabled %} {% endif %} {% comment %} Generate TopSearch container -------------------------------------------------------------------------------- {% endcomment %} {% if topsearch_options.enabled %} {% include {{ topsearch_create }} options=topsearch_options %} {% endif %} {% comment %} Place MMobile NAV menu containers (HTML data loaded via AJAX) -------------------------------------------------------------------------------- {% endcomment %} {% for item in nav_mmenu_options.menus %} {% comment %} Condition DISABLED for testing -------------------------------------------------------------------------------- {% if item.menu.enabled %} {% endif %} -------------------------------------------------------------------------------- {% endcomment %} {% endfor %} {% comment %} Place container for sign in|out dialog used by J1 AuthClient -------------------------------------------------------------------------------- {% endcomment %}