--- regenerate: true --- {% capture cache %} {% comment %} # ----------------------------------------------------------------------------- # ~/assets/data/footer.html # Liquid procedure to generate HTML (data) portion of the page footer for # (fragmented) AJAX load # # Product/Info: # https://jekyll.one # # Copyright (C) 2019 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1_template/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 about_box %}themes/{{site.template.name}}/modules/footers/boxes/about_box.proc{% endcapture %} {% capture news_box %}themes/{{site.template.name}}/modules/footers/boxes/news_box.proc{% endcapture %} {% capture links_box %}themes/{{site.template.name}}/modules/footers/boxes/links_box.proc{% endcapture %} {% capture contacts_box %}themes/{{site.template.name}}/modules/footers/boxes/contacts_box.proc{% endcapture %} {% capture legal_statements %}themes/{{site.template.name}}/modules/footers/boxes/legal_statements.proc{% endcapture %} {% capture social_media_icons %}themes/{{site.template.name}}/modules/footers/boxes/social_media_icons.proc{% endcapture %} {% comment %} Process YML config data ================================================================================ {% endcomment %} {% comment %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign footer_config_defaults = site.data.blocks.defaults.footer_new %} {% assign footer_config_settings = site.data.blocks.footer_new %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign footer_config_defaults = footer_config_defaults.defaults %} {% assign footer_config_settings = footer_config_settings.settings %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Set HELPER variables -------------------------------------------------------------------------------- {% endcomment %} {% capture footer_config_file_name %}~/_data/modules/footer.yml{% endcapture %} {% comment %} Main ================================================================================ {% endcomment %} {% for items in footer_config_settings %} {% assign key = items[0] %} {% assign value = items[1] %} {% assign footer_config = value %} {% for items in footer_config %} {% for footers in items %} {% if debug %} footers: {{ footers }} {% endif %} {% comment %} parse settings for MAIN keys -------------------------------------------------------------------------- {% endcomment %} {% for footer in footers %} {% assign data_type = footer | is_type %} {% if data_type == 'hash' %} {% assign footer_settings = footer %} {% assign id = footer_settings.id %} {% assign enabled = footer_settings.enabled %} {% assign type = footer_settings.type %} {% assign theme = footer_settings.theme %} {% assign issue = footer_settings.issue %} {% assign icons = footer_settings.icons %} {% assign legals = footer_settings.legals %} {% assign boxes = footer_settings.boxes %} {% endif %} {% endfor %} {% comment %} {% endcomment %} {% comment %} process current footer -------------------------------------------------------------------------- {% endcomment %} {% if footer_settings.enabled %} {% assign enabled_boxes = 0 %} {% assign footer_options = footer_config_defaults.footer | merge: footer_settings %} {% if debug %} {% endif %} {% comment %} Calculate number of enabled footer boxes ------------------------------------------------------------------------ {% endcomment %} {% for property in footer_options.boxes %} {% if debug %} {% endif %} {% if property.enabled %} {% assign enabled_boxes = enabled_boxes | plus:1 %} {% endif %} {% endfor %} {% assign footer_box_width_md = 12 | divided_by:enabled_boxes %}
{% endif %} {% endfor %} {% endfor %} {% endfor %} {% endcapture %} {{ cache | pretty_print | remove:'' | remove:'' | strip_empty_lines }} {% assign cache = nil %}