pages/_includes/projects_horizontal.liquid
George 6e215a1cdc
Lighthouse fixes (#2199)
Our score went down a little bit after the last few changes. Avoiding
lazy loading some images (as introduced in #2183), since [it is strongly
recommended to omit hero images and other images or iframes that are
likely to appear above the fold from being
lazy-loaded](https://web.dev/articles/browser-level-lazy-loading-for-cmss#avoid_lazy_loading_above-the-fold_elements).
Also added missing `alt` to google scholar field.

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
2024-02-14 14:37:32 -03:00

35 lines
1.5 KiB
Plaintext

<div class="card-item col">
<a href="{% if project.redirect %}{{ project.redirect }}{% else %}{{ project.url | relative_url }}{% endif %}">
<div class="card hoverable">
<div class="row g-0">
{% if project.img %}
<div class="card-img col-md-6">
{% include figure.liquid loading="eager" path=project.img sizes="(min-width: 768px) 156px, 50vw" alt="project thumbnail" %}
</div>
{% endif %}
<div class="{% if project.img %}col-md-6{% else %}col-md-12{% endif %}">
<div class="card-body">
<h3 class="card-title text-lowercase">{{ project.title }}</h3>
<p class="card-text">{{ project.description }}</p>
<div class="row ml-1 mr-1 p-0">
{% if project.github %}
<div class="github-icon">
<div class="icon" data-toggle="tooltip" title="Code Repository">
<a href="{{ project.github }}"><i class="fa-brands fa-github gh-icon"></i></a>
</div>
{% if project.github_stars %}
<span class="stars" data-toggle="tooltip" title="GitHub Stars">
<i class="fa-solid fa-star"></i>
<span id="{{ project.github_stars }}-stars"></span>
</span>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</a>
</div>