--- regenerate: true exclude_from_search: true --- {% capture cache %} {% comment %} # ----------------------------------------------------------------------------- # ~/assets/data/quicklinks.html # Liquid PROCEDURE template to create the HTML portion of the quicklink bar # NOTE: Loaded dynamically by J1 NAV Manager module (AJAX) # # Product/Info: # https://jekyll.one # # Copyright (C) 2021 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 %} {% assign apps = site.data.apps %} {% assign modules = site.data.modules %} {% comment %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign j1_config = site.data.j1_config %} {% assign authentication_defaults = modules.defaults.authentication.defaults %} {% assign authentication_settings = modules.authentication.settings %} {% assign navigator_defaults = modules.defaults.navigator.defaults %} {% assign navigator_settings = modules.navigator.settings %} {% assign consent_defaults = modules.defaults.cookieconsent.defaults %} {% assign consent_settings = modules.cookieconsent.settings %} {% assign quick_search_defaults = modules.defaults.quicksearch.defaults %} {% assign quick_search_settings = modules.quicksearch.settings %} {% comment %} Control Center disabled -------------------------------------------------------------------------------- {% assign cc_app_config_defaults = apps.defaults.cc.defaults %} {% assign cc_app_config_settings = apps.cc.settings %} -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign environment = site.environment %} {% assign nav_quicklinks_defaults = navigator_defaults.nav_quicklinks %} {% assign nav_quicklinks_settings = navigator_settings.nav_quicklinks %} {% comment %} Set config options -------------------------------------------------------------------------------- {% endcomment %} {% assign authentication_options = authentication_defaults | merge: authentication_settings %} {% assign quick_search_options = quick_search_defaults | merge: quick_search_settings %} {% assign quicklinks_options = nav_quicklinks_defaults | merge: nav_quicklinks_settings %} {% assign consent_options = consent_defaults | merge: consent_settings %} {% comment %} Control Center disabled -------------------------------------------------------------------------------- {% assign cc_app_config_options = cc_app_config_defaults | merge: cc_app_config_settings %} -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Set authentication properties -------------------------------------------------------------------------------- {% endcomment %} {% assign authentication_enabled = authentication_options.j1_auth.enabled %} {% assign auth_client_config = authentication_options.auth_client %} {% comment %} Set quicklinks properties -------------------------------------------------------------------------------- {% endcomment %} {% assign icon_family = quicklinks_options.icon_family | downcase %} {% comment %} Link buttons -------------------------------------------------------------------------------- {% endcomment %} {% assign home_icon = quicklinks_options.home_icon %} {% assign home_url = quicklinks_options.home_url %} {% assign home_label = quicklinks_options.home_label %} {% assign back_icon = quicklinks_options.back_icon %} {% assign back_url = quicklinks_options.back_url %} {% assign back_label = quicklinks_options.back_label %} {% assign disqus_icon = quicklinks_options.disqus_icon %} {% assign github_icon = quicklinks_options.github_icon %} {% assign patreon_icon = quicklinks_options.patreon_icon %} {% assign facebook_icon = quicklinks_options.facebook_icon %} {% assign twitter_icon = quicklinks_options.twitter_icon %} {% assign disqus_url = quicklinks_options.disqus_url %} {% assign github_url = quicklinks_options.github_url %} {% assign patreon_url = quicklinks_options.patreon_url %} {% assign facebook_url = quicklinks_options.facebook_url %} {% assign twitter_url = quicklinks_options.twitter_url %} {% assign disqus_label = quicklinks_options.disqus_label %} {% assign github_label = quicklinks_options.github_label %} {% assign patreon_label = quicklinks_options.patreon_label %} {% assign facebook_label = quicklinks_options.facebook_label %} {% assign twitter_label = quicklinks_options.twitter_label %} {% comment %} Action buttons -------------------------------------------------------------------------------- {% endcomment %} {% assign cookies_icon = quicklinks_options.cookies_icon %} {% assign cookies_action = quicklinks_options.cookies_action %} {% assign cookies_label = quicklinks_options.cookies_label %} {% assign translate_icon = quicklinks_options.translate_icon %} {% assign translate_action = quicklinks_options.translate_action %} {% assign translate_label = quicklinks_options.translate_label %} {% assign quicksearch_icon = quicklinks_options.quicksearch_icon %} {% assign quicksearch_action = quicklinks_options.quicksearch_action %} {% assign quicksearch_label = quicklinks_options.quicksearch_label %} {% assign translator_icon = quicklinks_options.translator_icon %} {% assign translator_action = quicklinks_options.translator_action %} {% assign translator_label = quicklinks_options.translator_label %} {% assign r_text_icon = quicklinks_options.r_text_icon %} {% assign r_text_action = quicklinks_options.r_text_action %} {% assign r_text_label = quicklinks_options.r_text_label %} {% comment %} Legacy buttons -------------------------------------------------------------------------------- {% endcomment %} {% assign signin_icon = auth_client_config.signin_icon %} {% assign signout_icon = auth_client_config.signout_icon %} {% assign signin_modal_id = auth_client_config.signin_modal_id %} {% assign control_center_icon = cc_app_config_options.quicklinks_icon %} {% assign control_center_url = cc_app_config_options.quicklinks_url %} {% comment %} Show|Hide Quicksearch icon -------------------------------------------------------------------------------- {% endcomment %} {% if quick_search_options.enabled %} {% assign show_quicksearch_icon = true %} {% else %} {% assign show_quicksearch_icon = false %} {% endif %} {% comment %} Show|Hide Translator icon -------------------------------------------------------------------------------- {% endcomment %} {% if j1_config.translation.enabled %} {% assign show_translator_icon = true %} {% else %} {% assign show_translator_icon = false %} {% endif %} {% comment %} Show|Hide AuthManager icon -------------------------------------------------------------------------------- {% endcomment %} {% if authentication_enabled %} {% assign show_auth_manager_icon = true %} {% else %} {% assign show_auth_manager_icon = false %} {% endif %} {% comment %} Show|Hide Control Center icon -------------------------------------------------------------------------------- {% endcomment %} {% if cc_app_config_options.enabled %} {% assign show_control_center_icon = true %} {% else %} {% assign show_control_center_icon = false %} {% endif %} {% comment %} Show|Hide RSizer icon -------------------------------------------------------------------------------- {% endcomment %} {% if quicklinks_options.r_text_icon %} {% assign show_r_text_icon = true %} {% else %} {% assign show_r_text_icon = false %} {% endif %} {% comment %} Show|Hide CookieConsent icon -------------------------------------------------------------------------------- {% endcomment %} {% if consent_options.enabled %} {% assign consent_enabled = true %} {% else %} {% assign consent_enabled = false %} {% endif %} {% if consent_options.show_cookie_icon %} {% assign consent_icon_enabled = true %} {% else %} {% assign consent_icon_enabled = false %} {% endif %} {% if consent_enabled and consent_icon_enabled %} {% assign show_cookieconsent_icon = true %} {% else %} {% assign show_cookieconsent_icon = false %} {% endif %} {% comment %} Select icon family and size (color set dynamically by adapter) -------------------------------------------------------------------------------- {% endcomment %} {% if quicklinks_options.icon_family == 'FontAwesome' or quicklinks_options.icon_family == 'FontAwesome4' or quicklinks_options.icon_family == 'FontAwesome5' %} {% assign icon_family = 'fa' %} {% elsif quicklinks_options.icon_family == 'MDI' or quicklinks_options.icon_family == 'Material Design Icons'%} {% assign icon_family = 'mdi' %} {% else %} {% assign icon_family = 'mdi' %} {% endif %} {% include {{select_icon_size}} family=quicklinks_options.icon_family size=quicklinks_options.icon_size %} {% assign icon_size = size %} {% assign production = false %} {% if environment == 'prod' or environment == 'production' %} {% assign production = true %} {% endif %} {% comment %} Unused -------------------------------------------------------------------------------- {% assign show_google_translate_icon = true %} {% assign show_google_translate_lang = false %} {% assign translate_lang = 'gb' %} -------------------------------------------------------------------------------- {% endcomment %} {% assign show_google_translate_icon = true %} {% assign show_google_translate_lang = false %} {% assign translate_lang = 'gb' %}
{% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% 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: "" %}{% 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 "" %}
{% endif %}{% unless _pre_before contains "" 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 = "
Step | Bytes |
raw | {{ cache | strip_html_comments | size }}{% if _profile_endings %} |
endings | {{ _profile_endings }}{% endif %}{% if _profile_startings %} |
startings | {{ _profile_startings }}{% endif %}{% if _profile_comments %} |
comments | {{ _profile_comments }}{% endif %}{% if _profile_collapse %} |
collapse | {{ _profile_collapse }}{% endif %}{% if _profile_clippings %} |
clippings | {{ _profile_clippings }}{% endif %} |