{% macro tags_block(date, location, inline=false, centered=false) -%} {% if date is not none or location is not none %}
{% if inline %}

{% if date is not none %}{{date}}{% endif %} {% if date is not none and location is not none %} • {% endif %} {% if location is not none %}{{location}}{% endif %}

{% else %} {% if date is not none %}

{{date}}

{% endif %} {% if location is not none %}

{{location}}

{% endif %} {% endif %}
{% endif %} {%- endmacro %} {% macro heading_vertical(institution, role, extra, description=none, centered=false) -%}
{% if institution is not none %}
{{institution}}
{% endif %} {% if role is not none %}

{{role}}

{% endif %} {% if extra is not none %}

{{extra}}

{% endif %} {% if description is not none %}

{{description}}

{% endif %}
{%- endmacro %} {% macro heading_inline(institution, role, extra, description=none) -%} {% if role is not none %}{{role}}{% endif %} {% if role is not none and institution is not none %} - {% endif %} {% if institution is not none %}{{institution}}{% endif %} {% if extra is not none %} {{extra}} {% endif %} {% if description is not none %} {{description}} {% endif %} {% if institution is not none %} {{institution}} {% endif %} {% if role is not none %} {{role}} {% endif %} {% if extra is not none %} {{extra}} {% endif %} {% if description is not none %} {{description}} {% endif %} {%- endmacro %} {% macro toggle_button(details_id, expanded=false) -%} {%- endmacro %} {% set horizontal = data.horizontal | default(false) %} {% set section_defaults = data.defaults | default({}) %} {% set section_inline = data.inline | default(section_defaults.inline | default({})) %} {% set compact_default = data.compact | default(section_defaults.compact | default(true)) %} {% set separators = data.separators | default(true) %} {% set meta_keys = ["background", "compact", "defaults", "freeform", "horizontal", "inline", "kind", "label", "separators", "style", "sub-label", "template"] %}
{% if horizontal %}
{% endif %} {% for key, value in data.items() if key not in meta_keys %} {% set details_id = "experience-entry-" ~ ctx.key ~ "-" ~ loop.index %} {% set heading = value.heading | default({}) %} {% set expanded_heading = value.expanded_heading | default(heading) %} {% set heading_institution = heading.institution | default(none) %} {% set heading_role = heading.role | default(none) %} {% set heading_extra = heading.details | default(none) %} {% set heading_date = heading.date | default(none) %} {% set heading_location = heading.location | default(none) %} {% set entry_description = value.description | default(none) %} {% set expanded_institution = expanded_heading.institution | default(heading_institution) %} {% set expanded_role = expanded_heading.role | default(heading_role) %} {% set expanded_extra = expanded_heading.details | default(heading_extra) %} {% set expanded_date = expanded_heading.date | default(heading_date) %} {% set expanded_location = expanded_heading.location | default(heading_location) %} {% set entry_compact = value.compact | default(compact_default) %} {% set entry_inline = value.inline | default({}) %} {% set inline_heading = entry_inline.heading | default(section_inline.heading | default(false)) %} {% set inline_tags = entry_inline.tags | default(section_inline.tags | default(false)) %} {% set show_details = value.content and entry_compact %} {% set show_inline_content = value.content and not entry_compact %} {% if horizontal %}
{% if show_details %}
{% endif %}
{{ heading_vertical(heading_institution, heading_role, heading_extra, none if show_inline_content else entry_description, true) }}
{{ tags_block(heading_date, heading_location, inline_tags) }} {% if show_details %}
{{ toggle_button(details_id) }}
{% endif %}
{% if show_inline_content %}
{{markdown(value.content)}}
{% endif %}
{% if show_details %}
{{ toggle_button(details_id, true) }}
{{ heading_vertical(expanded_institution, expanded_role, expanded_extra, none, true) }} {{ tags_block(expanded_date, expanded_location, true, true) }}
{{markdown(value.content)}}
{% endif %}
{% if separators and not loop.last %} {% endif %} {% elif show_details %}
{% if inline_heading %}
{{ toggle_button(details_id) }}
{{ heading_inline(heading_institution, heading_role, heading_extra, entry_description) }}
{{ tags_block(heading_date, heading_location, inline_tags) }}
{% else %}
{{ toggle_button(details_id) }}
{{ heading_vertical(heading_institution, heading_role, heading_extra, entry_description) }}
{{ tags_block(heading_date, heading_location, inline_tags) }}
{% endif %}
{{ toggle_button(details_id, true) }}
{{ heading_vertical(expanded_institution, expanded_role, expanded_extra, none, true) }} {{ tags_block(expanded_date, expanded_location, true, true) }}
{{markdown(value.content)}}
{% elif show_inline_content %}
{{ heading_vertical(expanded_institution, expanded_role, expanded_extra, none, true) }} {{ tags_block(expanded_date, expanded_location, true, true) }}
{{markdown(value.content)}}
{% elif inline_heading %}
{{ heading_inline(heading_institution, heading_role, heading_extra, entry_description) }}
{{ tags_block(heading_date, heading_location, inline_tags) }}
{% else %}
{{ heading_vertical(heading_institution, heading_role, heading_extra, entry_description) }}
{{ tags_block(heading_date, heading_location, inline_tags) }}
{% endif %} {% if separators and not horizontal and not loop.last %} {% if not value.no_line %}
{% else %}
{% endif %} {% endif %} {% endfor %} {% if horizontal %}
{% endif %}