--- regenerate: true exclude_from_search: true --- {% capture cache %} {% comment %} # ----------------------------------------------------------------------------- # ~/assets/data/panel.html # Liquid procedure to generate HTML (data) for all panel configured for # (fragmented) AJAX load # # Product/Info: # https://jekyll.one # # Copyright (C) 2022 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 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 config files -------------------------------------------------------------------------------- {% endcomment %} {% 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 panel_config_defaults = blocks.defaults.panel %} {% assign panel_config_settings = blocks.panel %} {% assign bs_config = template_config.bootstrap %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign panel_config_defaults = panel_config_defaults.defaults %} {% assign panel_config_settings = panel_config_settings.settings %} {% assign bs_card_deck = bs_config.cards.card_deck %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% assign truncate_words = site.excerpt_truncate_words %} {% assign category_blacklist = template_config.posts.category_blacklist %} {% comment %} Set HELPER variables (used by exception panel) -------------------------------------------------------------------------------- {% endcomment %} {% capture panel_config_file_name %}~/_data/blocks/panel.yml{% endcapture %} {% assign production = false %} {% if environment == 'prod' or environment == 'production' %} {% assign production = true %} {% endif %} {% comment %} language detection|i18n -------------------------------------------------------------------------------- {% endcomment %} {% if site.language == "en" %} {% assign language = "en" %} {% elsif site.language == "de"%} {% assign language = "de" %} {% else %} {% assign language = "en" %} {% endif %} {% if language == "en" %} {% assign readmore_text = "read" %} {% assign infinite_scroll_last = "More articles can be found with the" %} {% endif %} {% if language == "de" %} {% assign readmore_text = "lesen" %} {% assign infinite_scroll_last = "Weitere Artikel finden Sie im" %} {% endif %}
{% comment %} Main ================================================================================ {% endcomment %} {% for items in panel_config_settings %} {% assign key = items[0] %} {% assign value = items[1] %} {% assign panel_config = value %} {% for items in panel_config %} {% for panels in items %} {% if debug %} panels: {{ panels }} {% endif %} {% comment %} parse settings for MAIN keys -------------------------------------------------------------------------- {% endcomment %} {% for panel in panels %} {% assign data_type = panel | is_type %} {% if data_type == 'hash' %} {% assign panel_settings = panel %} {% assign id = panel_settings.id %} {% assign enabled = panel_settings.enabled %} {% assign type = panel_settings.type %} {% assign icon_family = panel_settings.icon_family | downcase %} {% assign style = panel_settings.style %} {% assign raised = panel_settings.raised %} {% assign lane_span = panel_settings.lane_span %} {% assign title = panel_settings.title|strip_newlines %} {% assign tagline = panel_settings.tagline|strip_newlines %} {% assign buttons = panel_settings.buttons %} {% assign header = panel_settings.header %} {% assign properties = panel_settings.properties %} {% assign description_properties = panel_settings.description_properties %} {% assign cards = panel_settings.cards %} {% 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 %} {% assign row_class = 'row' %} {% if style == 'flat' %} {% assign card_style = 'card-flat' %} {% else %} {% assign card_style = '' %} {% endif %} {% if raised %} {% capture card_raised %}raised-z{{raised}}{% endcapture %} {% else %} {% assign card_raised = 'raised-z3' %} {% endif %} {% if icon_family == 'fontawesome' or icon_family == 'fontawesome5' or icon_family == 'fa'%} {% assign icon_family = 'fa' %} {% elsif icon_family == 'mdi' %} {% assign icon_family = 'mdi' %} {% elsif icon_family == 'iconify' %} {% assign icon_family = 'iconify' %} {% else'%} {% assign icon_family = 'mdi' %} {% endif %} {% comment %} process current panel -------------------------------------------------------------------------- {% endcomment %} {% if panel_settings.enabled %} {% case panel_settings.type %} {% comment %} Collect INTRO panel ------------------------------------------------------------------------ {% endcomment %} {% when 'intro' %} {% assign panel_options = panel_config_defaults.intro | merge: panel_settings %} {% if debug %}{% endif %}{{panel_settings.tagline}}
{{panel_settings.tagline}}