{% comment %} Satu kartu pengalaman. Kalau grup hanya berisi satu posisi, tampilannya sama seperti kartu biasa. Kalau berisi beberapa posisi di perusahaan yang sama, nama dan logo perusahaan tampil sekali di header, lalu posisi-posisinya jadi sub-item dengan garis waktu kecil di dalamnya. Daftar posisi sengaja diletakkan sebagai saudara dari baris logo (bukan di dalamnya) supaya garis waktunya bisa digeser: di layar kecil garis itu jatuh tepat di tengah logo — lebih rapi dan teksnya dapat ruang lebih lebar — sedangkan di layar besar tetap sejajar dengan kolom teks header. Variabel: group (ExperienceGroup), compact (bool — versi ringkas untuk beranda) {% endcomment %}
{# ------------------------------------------------ baris logo + judul ------ #}
{% if group.logo %} {{ group.company }} {% else %} {{ group.company|slice:":1"|upper }} {% endif %}
{% if group.is_multi %} {# ---------------- Beberapa posisi: perusahaan jadi judul ---------------- #}

{% if group.company_url %} {{ group.company }} {% else %}{{ group.company }}{% endif %}

{% if group.is_current %} Aktif {% endif %}

{{ group.period }} · {{ group.duration }} {% if group.employment_type_display %} · {{ group.employment_type_display }} {% endif %} {% if group.location %} · {{ group.location }} {% endif %}

{% else %} {# ---------------- Satu posisi: tampilan seperti semula ---------------- #} {% with role=group.roles.0 %}

{{ role.position }}

{% if role.is_current %} Aktif {% endif %}

{% if role.company_url %} {{ role.company }} {% else %}{{ role.company }}{% endif %} · {{ role.get_employment_type_display }}

{{ role.period }} · {{ role.duration }} {% if role.location %} · {{ role.location }} · {{ role.get_location_type_display }} {% endif %}

{% if role.bullets %}
    {% if compact %} {% for b in role.bullets|slice:":3" %}
  • {{ b }}
  • {% endfor %} {% else %} {% for b in role.bullets %}
  • {{ b }}
  • {% endfor %} {% endif %}
{% endif %} {% if role.skills.all %}
{% for s in role.skills.all %}{{ s.name }}{% endfor %}
{% endif %} {% endwith %} {% endif %}
{# ------------------------------------------- daftar posisi (bertingkat) --- #} {% if group.is_multi %} {% comment %} Margin kiri menentukan letak garis: - layar kecil : setengah lebar logo → garis lurus di bawah tengah logo - layar besar : selebar logo + jarak → sejajar dengan kolom teks header {% endcomment %}
{% for role in group.roles %}
{# Titik dikelilingi warna kartu supaya terlihat 'memotong' garis. #}

{{ role.position }}

{{ role.period }} · {{ role.duration }} {# Tipe kerja hanya diulang di sini kalau antarposisi memang berbeda. #} {% if not group.employment_type_display %} · {{ role.get_employment_type_display }} {% endif %}

{% if role.bullets and not compact %}
    {% for b in role.bullets %}
  • {{ b }}
  • {% endfor %}
{% elif role.bullets %}
    {% for b in role.bullets|slice:":2" %}
  • {{ b }}
  • {% endfor %}
{% endif %} {% if role.skills.all %}
{% for s in role.skills.all %}{{ s.name }}{% endfor %}
{% endif %}
{% endfor %}
{% endif %}