mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-07 16:17:50 +00:00
Compare commits
2 Commits
eb8c4c9159
...
c5d879d93c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c5d879d93c | ||
![]() |
d0f8f9553e |
@ -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: '">'
|
||||
%}
|
||||
|
||||
|
26
package.json
26
package.json
@ -28,26 +28,26 @@
|
||||
"bootstrap": "^5.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.26.0",
|
||||
"@babel/plugin-transform-class-properties": "^7.25.9",
|
||||
"@babel/plugin-transform-private-methods": "^7.25.9",
|
||||
"@babel/preset-env": "^7.26.0",
|
||||
"@commitlint/cli": "^19.6.0",
|
||||
"@commitlint/config-conventional": "^19.6.0",
|
||||
"@babel/core": "^7.27.1",
|
||||
"@babel/plugin-transform-class-properties": "^7.27.1",
|
||||
"@babel/plugin-transform-private-methods": "^7.27.1",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@rollup/plugin-babel": "^6.0.4",
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/exec": "^6.0.3",
|
||||
"@semantic-release/exec": "^7.1.0",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"concurrently": "^9.1.0",
|
||||
"concurrently": "^9.1.2",
|
||||
"conventional-changelog-conventionalcommits": "^8.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"purgecss": "^7.0.2",
|
||||
"rollup": "^4.27.4",
|
||||
"semantic-release": "^24.2.0",
|
||||
"stylelint": "^16.10.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0"
|
||||
"rollup": "^4.40.2",
|
||||
"semantic-release": "^24.2.3",
|
||||
"stylelint": "^16.19.1",
|
||||
"stylelint-config-standard-scss": "^15.0.0"
|
||||
},
|
||||
"prettier": {
|
||||
"trailingComma": "none"
|
||||
|
Loading…
x
Reference in New Issue
Block a user