mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-09 09:08:22 +00:00
Compare commits
2 Commits
7702d5996b
...
3bc36f6d2e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3bc36f6d2e | ||
![]() |
d0f8f9553e |
@ -88,9 +88,41 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<!-- take out classes -->
|
<!-- take out classes -->
|
||||||
|
{% assign _wrapper_class = '' %}
|
||||||
|
|
||||||
{% if _class %}
|
{% if _class %}
|
||||||
{% capture _old_class %}class="{{ _class }}"{% endcapture %}
|
{% assign _remain = _class %}
|
||||||
{% assign _left = _left | remove: _old_class %}
|
{% assign _class_array = _class | split: ' ' %}
|
||||||
|
|
||||||
|
{% for c in _class_array %}
|
||||||
|
{% assign _pick = false %}
|
||||||
|
|
||||||
|
{% case c %}
|
||||||
|
{% when 'preview-img', 'normal', 'left', 'right', 'light', 'dark' %}
|
||||||
|
{% assign _pick = true %}
|
||||||
|
{% else %}
|
||||||
|
{% if c contains '-' %}
|
||||||
|
{% assign start = c | split: '-' | first %}
|
||||||
|
{% if start == 'w' %}
|
||||||
|
{% assign _pick = true %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endcase %}
|
||||||
|
|
||||||
|
{% if _pick %}
|
||||||
|
{% assign _remain = _remain | remove: c | strip %}
|
||||||
|
{% assign _wrapper_class = _wrapper_class | append: ' ' | append: c %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% unless _wrapper_class == '' %}
|
||||||
|
{% capture _old_class %}class="{{ _class }}"{% endcapture %}
|
||||||
|
{% assign _left = _left | remove: _old_class %}
|
||||||
|
{% unless _remain == '' %}
|
||||||
|
{% capture _new_class %}class="{{ _remain }}"{% endcapture %}
|
||||||
|
{% assign _left = _left | append: _new_class %}
|
||||||
|
{% endunless %}
|
||||||
|
{% endunless %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% assign _final_src = null %}
|
{% assign _final_src = null %}
|
||||||
@ -110,7 +142,7 @@
|
|||||||
|
|
||||||
{% if _lqip %}
|
{% if _lqip %}
|
||||||
{% assign _lazyload = false %}
|
{% assign _lazyload = false %}
|
||||||
{% assign _class = _class | append: ' blur' %}
|
{% assign _wrapper_class = _wrapper_class | append: ' blur' %}
|
||||||
|
|
||||||
{% unless _lqip contains 'data:' %}
|
{% unless _lqip contains 'data:' %}
|
||||||
{% assign _lqip_alt = 'lqip="' | append: _path_prefix %}
|
{% assign _lqip_alt = 'lqip="' | append: _path_prefix %}
|
||||||
@ -121,7 +153,7 @@
|
|||||||
{% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %}
|
{% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% assign _class = _class | append: ' shimmer' %}
|
{% assign _wrapper_class = _wrapper_class | append: ' shimmer' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- lazy-load images -->
|
<!-- lazy-load images -->
|
||||||
@ -153,8 +185,8 @@
|
|||||||
{% assign _wrapper_start = _final_src
|
{% assign _wrapper_start = _final_src
|
||||||
| default: _src
|
| default: _src
|
||||||
| prepend: '<a href="'
|
| prepend: '<a href="'
|
||||||
| append: '" class="popup img-link '
|
| append: '" class="popup img-link'
|
||||||
| append: _class
|
| append: _wrapper_class
|
||||||
| append: '">'
|
| append: '">'
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"bootstrap": "^5.3.3"
|
"bootstrap": "^5.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.26.0",
|
"@babel/core": "^7.26.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user