1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-06-07 16:17:50 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
dependabot[bot]
3bc36f6d2e
build(deps): update bootstrap requirement in the prod-deps group
Updates the requirements on [bootstrap](https://github.com/twbs/bootstrap) to permit the latest version.

Updates `bootstrap` to 5.3.5
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.3...v5.3.5)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.5
  dependency-type: direct:production
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-12 19:19:17 +00:00
Cotes Chung
d0f8f9553e
fix: improve accuracy of moving img element classes (#2399) 2025-05-11 22:19:18 +08:00
2 changed files with 39 additions and 7 deletions

View File

@ -88,9 +88,41 @@
{% endfor %}
<!-- take out classes -->
{% assign _wrapper_class = '' %}
{% if _class %}
{% capture _old_class %}class="{{ _class }}"{% endcapture %}
{% assign _left = _left | remove: _old_class %}
{% assign _remain = _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 %}
{% assign _final_src = null %}
@ -110,7 +142,7 @@
{% if _lqip %}
{% assign _lazyload = false %}
{% assign _class = _class | append: ' blur' %}
{% assign _wrapper_class = _wrapper_class | append: ' blur' %}
{% unless _lqip contains 'data:' %}
{% assign _lqip_alt = 'lqip="' | append: _path_prefix %}
@ -121,7 +153,7 @@
{% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %}
{% else %}
{% assign _class = _class | append: ' shimmer' %}
{% assign _wrapper_class = _wrapper_class | append: ' shimmer' %}
{% endif %}
<!-- lazy-load images -->
@ -153,8 +185,8 @@
{% assign _wrapper_start = _final_src
| default: _src
| prepend: '<a href="'
| append: '" class="popup img-link '
| append: _class
| append: '" class="popup img-link'
| append: _wrapper_class
| append: '">'
%}

View File

@ -25,7 +25,7 @@
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.3"
"bootstrap": "^5.3.6"
},
"devDependencies": {
"@babel/core": "^7.26.0",