Skip to content

Commit

Permalink
Merge branch 'al-folio-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
george-gca committed Sep 13, 2024
2 parents 8e1891a + 0465459 commit 71eda96
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Feel free to add your own page(s) by sending a PR.
<a href="https://trandangtrungduc.github.io/" target="_blank">★</a>
<a href="https://kinghowler.github.io/" target="_blank">★</a>
<a href="https://anurye.github.io/" target="_blank">★</a>
<a href="https://charlie-xiao.github.io/" target="_blank">★</a>
</td>
</tr>
<tr>
Expand Down
10 changes: 8 additions & 2 deletions _includes/figure.liquid
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% assign img_path = include.path | remove: '.jpg' | remove: '.jpeg' | remove: '.png' | remove: '.tiff' | remove: '.gif' %}
{% assign parts = include.path | split: '.' %}
{% assign ext = parts.last %}

<figure
{% if include.slot %}
Expand All @@ -14,13 +16,17 @@
{% if site.imagemagick.enabled %}
<source
class="responsive-img-srcset"
srcset="{% for i in site.imagemagick.widths %}{{ img_path | relative_url }}-{{ i }}.webp {{ i }}w,{% endfor %}"
{% if ext == '.jpg' or ext == '.jpeg' or ext == '.png' or ext == '.tiff' or ext == '.gif' %}
srcset="{% for i in site.imagemagick.widths %}{{ img_path | relative_url }}-{{ i }}.webp {{ i }}w,{% endfor %}"
type="image/webp"
{% else %}
srcset="{{ include.path | relative_url }}"
{% endif %}
{% if include.sizes %}
sizes="{{ include.sizes }}"
{% else %}
sizes="95vw"
{% endif %}
type="image/webp"
>
{% endif %}
<img
Expand Down
7 changes: 7 additions & 0 deletions _layouts/page.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
layout: default
---
{% if page._styles %}
<!-- Page/Post style -->
<style type="text/css">
{{ page._styles }}
</style>
{% endif %}

<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
Expand Down

0 comments on commit 71eda96

Please sign in to comment.