mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Merge branch 'master' into production
This commit is contained in:
@@ -15,9 +15,7 @@
|
||||
{%- if url -%}
|
||||
{% unless url contains ':' %}
|
||||
{%- comment -%} Add media resources subpath prefix {%- endcomment -%}
|
||||
{% if include.subpath %}
|
||||
{% assign url = include.subpath | append: '/' | append: url %}
|
||||
{% endif %}
|
||||
{% assign url = include.subpath | default: '' | append: '/' | append: url %}
|
||||
|
||||
{%- comment -%} Prepend CND URL {%- endcomment -%}
|
||||
{% if site.cdn %}
|
||||
|
||||
@@ -25,7 +25,7 @@ layout: compress
|
||||
|
||||
<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 }}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
layout: default
|
||||
refactor: true
|
||||
---
|
||||
|
||||
{% include lang.html %}
|
||||
@@ -55,19 +54,39 @@ refactor: true
|
||||
|
||||
{% if post.image %}
|
||||
{% assign src = post.image.path | default: post.image %}
|
||||
{% capture src %}{% include media-url.html src=src subpath=post.media_subpath %}{% endcapture %}
|
||||
|
||||
{% if post.media_subpath %}
|
||||
{% unless src contains '://' %}
|
||||
{% assign src = post.media_subpath
|
||||
| append: '/'
|
||||
| append: src
|
||||
| replace: '///', '/'
|
||||
| replace: '//', '/'
|
||||
%}
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
|
||||
{% if post.image.lqip %}
|
||||
{% 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' %}
|
||||
|
||||
{% assign lqip = null %}
|
||||
|
||||
{% 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: '"' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="col-md-5">
|
||||
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
|
||||
<img src="{{ src }}" alt="{{ alt }}" {{ lqip_attr }}>
|
||||
</div>
|
||||
|
||||
{% assign card_body_col = '7' %}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
layout: default
|
||||
refactor: true
|
||||
panel_includes:
|
||||
- toc
|
||||
tail_includes:
|
||||
|
||||
Reference in New Issue
Block a user