--- regenerate: true exclude_from_search: true --- {% capture cache %} {% comment %} # ----------------------------------------------------------------------------- # ~/assets/data/banner.html # Liquid procedure to generate HTML (data) for all BANNER configured for # (fragmented) AJAX load # # Product/Info: # https://jekyll.one # # Copyright (C) 2023 Juergen Adams # # J1 Theme is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # ----------------------------------------------------------------------------- # Test data: # {{ variable | debug }} # # ----------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% capture get_wave %}themes/{{site.template.name}}/procedures/blocks/get_wave.proc{% endcapture %} {% 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 %} {% capture create_bs_button %}themes/{{site.template.name}}/procedures/global/create_bs_button.proc{% endcapture %} {% capture news_box %}themes/{{site.template.name}}/modules/footers/boxes/news_box.proc{% endcapture %} {% comment %} Set global settings -------------------------------------------------------------------------------- {% endcomment %} {% assign environment = site.environment %} {% assign debug = false %} {% comment %} Process YML config data ================================================================================ {% endcomment %} {% comment %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign template_config = site.data.j1_config %} {% assign blocks = site.data.blocks %} {% assign banner_config_defaults = blocks.defaults.banner %} {% assign banner_config_settings = blocks.banner %} {% assign bs_config = template_config.bootstrap %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign bs_card_deck = bs_config.cards.card-deck %} {% assign banner_config_defaults = banner_config_defaults.defaults %} {% assign banner_config_settings = banner_config_settings.settings %} {% comment %} Set config options -------------------------------------------------------------------------------- {% endcomment %} {% assign parallax_options = banner_config_defaults.parallax_settings | merge: banner_config_settings.parallax_settings %} {% assign image_options = banner_config_defaults.image_settings | merge: banner_config_settings.image_settings %} {% comment %} Set HELPER variables -------------------------------------------------------------------------------- {% endcomment %} {% capture banner_config_file_name %}~/_data/blocks/banner.yml{% endcapture %} {% comment %} Detect prod mode -------------------------------------------------------------------------------- {% endcomment %} {% assign production = false %} {% if environment == 'prod' or environment == 'production' %} {% assign production = true %} {% endif %} {% comment %} Main ================================================================================ {% endcomment %}
{% comment %} Main ================================================================================ {% endcomment %} {% for items in banner_config_settings %} {% assign key = items[0] %} {% assign value = items[1] %} {% assign banner_config = value %} {% for items in banner_config %} {% for banners in items %} {% if debug %} banners: {{ banners }} {% endif %} {% comment %} parse settings for MAIN keys -------------------------------------------------------------------------- {% endcomment %} {% for banner in banners %} {% assign data_type = banner | is_type %} {% if data_type == 'hash' %} {% assign banner_settings = banner %} {% assign id = banner_settings.id %} {% assign enabled = banner_settings.enabled %} {% assign badges = banner_settings.badges %} {% assign type = banner_settings.type %} {% assign icon_family = banner_settings.icon_family | downcase %} {% assign style = banner_settings.style %} {% assign raised = banner_settings.raised %} {% assign lane_span = banner_settings.lane_span %} {% assign buttons = banner_settings.buttons %} {% assign cards = banner_settings.cards %} {% assign wave_properties = banner_settings.wave %} {% assign properties = banner_settings.properties %} {% endif %} {% endfor %} {% if lane_span == 'fixed' %} {% assign container_class = 'container' %} {% elsif lane_span == 'fluid' %} {% assign container_class = 'container-fluid' %} {% else %} {% assign container_class = 'container' %} {% endif %} {% comment %} generate the HTML portion for the TOP wave element ---------------------------------------------------------------------- {% endcomment %} {% if wave_properties.top.enabled %} {% include {{get_wave}} position="top" wave=wave_properties.top %} {% assign banner_wave_top = _wave %} {% endif %} {% comment %} generate the HTML portion for the BOTTOM wave element ---------------------------------------------------------------------- {% endcomment %} {% if wave_properties.bottom.enabled %} {% include {{get_wave}} position="bottom" wave=wave_properties.bottom %} {% assign banner_wave_bottom = _wave %} {% endif %} {% comment %} process current banner -------------------------------------------------------------------------- {% endcomment %} {% if banner_settings.enabled %} {% case banner_settings.type %} {% comment %} Collect DIVIDER banner ------------------------------------------------------------------------ {% endcomment %} {% when 'divider' %} {% assign banner_options = banner_config_defaults.divider | merge: banner_settings %} {% if debug %}{% endif %} {% comment %} Reset element variables (already processed) ------------------------------------------------------------------------ {% endcomment %} {% assign banner_settings = nil %} {% comment %} Collect TEASER banner ------------------------------------------------------------------------ {% endcomment %} {% when 'teaser' %} {% assign banner_options = banner_config_defaults.teaser | merge: banner_settings %} {% if debug %}{% endif %} {% comment %} Reset element variables (already processed) ------------------------------------------------------------------------ {% endcomment %} {% assign banner_settings = nil %} {% comment %} END TEASER banner ------------------------------------------------------------------------ {% endcomment %} {% comment %} Collect IMAGE banner ------------------------------------------------------------------------ {% endcomment %} {% when 'image' %} {% comment %} Set image banner DEFAULTS gridifier: {{ gridifier | debug }} ------------------------------------------------------------------------ {% endcomment %} {% assign gridifier = image_options.gridifier %} {% comment %} Reset element variables (already processed) ------------------------------------------------------------------------ {% endcomment %} {% assign banner_settings = nil %} {% comment %} END IMAGE banner ------------------------------------------------------------------------ {% endcomment %} {% comment %} Collect PARALLAX banner ------------------------------------------------------------------------ {% endcomment %} {% when 'parallax' %} {% endif %} {% endfor %} {% comment %} END cards ---------------------------------------------------------------------- {% endcomment %} {% comment %} Reset element variables (already processed) ---------------------------------------------------------------------- {% endcomment %} {% assign banner_settings = nil %} {% comment %} END PARALLAX banner ---------------------------------------------------------------------- {% endcomment %} {% else %} {% comment %} Collect EXCEPTION banner: given type NOT found ---------------------------------------------------------------------- {% endcomment %} {% unless banner_settings.id == 'exception_container' %}" %}{% 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 %} |