pages/_includes/cv/experience.liquid
George 55a2685683
Unify jsonresume and RenderCV CVs solutions (#3462)
Fixes #2787 as an alternative to #2969. It was getting too cumbersome to
have 2 different data sources for CV and also a lot of different layout
files, so I decided to unify them all.
Main changes:
- synchronized the information inside RenderCV (`_data/cv.yml`) and
JSONResume (`assets/json/resume.json`)
- unified layout files for CV information
- added the option to set the "data source" in the CV page

---------

Signed-off-by: George Araújo <george.gcac@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-23 12:36:14 -03:00

92 lines
3.6 KiB
Plaintext

{% comment %}
Unified work/experience entry renderer for both RenderCV and JSONResume formats
Handles both:
- RenderCV: company, position, start_date, end_date, location, url, summary, highlights
- JSONResume: name, position, startDate, endDate, location, url, summary, highlights
{% endcomment %}
<ul class="card-text font-weight-light list-group list-group-flush">
{% for entry in entries %}
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 col-sm-2 col-md-2 text-center date-column">
{% capture start_date %}
{% if entry.start_date %}{{ entry.start_date }}{% elsif entry.startDate %}{{ entry.startDate }}{% endif %}
{% endcapture %}
{% capture end_date %}
{% if entry.end_date %}{{ entry.end_date }}{% elsif entry.endDate %}{{ entry.endDate }}{% endif %}
{% endcapture %}
{% if start_date != '' %}
{% comment %} Extract year only from dates like "1933-01-01" or just use "1933" as is {% endcomment %}
{% assign startDate = start_date | split: '-' | first %}
{% assign endDate = end_date | split: '-' | first | default: 'Present' %}
{% assign date = startDate | append: ' - ' | append: endDate %}
{% else %}
{% assign date = '' %}
{% endif %}
<table class="table-cv">
<tbody>
<tr>
<td>
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px">{{ date }}</span>
</td>
</tr>
{% capture location %}
{% if entry.location %}{{ entry.location }}{% endif %}
{% endcapture %}
{% if location != '' %}
<tr>
<td>
<p class="location">
<i class="fa-solid fa-location-dot iconlocation"></i>
{{ location }}
</p>
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="col-xs-10 col-sm-10 col-md-10 mt-2 mt-md-0">
{% capture position_title %}
{% if entry.position %}{{ entry.position }}{% endif %}
{% endcapture %}
{% if entry.url %}
<h6 class="title font-weight-bold ml-1 ml-md-4">
<a href="{{ entry.url }}">{{ position_title }}</a>
</h6>
{% elsif position_title != '' %}
<h6 class="title font-weight-bold ml-1 ml-md-4">{{ position_title }}</h6>
{% endif %}
{% capture company_name %}
{% if entry.name %}{{ entry.name }}{% elsif entry.company %}{{ entry.company }}{% elsif entry.organization %}{{ entry.organization }}{% endif %}
{% endcapture %}
{% if company_name != '' %}
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem">{{ company_name }}</h6>
{% endif %}
{% if entry.summary %}
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic">
{{ entry.summary | markdownify | remove: '<p>' | remove: '</p>' }}
</h6>
{% endif %}
{% if entry.highlights %}
<ul class="items">
{% for item in entry.highlights %}
<li>
<span class="item">{{ item | markdownify | remove: '<p>' | remove: '</p>' }}</span>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>