pages/_layouts/profiles.liquid
Maruan beb6f27d59
format code with prettier.io (#2048)
summary:
- adds prettier formatter configuration
- formats the entire repo using prettier, ignoring minified files
(`*.min.css`) and heavy generated html
- changes extensions of all `.html` files to `.liquid`, which is more
correct and necessary for prettier to work correctly
- replaces "%-" and "-%" with just "%" — manual liquid formatting using
minus signs is superfluous since we are compressing and minifying the
code anyway
- adds CI action for running prettier check on PR and pushes to master
2024-01-10 00:10:51 -05:00

38 lines
1.4 KiB
Plaintext

---
layout: page
---
<!-- about.html -->
<div class="post">
<article>
{% if page.profiles %}
{% for profile in page.profiles %}
<hr>
<div class="profile float-{% if profile.align == 'left' %}left{% else %}right{% endif %}">
{% if profile.image %}
{% assign profile_image_path = profile.image | prepend: 'assets/img/' %}
{% if profile.image_circular %}
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
{% else %}
{% assign profile_image_class = 'img-fluid z-depth-1 rounded' %}
{% endif %}
{% capture sizes %}(min-width: {{site.max_width}}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px) 30vw, 95vw"{% endcapture %}
{% include figure.liquid path = profile_image_path class = profile_image_class sizes = sizes alt = profile.image %}
{% endif %}
{% if profile.more_info %}
<div class="more-info">{{ profile.more_info }}</div>
{% endif %}
</div>
<div class="clearfix">
{% if profile.content %}
{% capture profile_content %}{% include_relative {{ profile.content }} %}{% endcapture %}
{{ profile_content | markdownify }}
{% else %}
{{ content }}
{% endif %}
</div>
{% endfor %}
{% endif %}
</article>
</div>