Skip to content

Commit

Permalink
update compress.html merger.html
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-kan authored Dec 25, 2024
1 parent ef811b9 commit 91008aa
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 81 deletions.
47 changes: 15 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,47 +224,30 @@

<!-- .slide vertical=true -->

托管于[Github Pages](https://pages.github.com/),感谢。

博客引擎来自于[jekyll/jekyll](https://github.com/jekyll/jekyll),感谢。

CDN 加速服务来自于<https://cdn.jsdelivr.net/><https://loli.net>,感谢。
- [Github Pages](https://pages.github.com/)
- [jekyll/jekyll](https://github.com/jekyll/jekyll)
- <https://cdn.jsdelivr.net/>
- <https://loli.net>
- [不蒜子](http://busuanzi.ibruce.info/)

<!-- .slide vertical=true -->

博客主题基于[poole/lanyon](https://github.com/poole/lanyon),感谢。

图标库来自于[<i class="fab fa-font-awesome"></i>fontawesome-free](https://fontawesome.com/),感谢。

展示页基于[hakimel/reveal.js](https://github.com/hakimel/reveal.js),感谢。

捐赠页来自[hifocus/merger](https://github.com/hifocus/merger),感谢。

页面压缩来自于[penibelst/jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html),感谢。
- [primer/css](https://github.com/primer/css)
- [hakimel/reveal.js](https://github.com/hakimel/reveal.js)
- [qr-merger/merger](https://github.com/qr-merger/merger)
- [utterance/utterances](https://github.com/utterance/utterances)

<!-- .slide vertical=true -->

评论系统来自于[utterance/utterances](https://github.com/utterance/utterances),感谢。

页面统计来自于[不蒜子](http://busuanzi.ibruce.info/),感谢。

博客搜索插件来自于[christian-fei/Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search),感谢。

博文目录插件来自于[allejo/jekyll-toc](https://github.com/allejo/jekyll-toc),感谢。

代码高亮及插件来自于[PrismJS](https://prismjs.com/),感谢。
- [penibelst/jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html)
- [christian-fei/Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search)
- [allejo/jekyll-toc](https://github.com/allejo/jekyll-toc)

<!-- .slide vertical=true -->

Live2D 前端插件来自于[Dreamer-Paul/Pio](https://github.com/Dreamer-Paul/Pio),感谢。

Live2D Model 来自于[imuncle/live2d](https://github.com/imuncle/live2d)[xiaoski/live2d_models_collection](https://github.com/xiaoski/live2d_models_collection),感谢。

<!-- .slide vertical=true -->

头像、壁纸来自于<https://www.pixiv.net/artworks/71574257><https://www.pixiv.net/artworks/71932901><https://www.pixiv.net/artworks/74559485>,感谢(侵权必删)。

头像翻转效果受启发自[leopardpan/leopardpan.github.io](https://github.com/leopardpan/leopardpan.github.io),感谢。
- [dsrkafuu/sakana-widget](https://github.com/dsrkafuu/sakana-widget)
- <https://www.pixiv.net/artworks/75805052>(侵权必删)
- <https://www.pixiv.net/artworks/71574257>(侵权必删)

<!-- .slide -->

Expand Down
4 changes: 2 additions & 2 deletions _layouts/compress.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
# Jekyll layout that compresses HTML
# v3.1.0
# v3.2.0
# http://jch.penibelst.de/
# © 2014–2015 Anatol Broder
# MIT License
---

{% capture _LINE_FEED %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" or page.compress_html == false %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
14 changes: 7 additions & 7 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
</head>

<body>
<div class="loader-wrapper">
<div id="wrap-loader">
<span class="loader"></span>
</div>

<div data-color-mode="{{ page.jekyll-theme-WuK.default.color-mode | default: 'auto'}}"
<div id="wrap-menu" class="position-fixed right-0 m-5 z-3"
data-color-mode="{{ page.jekyll-theme-WuK.default.color-mode | default: 'auto'}}"
data-light-theme="{{ page.jekyll-theme-WuK.default.light-theme | default: 'light'}}"
data-dark-theme="{{ page.jekyll-theme-WuK.default.dark-theme | default: 'dark'}}"
class="position-fixed right-0 m-5 z-3">
data-dark-theme="{{ page.jekyll-theme-WuK.default.dark-theme | default: 'dark'}}">

<details class="details-reset details-overlay">

Expand Down Expand Up @@ -80,9 +80,9 @@

</div>

<div data-color-mode="{{ page.jekyll-theme-WuK.default.color-mode | default: 'auto'}}"
<div id="wrap-content" data-color-mode="{{ page.jekyll-theme-WuK.default.color-mode | default: 'auto'}}"
data-light-theme="{{ page.jekyll-theme-WuK.default.light-theme | default: 'light'}}"
data-dark-theme="{{ page.jekyll-theme-WuK.default.dark-theme | default: 'dark'}}" class="wrap">
data-dark-theme="{{ page.jekyll-theme-WuK.default.dark-theme | default: 'dark'}}">

{% capture _content %}
{{ content }}
Expand All @@ -102,4 +102,4 @@
{{ page.jekyll-theme-WuK.default.append }}
</body>

</html>
</html>
Loading

0 comments on commit 91008aa

Please sign in to comment.