Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<div class="row flex-grow-1">
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
{% if layout.refactor or layout.layout == 'default' %}
{% if layout.layout == 'default' %}
{% include refactor-content.html content=content lang=lang %}
{% else %}
{{ content }}
Expand Down
35 changes: 27 additions & 8 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
layout: default
refactor: true
---

{% include lang.html %}
Expand Down Expand Up @@ -55,19 +54,39 @@

{% if post.image %}
{% assign src = post.image.path | default: post.image %}
{% capture src %}{% include media-url.html src=src subpath=post.media_subpath %}{% endcapture %}

{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}

{% assign lqip = null %}
{% if post.media_subpath %}
{% unless src contains '://' %}
{% assign src = post.media_subpath
| append: '/'
| append: src
| replace: '///', '/'
| replace: '//', '/'
%}
{% endunless %}
{% endif %}

{% if post.image.lqip %}
{% capture lqip_url %}{% include media-url.html src=post.image.lqip subpath=post.media_subpath %}{% endcapture %}
{% assign lqip = 'lqip="' | append: lqip_url | append: '"' %}
{% assign lqip = post.image.lqip %}

{% if post.media_subpath %}
{% unless lqip contains 'data:' %}
{% assign lqip = post.media_subpath
| append: '/'
| append: lqip
| replace: '///', '/'
| replace: '//', '/'
%}
{% endunless %}
{% endif %}

{% assign lqip_attr = 'lqip="' | append: lqip | append: '"' %}
{% endif %}

{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}

<div class="col-md-5">
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
<img src="{{ src }}" alt="{{ alt }}" {{ lqip_attr }}>
</div>

{% assign card_body_col = '7' %}
Expand Down
1 change: 0 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
layout: default
refactor: true
panel_includes:
- toc
tail_includes:
Expand Down