{% macro period(start, ongoing, end=none) -%}{{ start[:4] }} - {{ end[:4] if end else 'pågående' }}{%- endmacro %} {% macro entries(items, kind, timeline=false) %}
{% for item in items %}
{% if kind == 'project' %}{{ item.displayName }}{% if item.role %} - {{ item.role }}{% endif %}{{ period(item.startMonthYear, item.ongoing, item.endDate | default(none)) }} {% elif kind == 'employment' %}{{ item.role }}{{ period(item.startDate, item.ongoing, item.endDate | default(none)) }} {% elif kind == 'education' %}{{ item.program }}{{ period(item.startMonthYear, item.ongoing, item.endDate | default(none)) }} {% elif kind == 'certification' %}{{ item.displayName }}{{ period(item.issuedDate, item.ongoing, item.endDate) }} {% else %}{{ item.name }}{{ period(item.startMonthYear, item.ongoing, item.endDate | default(none)) }}{% endif %}
{% if kind == 'employment' %}
{{ item.employer }}
{% endif %} {% if kind == 'education' %}
{{ item.institution }}
{% endif %} {% if kind == 'certification' %}
{{ item.issuingAuthority }}
{% endif %} {% if kind == 'course' %}
{{ item.institution }}
{% endif %} {% if item.description | default(none) %}

{{ item.description }}

{% endif %} {% if kind == 'project' and item.client | default(none) %}
{{ item.client }}
{% endif %}
{% endfor %}
{% endmacro %} {% macro skills(groups, include_languages=false) %}
{% for column in [groups[:(groups|length + 1)//2], groups[(groups|length + 1)//2:]] %}
{% for group in column %}
{{ group.category }}
    {% for name in group.names %}
  • {{ name }}
  • {% endfor %}
{% endfor %} {% if loop.index == 1 and include_languages and data.languages %}
Språk
    {% for language in data.languages %}
  • {{ language.name }}
  • {% endfor %}
{% endif %}
{% endfor %}
{% endmacro %} {% macro footer() %}{% endmacro %} {% set projects = data.projects | default([]) %} {% set focus_projects = projects | selectattr('isFavourite') | list %} {% set other_projects = projects | rejectattr('isFavourite') | list %} {% set info = data['general-info'] %}
{% if not data['document-meta']['documentAnonymous'] %}{{ info.displayName | e }}{% endif %}

{{ 'Anonym konsult' if data['document-meta']['documentAnonymous'] else info.displayName }}

{{ info.jobTitle }}

{% for paragraph in data.description.aboutMe.split('\n\n') if paragraph %}

{{ paragraph }}

{% endfor %}
{% if focus_projects %}

Uppdrag i
fokus

{{ entries(focus_projects, 'project', true) }}
{% endif %} {% if data.employments %}

Anställningar

{{ entries(data.employments, 'employment') }}
{% endif %} {% if data.educations %}

Utbildningar

{{ entries(data.educations, 'education') }}
{% endif %} {% if data.skills or data.languages %}

Kunskaper

{{ skills(data.skills[:4] | default([])) }}
{% endif %}
{{ footer() }}
{% if data.skills[4:] or data.certifications or data.courses or other_projects %}
{% if data.skills[4:] or data.languages %}
{{ skills(data.skills[4:] | default([]), true) }}
{% endif %} {% if data.certifications %}

Certifieringar

{{ entries(data.certifications, 'certification') }}
{% endif %} {% if data.courses %}

Kurser

{{ entries(data.courses, 'course') }}
{% endif %} {% if other_projects %}

Andra uppdrag

{{ entries(other_projects[:1], 'project', true) }}
{% endif %}
{{ footer() }}
{% endif %} {% if other_projects[1:] %}
{{ entries(other_projects[1:], 'project', true) }}
{{ footer() }}
{% endif %}