{% comment %} # ----------------------------------------------------------------------------- # ~/_includes/themes/j1/modules/navigator/generator.html # Liquid HTML template to create the Navigation System for J1 Template # # Product/Info: # https://jekyll-one.com # # Copyright (C) 2019 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one/j1_template_mde/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 %} {% 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 %} {% comment %} Liquid var initialization -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Set global settings ------------------------------------------------------------------------------ {% endcomment %} {% assign nav_id = "navigator_nav" %} {% assign nav_expand = "lg" %} {% assign authclient_modals_id = "authclient_modals" %} {% comment %} Set config files ------------------------------------------------------------------------------ {% endcomment %} {% assign navigator_config = site.data.modules.j1_navigator %} {% assign j1_auth_config = site.j1_auth %} {% assign nav_defaults = navigator_config.defaults %} {% comment %} Set config data ------------------------------------------------------------------------------ {% endcomment %} {% assign nav_bar_defaults = nav_defaults.nav_bar %} {% assign nav_bar_config = navigator_config.nav_bar %} {% assign nav_quicklinks_default = nav_defaults.nav_quicklinks %} {% assign nav_quicklinks_config = navigator_config.nav_quicklinks %} {% assign nav_topsearch_default = nav_defaults.nav_topsearch %} {% assign nav_topsearch_config = navigator_config.nav_topsearch %} {% assign nav_sidebar_default = nav_defaults.nav_sidebar %} {% assign nav_sidebar_config = navigator_config.nav_sidebar %} {% assign nav_authclient_default = nav_defaults.nav_authclient %} {% assign nav_authclient_config = navigator_config.nav_authclient %} {% assign cookie_consent_config = site.data.modules.j1_cookie_consent %} {% assign consent_defaults = cookie_consent_config.defaults %} {% assign consent_settings = cookie_consent_config.consent %} {% assign cookiebar_config_defaults = site.data.modules.j1_cookiebar.defaults %} {% assign cookiebar_config = site.data.modules.j1_cookiebar.cookiebar %} {% comment %} Set config options ------------------------------------------------------------------------------ {% endcomment %} {% assign nav_bar_options = nav_bar_defaults | merge: nav_bar_config %} {% assign quicklinks_options = nav_quicklinks_default | merge: nav_quicklinks_config %} {% assign topsearch_options = nav_topsearch_default | merge: nav_topsearch_config %} {% assign sidebar_options = nav_sidebar_default | merge: nav_sidebar_config %} {% assign authclient_options = nav_authclient_default | merge: nav_authclient_config %} {% assign cookie_consent_options = consent_defaults | merge: consent_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 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 menu_id %}{{nav_id}}_menu{% endcapture %} {% capture nav_bar_defaults %}navbar navigator navbar-expand-{{nav_expand}} navbar-default{% endcapture %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% if topsearch_options.enabled %} {% include {{ topsearch_create }} options=topsearch_options %} {% endif %} {% comment %} Place div container for sign in|out dialog used by J1AuthClient -------------------------------------------------------------------------------- {% endcomment %}