--- 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 %}
{{box_text}}
{% endif %} {% if box_text %}{{box_cite}}{% endif %}