pages/_includes/cv/awards.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

67 lines
2.4 KiB
Plaintext

{% comment %}
Unified awards entry renderer for both formats
{% 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">
{% capture start_date %}
{% if entry.date %}{{ entry.date }}{% endif %}
{% endcapture %}
{% if start_date != '' %}
<div class="col-xs-2 col-sm-2 col-md-2 text-center">
<table class="table-cv">
<tbody>
<tr>
<td>
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px">
{{- start_date | split: '-' | slice: 0, 1 | join: '' -}}
</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-xs-10 col-sm-10 col-md-10 mt-2 mt-md-0">
{% if entry.url %}
<h6 class="title font-weight-bold ml-1 ml-md-4">
<a href="{{ entry.url }}">{{ entry.title }}</a>
</h6>
{% elsif entry.title %}
<h6 class="title font-weight-bold ml-1 ml-md-4">{{ entry.title }}</h6>
{% endif %}
{% if entry.awarder %}
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem">{{ entry.awarder }}</h6>
{% endif %}
{% if entry.summary %}
<p class="ml-1 ml-md-4">{{ entry.summary | markdownify | remove: '<p>' | remove: '</p>' }}</p>
{% endif %}
</div>
{% else %}
<div class="col-xs-12 col-sm-12 col-md-12">
{% if entry.url %}
<h6 class="title font-weight-bold ml-1 ml-md-4">
<a href="{{ entry.url }}">{{ entry.title }}</a>
</h6>
{% elsif entry.title %}
<h6 class="title font-weight-bold ml-1 ml-md-4">{{ entry.title }}</h6>
{% endif %}
{% if entry.awarder %}
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem">{{ entry.awarder }}</h6>
{% endif %}
{% if entry.summary %}
<p class="ml-1 ml-md-4">{{ entry.summary | markdownify | remove: '<p>' | remove: '</p>' }}</p>
{% endif %}
</div>
{% endif %}
</div>
</li>
{% endfor %}
</ul>