--- 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.title}}

{{panel_settings.tagline}}

{{panel_settings.description}}
{% comment %} END cards -------------------------------------------------------------------- {% endcomment %}
{% comment %} Reset element variables (already processed) ------------------------------------------------------------------------ {% endcomment %} {% assign panel_settings = nil %} {% comment %} Collect SERVICE panel ------------------------------------------------------------------------ {% endcomment %} {% when 'service' %} {% if debug %}{% endif %} {% if debug %}{% endif %} {% assign panel_options = panel_config_defaults.service | merge: panel_settings %} {% if debug %}{% endif %}

{{panel_settings.title}}

{{panel_settings.tagline}}

{{panel_settings.description}}
{% comment %} Reset element variables (already processed) ------------------------------------------------------------------------ {% endcomment %} {% assign panel_settings = nil %} {% comment %} END SERVICES panel ------------------------------------------------------------------------ {% endcomment %} {% comment %} Collect NEWS panel ------------------------------------------------------------------------ {% endcomment %} {% when 'news' %} {% assign panel_options = panel_config_defaults.news|merge: panel_settings %} {% if debug %}{% endif %}
{% if panel_options.title %}

{{panel_options.title}}

{{panel_options.tagline}}

{{panel_options.description}}
{% endif %} {% assign header_available = false %} {% assign card_items = panel_options.cards|size %} {% for card in panel_options.cards %} {% for items in card %} {% for item in items[1] %} {% assign key = item[0] %} {% assign value = item[1] %} {% if key == 'enabled' %} {% assign card_enabled = value %} {% endif %} {% if key == 'type' %} {% assign card_type = value %} {% endif %} {% if key == 'block' %} {% assign card_block = value %} {% endif %} {% if key == 'num_per_row' %} {% assign cards_per_row = value %} {% endif %} {% if key == 'style' %} {% assign card_style = value %} {% endif %} {% if key == 'raised' %} {% assign card_raised = value %} {% endif %} {% if key == 'category' %} {% assign post_category = value %} {% endif %} {% if key == 'max_rows' %} {% assign rows_max = value %} {% endif %} {% if key == 'max_posts' %} {% assign posts_max = value %} {% endif %} {% if key == 'truncatewords' %} {% assign truncatewords = value %} {% endif %} {% if key == 'buttons' %} {% assign card_buttons = value %} {% endif %} {% endfor %} {% if card_enabled == false %} {% assign card_items = card_items|minus:1 %} {% endif %} {% endfor %} {% assign posts_written = 0 %} {% assign last_post_written = false %} {% comment %} default for card_block: card-deck ------------------------------------------------------------------ {% endcomment %} {% if card_block == "card-deck" or card_block == "card-list" %} {% else %} {% assign card_block = "card-deck" %} {% endif %} {% if card_block == 'card-list' %}
    {% for post in site.posts %} {% if posts_written == posts_max %} {% assign last_post_written = true %} {% break %}{% endif %} {% if last_post_written != true %} {% assign posts_written = posts_written|plus:1 %}
  • {% if post.image %} {{post.title}} {% assign post_width = '80x' %} {% else %} {% assign post_width = '100x' %} {% endif %}

    {{post.title}}

    {% comment %} {{post.excerpt|truncatewords: 50|replace:'...',' ...'|remove:'
    '|remove:'
    '|remove:'

    '|remove:'

    '}} {% endcomment %} {{post.excerpt|truncatewords: truncate_words}}
  • {% endif %} {% endfor %}
{% endif %} {% if card_block == 'card-deck' %}
{% for post in site.posts %} {% for category in post.categories %} {% if posts_written == posts_max %} {% assign last_post_written = true %} {% break %}{% endif %} {% if category == post_category and last_post_written != true %} {% assign posts_written = posts_written|plus:1 %}
{% if post.image %} {{post.title}} {% assign post_width = '80x' %} {% else %} {% assign post_width = '100x' %} {% endif %}

{{post.title}}

{% comment %} {{post.excerpt|truncatewords: 50|replace:'...',' ...'|remove:'
'|remove:'
'|remove:'

'|remove:'

'}} {% endcomment %} {{post.excerpt|truncatewords: truncate_words}}
{% assign sm = posts_written | modulo: bs_card_deck.break_on_sm %} {% assign md = posts_written | modulo: bs_card_deck.break_on_md %} {% assign lg = posts_written | modulo: bs_card_deck.break_on_lg %} {% assign xl = posts_written | modulo: bs_card_deck.break_on_xl %} {% if sm == 0 %}
{% endif %} {% if md == 0 %}
{% endif %} {% if lg == 0 %}
{% endif %} {% if xl == 0 %}
{% endif %} {% endif %} {% endfor %} {% endfor %}
{% endif %} {% endfor %}
{% comment %} Reset element variables (already processed) ------------------------------------------------------------------------ {% endcomment %} {% assign panel_settings = nil %} {% comment %} END NEWS panel ------------------------------------------------------------------------ {% endcomment %} {% else %} {% comment %} Collect EXCEPTION panel: given type NOT found ------------------------------------------------------------------------ {% endcomment %} {% unless panel_settings.id == 'exception_container' %}

panel of type {{panel_settings.type}} not found

Check your configuration at {{panel_config_file_name}}

Don't worry about this. Maybe you've a typo in the panel configuration. Check the panel config file for the unknown type.
Check for something wrong like:
id: {{panel_settings.id}}
type: {{panel_settings.type}}
comment: {{panel_settings.comment}}
{% endunless %} {% comment %} Reset element variables (already processed) ------------------------------------------------------------------------ {% endcomment %} {% assign panel_settings = nil %} {% comment %} END EXEPTION panel ------------------------------------------------------------------------ {% endcomment %} {% endcase %} {% endif %} {% comment %} endif enabled {% endcomment %} {% endfor %} {% comment %} END panels {% endcomment %} {% endfor %} {% comment %} END panel_config {% endcomment %} {% endfor %} {% comment %} END panel_config_settings {% endcomment %} {% endcapture %} {% if production %} {% capture _LINE_FEED %}{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ cache | strip_html_comments }}{% else %}{% capture _content %}{{ cache | strip_html_comments }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "" %}{% 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 = " ;; ;" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %}
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 %}
{% endif %}{% endif %} {% else %} {{ cache | pretty_print | remove:'' | remove:'' | strip_empty_lines }} {% endif %} {% assign cache = nil %}