--- regenerate: false --- {% 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.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: # {{ variable | 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 %} {% 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 %} Liquid var initialization -------------------------------------------------------------------------------- {% endcomment %} {% assign banner_config = site.data.modules.j1_banner.banners %} {% capture banner_config_file %}~/_data/modules/j1_banner.yml{% endcapture %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% for items in banner_config %} {% for banners in items %} {% for banner in banners %} {% for item in banner %} {% assign key = item[0] %} {% assign value = item[1] %} {% if key == 'id' %} {% assign id = value %} {% endif %} {% if key == 'enabled' %} {% assign enabled = value %} {% endif %} {% if key == 'type' %} {% assign type = value %} {% endif %} {% if key == 'icon_family' %} {% assign icon_family = value | downcase %} {% endif %} {% if key == 'style' %} {% assign style = value %} {% endif %} {% if key == 'raised' %} {% assign raised = value %} {% endif %} {% if key == 'lane_span' %} {% assign lane_span = value %} {% endif %} {% if key == 'buttons' %} {% assign buttons = value %} {% endif %} {% if key == 'boxes' %} {% assign boxes = value %} {% endif %} {% endfor %} {% endfor %} {% if raised %} {% capture box_raised %}raised-z{{raised}}{% endcapture %} {% else %} {% assign box_raised = 'raised-z3' %} {% endif %} {% if icon_family == 'fontawesome' %} {% assign icon_family = 'fa' %} {% elsif icon_family == 'mdi'%} {% assign icon_family = 'mdi' %} {% elsif icon_family == 'zmdi'%} {% assign icon_family = 'zmdi' %} {% endif %} {% include {{select_icon_size}} family=icon_family size=icon_size %} {% assign icon_size = size %} {% if lane_span == 'fixed' %} {% assign container_class = 'container' %} {% elsif lane_span == 'fluid' %} {% assign container_class = 'container-fluid' %} {% else %} {% assign container_class = 'container' %} {% endif %} {% if enabled %}
{% case type %} {% comment %} Collect DIVIDER banner -------------------------------------------------------------------------- {% endcomment %} {% when 'divider_banner' %} {% comment %} Collect TEASER banner -------------------------------------------------------------------------- {% endcomment %} {% when 'teaser_banner' %} {% comment %} Reset element variables -------------------------------------------------------------------------- {% endcomment %} {% assign box_enabled = nil %} {% assign box_width = nil %} {% assign box_type = nil %} {% assign box_icon = nil %} {% assign box_icon_color = nil %} {% assign box_icon_size = nil %} {% assign box_image_path = nil %} {% assign box_animate = nil %} {% assign box_title = nil %} {% assign box_tagline = nil %} {% assign box_text = nil %} {% assign box_buttons = nil %} {% assign box_width_md = nil %} {% comment %} END TEASER banner -------------------------------------------------------------------------- {% endcomment %} {% comment %} Collect IMAGE banner -------------------------------------------------------------------------- {% endcomment %} {% when 'image_banner' %} {% for box in boxes %} {% for items in box %} {% for item in items[1] %} {% assign key = item[0] %} {% assign value = item[1] %} {% if key == 'enabled' %} {% assign enabled = value %} {% endif %} {% if key == 'gridify' %} {% assign gridify = value %} {% endif %} {% if key == 'gridifier' %} {% assign gridifier = value %} {% endif %} {% if key == 'darken' %} {% assign darken = value %} {% endif %} {% if key == 'size_y' %} {% assign size_y = value %} {% endif %} {% if key == 'background_image' %} {% assign background_image = value %} {% endif %} {% endfor %} {% endfor %} {% if enabled %} {% capture darken %}0.{{darken}}{% endcapture %} {% comment %} Set STYLE tags -------------------------------------------------------------------- {% endcomment %} $('head').append( "" );
{% endif %} {% endfor %} {% comment %} END boxes ------------------------------------------------------------------------ {% endcomment %} {% comment %} Reset element variables ------------------------------------------------------------------------ {% endcomment %} {% assign box_enabled = nil %} {% assign box_width = nil %} {% assign box_type = nil %} {% assign box_icon = nil %} {% assign box_icon_color = nil %} {% assign box_icon_size = nil %} {% assign box_image_path = nil %} {% assign box_animate = nil %} {% assign box_title = nil %} {% assign box_tagline = nil %} {% assign box_text = nil %} {% assign box_buttons = nil %} {% assign box_width_md = nil %} {% assign box_cite = nil %} {% assign box_gridifye = nil %} {% assign box_darken = nil %} {% assign box_background_size = nil %} {% assign box_background_image = nil %} {% comment %} END IMAGE banner ------------------------------------------------------------------------ {% endcomment %} {% comment %} Collect PARALLAX banner -------------------------------------------------------------------------- {% endcomment %} {% when 'parallax_banner' %} {% for box in boxes %} {% for items in box %} {% for item in items[1] %} {% assign key = item[0] %} {% assign value = item[1] %} {% if key == 'enabled' %} {% assign box_enabled = value %} {% endif %} {% if key == 'type' %} {% assign box_type = value %} {% endif %} {% if key == 'cite_text' %} {% assign box_text = value | strip_newlines %} {% endif %} {% if key == 'cite' %} {% assign box_cite = value | strip_newlines %} {% endif %} {% if key == 'text_color' %} {% assign box_text_color = value %} {% endif %} {% if key == 'cite_color' %} {% assign box_cite_color = value %} {% endif %} {% if key == 'gridify' %} {% assign box_gridify = value %} {% endif %} {% if key == 'gridifier' %} {% assign box_gridifier = value %} {% endif %} {% if key == 'darken' %} {% assign box_darken = value %} {% endif %} {% if key == 'size_y' %} {% assign box_background_size = value %} {% endif %} {% if key == 'background_image' %} {% assign box_background_image = value %} {% endif %} {% endfor %} {% endfor %} {% if box_type == 'quote' and box_enabled %} {% comment %} Set banner DEFAULTS -------------------------------------------------------------------- {% endcomment %} {% assign parallax_defaults = site.data.modules.j1_parallax.parallax_quote %} {% assign background_image = parallax_defaults.background %} {% assign gridify = parallax_defaults.gridify %} {% assign gridifier = parallax_defaults.gridifier %} {% assign text_color = parallax_defaults.text_color %} {% assign cite_color = parallax_defaults.cite_color %} {% assign darken = parallax_defaults.darken %} {% comment %} Set banner VALUES -------------------------------------------------------------------- {% endcomment %} {% if box_gridify %} {% assign gridify = box_gridify %} {% endif %} {% if box_gridifier %} {% assign gridifier = box_gridifier %} {% endif %} {% if box_darken %} {% assign darken = box_darken %} {% endif %} {% if box_text_color %} {% assign text_color = box_text_color %} {% endif %} {% if box_cite_color %} {% assign cite_color = box_cite_color %} {% endif %} {% if box_background_size %} {% assign size_y = box_background_size %} {% endif %} {% if box_background_image %} {% assign background_image = box_background_image %} {% endif %} {% capture darken %}0.{{darken}}{% endcapture %} {% include {{select_color}} color=text_color fallback="#FAFAFA" %} {% assign text_color = color %} {% include {{select_color}} color=cite_color fallback="#FAFAFA" %} {% assign cite_color = color %} {% comment %} Set individual STYLE tags ----------------------------------------------------- {% endcomment %} $('head').append( "" );
{% if box_text %}

{{box_text}}

{% endif %} {% if box_text %}{{box_cite}}{% endif %}
{% endif %} {% endfor %} {% comment %} END boxes ------------------------------------------------------------------------ {% endcomment %} {% comment %} Reset element variables ------------------------------------------------------------------------ {% endcomment %} {% assign box_enabled = nil %} {% assign box_width = nil %} {% assign box_type = nil %} {% assign box_icon = nil %} {% assign box_icon_color = nil %} {% assign box_icon_size = nil %} {% assign box_image_path = nil %} {% assign box_animate = nil %} {% assign box_title = nil %} {% assign box_tagline = nil %} {% assign box_text = nil %} {% assign box_buttons = nil %} {% assign box_width_md = nil %} {% assign box_cite = nil %} {% assign box_gridifye = nil %} {% assign box_darken = nil %} {% assign box_background_size = nil %} {% assign box_background_image = nil %} {% comment %} END PARALLAX banner ------------------------------------------------------------------------ {% endcomment %} {% comment %} Collect EXEPTION banner: given type NOT found ------------------------------------------------------------------------ {% endcomment %} {% else %}

Banner {{type}} not found

Check your configuration

Don't worry about this. May you've a typo in the banner's configuration. Check the banner config file for the unknown type. A line contains something wrong like:
id: {{id}}
type: {{type}}
Have a look at:
{{banner_config_file}}
{% comment %} END EXEPTION banner ------------------------------------------------------------------------ {% endcomment %} {% endcase %}
{% endif %} {% comment %} endif enabled {% endcomment %} {% endfor %} {% endfor %} {% endcapture %} {{ cache | strip_empty_lines }} {% assign cache = nil %}