Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f3932d682c | ||
|
07f3f29b6a | ||
|
47c56cc364 | ||
|
bf2f718d73 | ||
|
550ab8a68d | ||
|
15b16e79ce | ||
|
84bca19471 | ||
|
313752c594 | ||
|
7ef6c7c618 | ||
|
31b38391de | ||
|
9c53a603f3 | ||
|
a9db32d0cb | ||
|
3ff73f9805 | ||
|
5969d1a456 | ||
|
219bb6db37 | ||
|
e0f4461fe5 | ||
|
20332ad8f2 | ||
|
8229b7436f | ||
|
c24db5e371 | ||
|
8b6074fef4 | ||
|
3d4a4fcc7e | ||
|
a842da9697 | ||
|
72c4fd9761 | ||
|
f1c3083f09 |
12
README.md
12
README.md
@@ -1,6 +1,6 @@
|
|||||||
<p align="center"><a href="https://shen-yu.gitee.io" target="_blank" rel="noopener noreferrer"><img width="100" src="logo.png" alt="ayer logo"></a></p>
|
<p align="center"><a href="https://shen-yu.gitee.io" target="_blank" rel="noopener noreferrer"><img width="100" src="logo.png" alt="ayer logo"></a></p>
|
||||||
|
|
||||||
<h3 align="center">一个安静且优雅的 Hexo 主题</h3>
|
<h3 align="center">一个干净且优雅的 Hexo 主题</h3>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://travis-ci.org/Shen-Yu/hexo-theme-ayer?branch=master" target="_blank" rel="noopener noreferrer">
|
<a href="https://travis-ci.org/Shen-Yu/hexo-theme-ayer?branch=master" target="_blank" rel="noopener noreferrer">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
:ocean: Ayer is a clean and elegant theme for Hexo, also fast, powerful and responsive. It contains many awesome features, It's perfect for your blog, "Ayer" means "water" in Malaysian and "yesterday" in Spanish. If you have any queries or advice during the process of using, Please contact me! shenyu@hotmail.com
|
:ocean: Ayer is a clean and elegant theme for Hexo, also fast, powerful and responsive. It contains many awesome features, It's perfect for your blog, "Ayer" means "water" in Malaysian and "yesterday" in Spanish. [Create an issue](https://github.com/shen-yu/hexo-theme-ayer/issues/new/choose) if you have any queries or advice during the process of using,
|
||||||
|
|
||||||
<b>注:收藏本主题请点右上角 Star,谢谢~~ </b>
|
<b>注:收藏本主题请点右上角 Star,谢谢~~ </b>
|
||||||
<b>如果你想给主题添砖加瓦,可以点右上角 Fork,然后给此仓库提交 PR</b>
|
<b>如果你想给主题添砖加瓦,可以点右上角 Fork,然后给此仓库提交 PR</b>
|
||||||
@@ -240,9 +240,6 @@ katex:
|
|||||||
# since year
|
# since year
|
||||||
since: 2019
|
since: 2019
|
||||||
|
|
||||||
# pageFooter (Set true can let more people know this theme, Thanks!)
|
|
||||||
pageFooter: true
|
|
||||||
|
|
||||||
# only for chinese website
|
# only for chinese website
|
||||||
# ICP
|
# ICP
|
||||||
icp:
|
icp:
|
||||||
@@ -324,6 +321,11 @@ ads:
|
|||||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/ten_2.jpg
|
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/ten_2.jpg
|
||||||
url: https://curl.qcloud.com/kvO7hb43
|
url: https://curl.qcloud.com/kvO7hb43
|
||||||
width: 300
|
width: 300
|
||||||
|
|
||||||
|
# encrypt settings
|
||||||
|
lock:
|
||||||
|
enable: false
|
||||||
|
password: 123456
|
||||||
```
|
```
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
44
_config.yml
44
_config.yml
@@ -84,9 +84,9 @@ reward_type: 2
|
|||||||
# 打赏wording
|
# 打赏wording
|
||||||
reward_wording: "请我喝杯咖啡吧~"
|
reward_wording: "请我喝杯咖啡吧~"
|
||||||
# 支付宝二维码图片地址,跟你设置logo的方式一样。比如:/images/alipay.jpg
|
# 支付宝二维码图片地址,跟你设置logo的方式一样。比如:/images/alipay.jpg
|
||||||
alipay: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/alipay.jpg
|
alipay: /images/alipay.jpg
|
||||||
# 微信二维码图片地址
|
# 微信二维码图片地址
|
||||||
weixin: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/wechat.jpg
|
weixin: /images/wechat.jpg
|
||||||
|
|
||||||
# 版权声明
|
# 版权声明
|
||||||
# 版权声明type设定:0-关闭版权声明; 1-文章对应的md文件里有copyright: true属性,才有版权声明; 2-所有文章均有版权声明
|
# 版权声明type设定:0-关闭版权声明; 1-文章对应的md文件里有copyright: true属性,才有版权声明; 2-所有文章均有版权声明
|
||||||
@@ -160,19 +160,16 @@ katex:
|
|||||||
# mermaid流程图 三个选项缺一不可(https://mermaid-js.github.io/mermaid/)
|
# mermaid流程图 三个选项缺一不可(https://mermaid-js.github.io/mermaid/)
|
||||||
mermaid:
|
mermaid:
|
||||||
enable: false
|
enable: false
|
||||||
cdn: https://cdn.jsdelivr.net/npm/mermaid@8.9.2/dist/mermaid.min.js
|
cdn: https://cdn.staticfile.org/mermaid/8.14.0/mermaid.min.js
|
||||||
theme: forest
|
theme: forest
|
||||||
|
|
||||||
# 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式)
|
# 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式)
|
||||||
since: 2015
|
since: 2015
|
||||||
|
|
||||||
# 是否显示页脚信息(建议保留)
|
|
||||||
pageFooter: true
|
|
||||||
|
|
||||||
# ICP备案信息尾部显示
|
# ICP备案信息尾部显示
|
||||||
icp:
|
icp:
|
||||||
enable: false
|
enable: false
|
||||||
url: "http://www.beian.miit.gov.cn/" # 备案链接
|
url: "https://beian.miit.gov.cn/" # 备案链接
|
||||||
text: "浙ICP备88888888" # 备案信息
|
text: "浙ICP备88888888" # 备案信息
|
||||||
# 公安备案信息尾部显示
|
# 公安备案信息尾部显示
|
||||||
gongan:
|
gongan:
|
||||||
@@ -190,28 +187,28 @@ friends_link:
|
|||||||
img: /images/ayer.png
|
img: /images/ayer.png
|
||||||
GitHub:
|
GitHub:
|
||||||
url: https://github.com/Shen-Yu
|
url: https://github.com/Shen-Yu
|
||||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/github.png
|
img: /images/github.png
|
||||||
码云:
|
码云:
|
||||||
url: https://gitee.com/shen-yu
|
url: https://gitee.com/shen-yu
|
||||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/gitee.png
|
img: /images/gitee.png
|
||||||
Hexo官网:
|
Hexo官网:
|
||||||
url: https://hexo.io
|
url: https://hexo.io
|
||||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/hexo.png
|
img: /images/hexo.png
|
||||||
Hexo图表插件:
|
Hexo图表插件:
|
||||||
url: https://github.com/Shen-Yu/hexo-tag-chart
|
url: https://github.com/Shen-Yu/hexo-tag-chart
|
||||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/hexo-tag-chart.png
|
img: /images/hexo-tag-chart.png
|
||||||
|
|
||||||
# 评论:1、Valine(推荐);2、Gitalk;3、Twikoo; 4.MiniValine
|
# 评论:1、Valine(推荐);2、Gitalk;3、Twikoo; 4.MiniValine
|
||||||
|
|
||||||
# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)
|
# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)
|
||||||
# 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可
|
# 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可
|
||||||
leancloud:
|
leancloud:
|
||||||
enable: true
|
enable: false
|
||||||
app_id: #
|
app_id: #
|
||||||
app_key: #
|
app_key: #
|
||||||
# Valine配置
|
# Valine配置
|
||||||
valine:
|
valine:
|
||||||
enable: true # 是否启用
|
enable: false # 是否启用
|
||||||
avatar: monsterid # 头像样式(https://valine.js.org/avatar.html)
|
avatar: monsterid # 头像样式(https://valine.js.org/avatar.html)
|
||||||
placeholder: 给我的文章加点评论吧~ # placeholder
|
placeholder: 给我的文章加点评论吧~ # placeholder
|
||||||
|
|
||||||
@@ -226,7 +223,7 @@ gitalk:
|
|||||||
|
|
||||||
# 3、Twikoo(https://github.com/imaegoo/twikoo)
|
# 3、Twikoo(https://github.com/imaegoo/twikoo)
|
||||||
twikoo:
|
twikoo:
|
||||||
enable: false
|
enable: true
|
||||||
envId: #
|
envId: #
|
||||||
|
|
||||||
# 4、MiniValine
|
# 4、MiniValine
|
||||||
@@ -242,12 +239,17 @@ minivaline:
|
|||||||
# 可以根据需要自行增加ad_3,ad_4...,留空则不显示,建议图片和url不要带ad等关键词,否则可能会被adblock等插件屏蔽
|
# 可以根据需要自行增加ad_3,ad_4...,留空则不显示,建议图片和url不要带ad等关键词,否则可能会被adblock等插件屏蔽
|
||||||
ads:
|
ads:
|
||||||
ad_1:
|
ad_1:
|
||||||
title: vultr优惠vps
|
title: 云服务器限时秒杀
|
||||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/vultr.png
|
img: https://pic.imgdb.cn/item/62174b452ab3f51d912a5ccc.jpg
|
||||||
url: https://www.vultr.com/?ref=8630075
|
|
||||||
width: 300
|
|
||||||
ad_2:
|
|
||||||
title: 云服务器全球购低至2折
|
|
||||||
img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/ten_2.jpg
|
|
||||||
url: https://curl.qcloud.com/kvO7hb43
|
url: https://curl.qcloud.com/kvO7hb43
|
||||||
width: 300
|
width: 300
|
||||||
|
ad_2:
|
||||||
|
title: vultr优惠vps
|
||||||
|
img: https://pic.imgdb.cn/item/62174b452ab3f51d912a5cd7.png
|
||||||
|
url: https://www.vultr.com/?ref=8630075
|
||||||
|
width: 300
|
||||||
|
|
||||||
|
# 网站开启加密访问,密码可设置任何字符
|
||||||
|
lock:
|
||||||
|
enable: false
|
||||||
|
password: 123456
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Oben
|
sticky: Oben
|
||||||
copyright_title: Copyright-Hinweis
|
copyright_title: Copyright-Hinweis
|
||||||
copyright_content: Sofern nicht anders angegeben, liegt das Urheberrecht aller Artikel in diesem Blog beim Autor. Nachdruck bitte Quelle angeben!
|
copyright_content: Sofern nicht anders angegeben, liegt das Urheberrecht aller Artikel in diesem Blog beim Autor. Nachdruck bitte Quelle angeben!
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
copyright_title: Copyright
|
copyright_title: Copyright
|
||||||
copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
copyright_title: Copyright
|
copyright_title: Copyright
|
||||||
copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Arriba
|
sticky: Arriba
|
||||||
copyright_title: Derechos de autor
|
copyright_title: Derechos de autor
|
||||||
copyright_content: Los derechos de autor son propiedad del autor. Para reimpresiones comerciales, comuníquese con el autor para obtener autorización. Para reimpresiones no comerciales, indique la fuente.
|
copyright_content: Los derechos de autor son propiedad del autor. Para reimpresiones comerciales, comuníquese con el autor para obtener autorización. Para reimpresiones no comerciales, indique la fuente.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Haut
|
sticky: Haut
|
||||||
copyright_title: Avis de copyright
|
copyright_title: Avis de copyright
|
||||||
copyright_content: Le droit d'auteur appartient à l'auteur. Pour les réimpressions commerciales, veuillez contacter l'auteur pour autorisation. Pour les réimpressions non commerciales, veuillez indiquer la source.
|
copyright_content: Le droit d'auteur appartient à l'auteur. Pour les réimpressions commerciales, veuillez contacter l'auteur pour autorisation. Pour les réimpressions non commerciales, veuillez indiquer la source.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: 上へ
|
sticky: 上へ
|
||||||
copyright_title: 著作権表示
|
copyright_title: 著作権表示
|
||||||
copyright_content: 著作権は著者が所有しています。商業版の複製については、承認について著者に連絡してください。非商業版の複製については、出典を明記してください。
|
copyright_content: 著作権は著者が所有しています。商業版の複製については、承認について著者に連絡してください。非商業版の複製については、出典を明記してください。
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: 톱
|
sticky: 톱
|
||||||
copyright_title: 저작권 고지
|
copyright_title: 저작권 고지
|
||||||
copyright_content: 저작권은 저자가 소유합니다. 상업용 재 인쇄의 경우 승인을 위해 저자에게 문의하십시오. 비상업적 재 인쇄의 경우 출처를 명시하십시오.
|
copyright_content: 저작권은 저자가 소유합니다. 상업용 재 인쇄의 경우 승인을 위해 저자에게 문의하십시오. 비상업적 재 인쇄의 경우 출처를 명시하십시오.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
copyright_title: Copyright melding
|
copyright_title: Copyright melding
|
||||||
copyright_content: Copyright is eigendom van de auteur. Neem voor commerciële herdrukken contact op met de auteur voor autorisatie. Geef de bron aan voor niet-commerciële herdrukken.
|
copyright_content: Copyright is eigendom van de auteur. Neem voor commerciële herdrukken contact op met de auteur voor autorisatie. Geef de bron aan voor niet-commerciële herdrukken.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
copyright_title: Opphavsrett
|
copyright_title: Opphavsrett
|
||||||
copyright_content: Opphavsrett eies av forfatteren. For kommersielle opptrykk, vennligst kontakt forfatteren for godkjenning. For ikke-kommersiell uttrykk, vennligst oppgi kilden.
|
copyright_content: Opphavsrett eies av forfatteren. For kommersielle opptrykk, vennligst kontakt forfatteren for godkjenning. For ikke-kommersiell uttrykk, vennligst oppgi kilden.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
copyright_title: direito autoral
|
copyright_title: direito autoral
|
||||||
copyright_content: Os direitos autorais são de propriedade do autor. Para reimpressões comerciais, entre em contato com o autor para obter autorização. Para reimpressões não comerciais, indique a fonte.
|
copyright_content: Os direitos autorais são de propriedade do autor. Para reimpressões comerciais, entre em contato com o autor para obter autorização. Para reimpressões não comerciais, indique a fonte.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: липкий
|
sticky: липкий
|
||||||
copyright_title: Авторские права
|
copyright_title: Авторские права
|
||||||
copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник.
|
copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: dính
|
sticky: dính
|
||||||
copyright_title: Bản quyền
|
copyright_title: Bản quyền
|
||||||
copyright_content: Bản quyền thuộc sở hữu của tác giả. Đối với tái bản thương mại, xin vui lòng liên hệ với tác giả cho phép. Đối với tái bản phi thương mại, xin vui lòng cho biết nguồn.
|
copyright_content: Bản quyền thuộc sở hữu của tác giả. Đối với tái bản thương mại, xin vui lòng liên hệ với tác giả cho phép. Đối với tái bản phi thương mại, xin vui lòng cho biết nguồn.
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: Please enter password
|
||||||
|
lock_error: Incorrect password, please try again
|
||||||
|
confirm_text: Ok
|
||||||
|
cancel_text: Cancel
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: 置顶
|
sticky: 置顶
|
||||||
copyright_title: 版权声明
|
copyright_title: 版权声明
|
||||||
copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
|
copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: 请输入访问密码
|
||||||
|
lock_error: 密码错误,请重试
|
||||||
|
confirm_text: 确定
|
||||||
|
cancel_text: 取消
|
||||||
|
@@ -30,3 +30,9 @@ post:
|
|||||||
sticky: 置頂
|
sticky: 置頂
|
||||||
copyright_title: 版權聲明
|
copyright_title: 版權聲明
|
||||||
copyright_content: 本博客所有文章除特別聲明外,著作權歸作者所有。轉載請註明出處!
|
copyright_content: 本博客所有文章除特別聲明外,著作權歸作者所有。轉載請註明出處!
|
||||||
|
|
||||||
|
lock:
|
||||||
|
lock_info: 請輸入訪問密碼
|
||||||
|
lock_error: 密碼錯誤,請重試
|
||||||
|
confirm_text: 確定
|
||||||
|
cancel_text: 取消
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<%- js('/js/jquery-2.0.3.min') %> <%- js('/js/lazyload.min') %>
|
<%- js('/js/jquery-3.6.0.min') %> <%- js('/js/lazyload.min') %>
|
||||||
<!-- Tocbot -->
|
<!-- Tocbot -->
|
||||||
<% if (theme.toc && is_post() && !page.no_toc){ %> <%- js('/js/tocbot.min') %>
|
<% if (theme.toc && is_post() && !page.no_toc){ %> <%- js('/js/tocbot.min') %>
|
||||||
<script>
|
<script>
|
||||||
@@ -15,12 +15,12 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
|
<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css"
|
href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
|
||||||
/>
|
/>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script>
|
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>
|
||||||
<%- js('dist/main') %>
|
<%- js('dist/main') %>
|
||||||
<!-- ImageViewer -->
|
<!-- ImageViewer -->
|
||||||
<% if (theme.image_viewer){ %> <%- partial('viewer') %> <% } %>
|
<% if (theme.image_viewer){ %> <%- partial('viewer') %> <% } %>
|
||||||
@@ -41,7 +41,7 @@ js('/js/busuanzi-2.3.pure.min') %> <% } %>
|
|||||||
<% if (theme.click_effect===1){ %> <%- js('/js/clickLove') %> <% } %>
|
<% if (theme.click_effect===1){ %> <%- js('/js/clickLove') %> <% } %>
|
||||||
<!-- ClickBoom1 -->
|
<!-- ClickBoom1 -->
|
||||||
<% if (theme.click_effect===2){ %>
|
<% if (theme.click_effect===2){ %>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js"></script>
|
<script src="https://cdn.staticfile.org/animejs/3.2.1/anime.min.js"></script>
|
||||||
<%- js('/js/clickBoom1') %> <% } %>
|
<%- js('/js/clickBoom1') %> <% } %>
|
||||||
<!-- ClickBoom2 -->
|
<!-- ClickBoom2 -->
|
||||||
<% if (theme.click_effect===3){ %> <%- js('/js/clickBoom2') %> <% } %>
|
<% if (theme.click_effect===3){ %> <%- js('/js/clickBoom2') %> <% } %>
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if (theme.subtitle.enable){ %>
|
<% if (theme.subtitle.enable){ %>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js"></script>
|
<script src="https://cdn.staticfile.org/typed.js/2.0.12/typed.min.js"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<!-- Subtitle -->
|
<!-- Subtitle -->
|
||||||
|
@@ -32,18 +32,26 @@
|
|||||||
<% if (theme.favicon){ %>
|
<% if (theme.favicon){ %>
|
||||||
<link rel="shortcut icon" href="<%- theme.favicon %>" />
|
<link rel="shortcut icon" href="<%- theme.favicon %>" />
|
||||||
<% } %> <%- css('dist/main') %>
|
<% } %> <%- css('dist/main') %>
|
||||||
<link
|
<%- css('css/fonts/remixicon') %>
|
||||||
rel="stylesheet"
|
|
||||||
href="https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/css/remixicon.min.css"
|
|
||||||
/>
|
|
||||||
<%- css('css/custom') %> <% if (theme.progressBar){ %>
|
<%- css('css/custom') %> <% if (theme.progressBar){ %>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>
|
<script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
|
||||||
<% } %> <%- partial('google-analytics') %> <%- partial('baidu-analytics')
|
<% } %> <%- partial('google-analytics') %> <%- partial('baidu-analytics')
|
||||||
%>
|
%>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
|
||||||
|
/>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>
|
||||||
|
|
||||||
<!-- mermaid -->
|
<!-- mermaid -->
|
||||||
<% if (theme.mermaid.enable) { %>
|
<% if (theme.mermaid.enable) { %>
|
||||||
<script src="<%= theme.mermaid.cdn %>"></script>
|
<script src="<%= theme.mermaid.cdn %>"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<style>
|
||||||
|
.swal2-styled.swal2-confirm {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
</html>
|
</html>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
<% if ( theme.katex.enable ) { %>
|
<% if ( theme.katex.enable ) { %>
|
||||||
<% if( theme.katex.allpost || page.math ) { %>
|
<% if( theme.katex.allpost || page.math ) { %>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.15.1/katex.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js"></script>
|
<script src="https://cdn.staticfile.org/KaTeX/0.15.1/katex.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js"></script>
|
<script src="https://cdn.staticfile.org/KaTeX/0.15.1/contrib/auto-render.min.js"></script>
|
||||||
<% if ( theme.katex.copy_tex ) { %>
|
<% if ( theme.katex.copy_tex ) { %>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.min.js"></script>
|
<script src="https://cdn.staticfile.org/KaTeX/0.15.1/contrib/copy-tex.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.15.1/contrib/copy-tex.min.css">
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
37
layout/_partial/lock.ejs
Normal file
37
layout/_partial/lock.ejs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<% if (theme.lock.enable){ %>
|
||||||
|
<script>
|
||||||
|
const password = "<%= theme.lock.password %>";
|
||||||
|
const lock_password = window.sessionStorage.getItem("lock_password");
|
||||||
|
console.log(password, lock_password);
|
||||||
|
if (lock_password !== password) {
|
||||||
|
Swal.fire({
|
||||||
|
title: "<%= __('lock.lock_info') %>",
|
||||||
|
input: "text",
|
||||||
|
inputAttributes: {
|
||||||
|
autocapitalize: "off",
|
||||||
|
},
|
||||||
|
showCancelButton: false,
|
||||||
|
showLoaderOnConfirm: true,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
confirmButtonText: "<%= __('lock.confirm_text') %>",
|
||||||
|
}).then((result) => {
|
||||||
|
console.log(result);
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
console.log(password);
|
||||||
|
if (result.value === password) {
|
||||||
|
window.sessionStorage.setItem("lock_password", result.value);
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
icon: "error",
|
||||||
|
title: "<%= __('lock.lock_error') %>",
|
||||||
|
confirmButtonText: "<%= __('lock.confirm_text') %>",
|
||||||
|
allowOutsideClick: false,
|
||||||
|
}).then(() => {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<% } %>
|
@@ -15,4 +15,5 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.6/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
<script src="https://cdn.staticfile.org/mathjax/2.7.7/MathJax.js"></script>
|
||||||
|
<script src="https://cdn.staticfile.org/mathjax/2.7.7/config/TeX-AMS-MML_HTMLorMML-full.js"></script>
|
@@ -1,4 +1,4 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
|
<script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function wait(callback, seconds) {
|
function wait(callback, seconds) {
|
||||||
var timelag = null;
|
var timelag = null;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<% if (theme.gitalk.enable && post.comments) { %>
|
<% if (theme.gitalk.enable && post.comments) { %>
|
||||||
<div class="gitalk" id="gitalk-container"></div>
|
<div class="gitalk" id="gitalk-container"></div>
|
||||||
<%- css('https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css') %>
|
<%- css('https://cdn.staticfile.org/gitalk/1.7.2/gitalk.min.css') %>
|
||||||
<%- js('https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js') %>
|
<%- js('https://cdn.staticfile.org/gitalk/1.7.2/gitalk.min.js') %>
|
||||||
<%- js('https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js') %>
|
<%- js('https://cdn.staticfile.org/blueimp-md5/2.19.0/js/md5.min.js') %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var gitalk = new Gitalk({
|
var gitalk = new Gitalk({
|
||||||
clientID: '<%- theme.gitalk.clientID %>',
|
clientID: '<%- theme.gitalk.clientID %>',
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<% if (!index && theme.twikoo && theme.twikoo.enable){ %>
|
<% if (!index && theme.twikoo && theme.twikoo.enable){ %>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js"></script>
|
<script src="https://cdn.staticfile.org/twikoo/1.4.18/twikoo.all.min.js"></script>
|
||||||
<div id="twikoo" class="twikoo"></div>
|
<div id="twikoo" class="twikoo"></div>
|
||||||
<script>
|
<script>
|
||||||
twikoo.init({
|
twikoo.init({
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<div id="vcomments"></div>
|
<div id="vcomments"></div>
|
||||||
</div>
|
</div>
|
||||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js"></script>
|
<script src="https://cdn.staticfile.org/valine/1.4.16/Valine.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
new Valine({
|
new Valine({
|
||||||
el: "#vcomments",
|
el: "#vcomments",
|
||||||
|
@@ -65,10 +65,10 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/default-skin/default-skin.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"></script>
|
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"></script>
|
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe-ui-default.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function viewer_init() {
|
function viewer_init() {
|
||||||
|
@@ -20,11 +20,11 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
<main class="content on">
|
<main class="content on">
|
||||||
<%- body %>
|
<%- body %>
|
||||||
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
|
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
|
||||||
<div class="float_btns">
|
|
||||||
<%- partial('_partial/totop') %>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
|
<div class="float_btns">
|
||||||
|
<%- partial('_partial/float-btns') %>
|
||||||
|
</div>
|
||||||
<aside class="sidebar on">
|
<aside class="sidebar on">
|
||||||
<%- partial('_partial/sidebar') %>
|
<%- partial('_partial/sidebar') %>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
<% if (theme.music&&theme.music.enable){ %>
|
<% if (theme.music&&theme.music.enable){ %>
|
||||||
<%- partial('_partial/music') %>
|
<%- partial('_partial/music') %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<%- partial('_partial/lock') %>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-ayer",
|
"name": "hexo-theme-ayer",
|
||||||
"version": "1.9.0",
|
"version": "1.9.7-0",
|
||||||
"description": "a clean and elegant theme for hexo.",
|
"description": "a clean and elegant theme for hexo.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "rollup -c -w",
|
"dev": "rollup -c -w",
|
||||||
|
@@ -73,7 +73,7 @@
|
|||||||
margin-right 0.5em
|
margin-right 0.5em
|
||||||
margin-left 1em
|
margin-left 1em
|
||||||
.caption
|
.caption
|
||||||
color color-grey
|
color froth
|
||||||
display block
|
display block
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
margin-top 0.5em
|
margin-top 0.5em
|
||||||
@@ -267,6 +267,8 @@ $article-share-link
|
|||||||
background google-color
|
background google-color
|
||||||
text-shadow 0 1px darken(google-color, 20%)
|
text-shadow 0 1px darken(google-color, 20%)
|
||||||
|
|
||||||
|
.pswp__caption__center
|
||||||
|
text-align center !important
|
||||||
|
|
||||||
@import "tocbot"
|
@import "tocbot"
|
||||||
@import "gallery"
|
@import "gallery"
|
||||||
|
@@ -8,9 +8,25 @@
|
|||||||
opacity .95
|
opacity .95
|
||||||
max-width 255px
|
max-width 255px
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
> .toc-list
|
>.toc-list
|
||||||
position relative
|
position relative
|
||||||
overflow hidden
|
overflow-x hidden
|
||||||
|
overflow-y scroll
|
||||||
|
max-height 70vh
|
||||||
|
|
||||||
|
>.toc-list::-webkit-scrollbar
|
||||||
|
width 4px
|
||||||
|
|
||||||
|
>.toc-list::-webkit-scrollbar-thumb
|
||||||
|
border-radius 10px
|
||||||
|
-webkit-box-shadow inset 0 0 5px rgba(0,0,0,0.2)
|
||||||
|
background rgba(0,0,0,0.2)
|
||||||
|
|
||||||
|
>.toc-list::-webkit-scrollbar-track
|
||||||
|
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2)
|
||||||
|
border-radius: 0
|
||||||
|
background: rgba(0,0,0,0.1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.toc-list
|
.toc-list
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// variables
|
// variables
|
||||||
remixicon-font-path = 'https://cdn.jsdelivr.net/npm/remixicon@2.1.0/fonts/' !default;
|
remixicon-font-path = './remixicon/fonts/' !default;
|
||||||
|
|
||||||
@font-face
|
@font-face
|
||||||
font-family: remixicon;
|
font-family: remixicon;
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
@import "_variables"
|
@import "_variables"
|
||||||
@import "_mixins"
|
@import "_mixins"
|
||||||
@import "_remixicon"
|
|
||||||
@import "_normalize"
|
@import "_normalize"
|
||||||
@import "_darkmode"
|
@import "_darkmode"
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
}, searchAnimDuration);
|
}, searchAnimDuration);
|
||||||
};
|
};
|
||||||
|
|
||||||
$(".nav-item-search").click(() => {
|
$(".nav-item-search").on("click", () => {
|
||||||
if (isSearchAnim) return;
|
if (isSearchAnim) return;
|
||||||
startSearchAnim();
|
startSearchAnim();
|
||||||
$searchWrap.addClass("on");
|
$searchWrap.addClass("on");
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).mouseup((e) => {
|
$(document).on("mouseup", (e) => {
|
||||||
const _con = $(".local-search");
|
const _con = $(".local-search");
|
||||||
if (!_con.is(e.target) && _con.has(e.target).length === 0) {
|
if (!_con.is(e.target) && _con.has(e.target).length === 0) {
|
||||||
$searchWrap.removeClass("on");
|
$searchWrap.removeClass("on");
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Not recommended in mobile, /search.xml is actually large.
|
// Not recommended in mobile, /search.xml is actually large.
|
||||||
if ($(".local-search").size()) {
|
if ($(".local-search").length) {
|
||||||
$.getScript("/js/search.js", function () {
|
$.getScript("/js/search.js", function () {
|
||||||
searchFunc("/search.xml", "local-search-input", "local-search-result");
|
searchFunc("/search.xml", "local-search-input", "local-search-result");
|
||||||
});
|
});
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Share
|
// Share
|
||||||
$(".share-outer").click(() => $(".share-wrap").fadeToggle());
|
$(".share-outer").on("click", () => $(".share-wrap").fadeToggle());
|
||||||
|
|
||||||
// Lazyload
|
// Lazyload
|
||||||
$("img.lazy").lazyload({
|
$("img.lazy").lazyload({
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
// ScrollDown
|
// ScrollDown
|
||||||
$(document).ready(function ($) {
|
$(document).ready(function ($) {
|
||||||
$(".anchor").click(function (e) {
|
$(".anchor").on("click", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$("main").animate({ scrollTop: $(".cover").height() }, "smooth");
|
$("main").animate({ scrollTop: $(".cover").height() }, "smooth");
|
||||||
});
|
});
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
// Show and hide the scroll to top link based on scroll position
|
// Show and hide the scroll to top link based on scroll position
|
||||||
scrollElem.hide();
|
scrollElem.hide();
|
||||||
$(".content").scroll(function () {
|
$(".content").on("scroll", () => {
|
||||||
const scrollTop = $(".content").scrollTop();
|
const scrollTop = $(".content").scrollTop();
|
||||||
if (scrollTop > upperLimit) {
|
if (scrollTop > upperLimit) {
|
||||||
$(scrollElem).stop().fadeTo(200, 0.6); // fade back in
|
$(scrollElem).stop().fadeTo(200, 0.6); // fade back in
|
||||||
@@ -112,28 +112,41 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Scroll to top animation on click
|
// Scroll to top animation on click
|
||||||
$(scrollElem).click(function () {
|
$(scrollElem).on("click", () => {
|
||||||
$(".content").animate({ scrollTop: 0 }, scrollSpeed);
|
$(".content").animate({ scrollTop: 0 }, scrollSpeed);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// Caption
|
||||||
|
$(".article-entry").each(function (i) {
|
||||||
|
$(this)
|
||||||
|
.find("img")
|
||||||
|
.each(function () {
|
||||||
|
if ($(this).parent().is("a")) return;
|
||||||
|
|
||||||
|
const { alt } = this;
|
||||||
|
|
||||||
|
if (alt) $(this).after('<span class="caption">' + alt + "</span>");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Mobile Nav
|
// Mobile Nav
|
||||||
const $content = $(".content"),
|
const $content = $(".content"),
|
||||||
$sidebar = $(".sidebar");
|
$sidebar = $(".sidebar");
|
||||||
|
|
||||||
$(".navbar-toggle").on("click", function () {
|
$(".navbar-toggle").on("click", () => {
|
||||||
$(".content,.sidebar").addClass("anim");
|
$(".content,.sidebar").addClass("anim");
|
||||||
$content.toggleClass("on");
|
$content.toggleClass("on");
|
||||||
$sidebar.toggleClass("on");
|
$sidebar.toggleClass("on");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reward
|
// Reward
|
||||||
$("#reward-btn").click(() => {
|
$("#reward-btn").on("click", () => {
|
||||||
$("#reward").fadeIn(150);
|
$("#reward").fadeIn(150);
|
||||||
$("#mask").fadeIn(150);
|
$("#mask").fadeIn(150);
|
||||||
});
|
});
|
||||||
$("#reward .close, #mask").click(() => {
|
$("#reward .close, #mask").on("click", () => {
|
||||||
$("#mask").fadeOut(100);
|
$("#mask").fadeOut(100);
|
||||||
$("#reward").fadeOut(100);
|
$("#reward").fadeOut(100);
|
||||||
});
|
});
|
||||||
@@ -146,7 +159,7 @@
|
|||||||
$("body").removeClass("darkmode");
|
$("body").removeClass("darkmode");
|
||||||
$("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line");
|
$("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line");
|
||||||
}
|
}
|
||||||
$("#todark").click(() => {
|
$("#todark").on("click", () => {
|
||||||
if (sessionStorage.getItem("darkmode") == 1) {
|
if (sessionStorage.getItem("darkmode") == 1) {
|
||||||
$("body").removeClass("darkmode");
|
$("body").removeClass("darkmode");
|
||||||
$("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line");
|
$("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line");
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
<h3>
|
<h3>
|
||||||
Please check it, Maybe you should read
|
Please check it, Maybe you should read
|
||||||
<a href="https://hexo.io/docs/">Hexo</a> and
|
<a href="https://hexo.io/docs/">Hexo</a> and
|
||||||
<a href="https://shen-yu.gitee.io/2019/ayer/">Ayer</a> Docs
|
<a href="https://github.com/Shen-Yu/hexo-theme-ayer">Ayer</a> Docs
|
||||||
carefully.
|
carefully.
|
||||||
</h3>
|
</h3>
|
||||||
<h3>
|
<h3>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<a href="https://shen-yu.gitee.io/2019/ayer/">Ayer</a> 的说明文档~
|
<a href="https://shen-yu.gitee.io/2019/ayer/">Ayer</a> 的说明文档~
|
||||||
</h3>
|
</h3>
|
||||||
</figcaption>
|
</figcaption>
|
||||||
<img src="https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/404.jpg" />
|
<img src="https://tvax4.sinaimg.cn/large/9156bd04ly1gzofhomcm4j20zk0p5jrw.jpg" />
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
1816
source/css/fonts/remixicon.css
Normal file
1816
source/css/fonts/remixicon.css
Normal file
File diff suppressed because it is too large
Load Diff
BIN
source/css/fonts/remixicon.eot
Normal file
BIN
source/css/fonts/remixicon.eot
Normal file
Binary file not shown.
5329
source/css/fonts/remixicon.svg
Normal file
5329
source/css/fonts/remixicon.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 868 KiB |
BIN
source/css/fonts/remixicon.ttf
Normal file
BIN
source/css/fonts/remixicon.ttf
Normal file
Binary file not shown.
BIN
source/css/fonts/remixicon.woff
Normal file
BIN
source/css/fonts/remixicon.woff
Normal file
Binary file not shown.
BIN
source/css/fonts/remixicon.woff2
Normal file
BIN
source/css/fonts/remixicon.woff2
Normal file
Binary file not shown.
2
source/dist/main.css
vendored
2
source/dist/main.css
vendored
File diff suppressed because one or more lines are too long
2
source/dist/main.js
vendored
2
source/dist/main.js
vendored
@@ -1 +1 @@
|
|||||||
!function(){"use strict";var e;function t(e,t){e=e.replace(/<%-sUrl%>/g,encodeURIComponent(t.sUrl)).replace(/<%-sTitle%>/g,encodeURIComponent(t.sTitle)).replace(/<%-sDesc%>/g,encodeURIComponent(t.sDesc)).replace(/<%-sPic%>/g,encodeURIComponent(t.sPic));window.open(e)}function o(){$(".wx-share-modal").removeClass("in ready"),$("#share-mask").hide()}function s(e,o){"weibo"===e?t("http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>",o):"qq"===e?t("http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>",o):"douban"===e?t("https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>",o):"qzone"===e?t("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>",o):"facebook"===e?t("https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>",o):"twitter"===e?t("https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>",o):"google"===e?t("https://plus.google.com/share?url=<%-sUrl%>",o):"weixin"===e&&($(".wx-share-modal").addClass("in ready"),$("#share-mask").show())}!function(e){let t=e(".search-form-wrap"),o=!1;e(".nav-item-search").click((()=>{var s;o||(o=!0,t.addClass("on"),s=function(){e(".local-search-input").focus()},setTimeout((function(){o=!1,s&&s()}),200))})),e(document).mouseup((o=>{const s=e(".local-search");s.is(o.target)||0!==s.has(o.target).length||t.removeClass("on")})),e(".local-search").size()&&e.getScript("/js/search.js",(function(){searchFunc("/search.xml","local-search-input","local-search-result")})),e(".share-outer").click((()=>e(".share-wrap").fadeToggle())),e("img.lazy").lazyload({effect:"fadeIn"}),e("#gallery").justifiedGallery({rowHeight:200,margins:5}),e(document).ready((function(e){e(".anchor").click((function(t){t.preventDefault(),e("main").animate({scrollTop:e(".cover").height()},"smooth")}))})),(()=>{const t=e("#totop");t.hide(),e(".content").scroll((function(){e(".content").scrollTop()>1e3?e(t).stop().fadeTo(200,.6):e(t).stop().fadeTo(200,0)})),e(t).click((function(){return e(".content").animate({scrollTop:0},1e3),!1}))})();const s=e(".content"),r=e(".sidebar");e(".navbar-toggle").on("click",(function(){e(".content,.sidebar").addClass("anim"),s.toggleClass("on"),r.toggleClass("on")})),e("#reward-btn").click((()=>{e("#reward").fadeIn(150),e("#mask").fadeIn(150)})),e("#reward .close, #mask").click((()=>{e("#mask").fadeOut(100),e("#reward").fadeOut(100)})),1==sessionStorage.getItem("darkmode")?(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line")):(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line")),e("#todark").click((()=>{1==sessionStorage.getItem("darkmode")?(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"),sessionStorage.removeItem("darkmode")):(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"),sessionStorage.setItem("darkmode",1))}));console.log("%c%s%c%s%c%s","background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;","主题不错?⭐star 支持一下 ->","background-color: #ffbca2; padding: 8px; font-size: 14px;","https://github.com/Shen-Yu/hexo-theme-ayer","background-color: #eaf8ff;","\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n")}(jQuery),e={id:"JGjrOr2rebvP6q2a",ck:"JGjrOr2rebvP6q2a"},function(t){var o=window,s=document,r=e,a="".concat("https:"===s.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),n=s.createElement("script"),c=s.getElementsByTagName("script")[0];n.type="text/javascript",n.setAttribute("charset","UTF-8"),n.async=!0,n.src=a,n.id="LA_COLLECT",r.d=n;var i=function(){o.LA.ids.push(r)};o.LA?o.LA.ids&&i():(o.LA=e,o.LA.ids=[],i()),c.parentNode.insertBefore(n,c)}();(()=>{let e=document.querySelectorAll(".share-sns");if(!e||0===e.length)return;let t=window.location.href,r=document.querySelector("title").innerHTML,a=document.querySelectorAll(".article-entry img").length?document.querySelector(".article-entry img").getAttribute("src"):"";""===a||/^(http:|https:)?\/\//.test(a)||(a=window.location.origin+a),e.forEach((e=>{e.onclick=o=>{s(e.getAttribute("data-type"),{sUrl:t,sPic:a,sTitle:r,sDesc:r})}})),document.querySelector("#mask").onclick=o,document.querySelector(".modal-close").onclick=o})()}();
|
!function(){"use strict";var e;function t(e,t){e=e.replace(/<%-sUrl%>/g,encodeURIComponent(t.sUrl)).replace(/<%-sTitle%>/g,encodeURIComponent(t.sTitle)).replace(/<%-sDesc%>/g,encodeURIComponent(t.sDesc)).replace(/<%-sPic%>/g,encodeURIComponent(t.sPic));window.open(e)}function o(){$(".wx-share-modal").removeClass("in ready"),$("#share-mask").hide()}function s(e,o){"weibo"===e?t("http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>",o):"qq"===e?t("http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>",o):"douban"===e?t("https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>",o):"qzone"===e?t("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>",o):"facebook"===e?t("https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>",o):"twitter"===e?t("https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>",o):"google"===e?t("https://plus.google.com/share?url=<%-sUrl%>",o):"weixin"===e&&($(".wx-share-modal").addClass("in ready"),$("#share-mask").show())}!function(e){let t=e(".search-form-wrap"),o=!1;e(".nav-item-search").on("click",(()=>{var s;o||(o=!0,t.addClass("on"),s=function(){e(".local-search-input").focus()},setTimeout((function(){o=!1,s&&s()}),200))})),e(document).on("mouseup",(o=>{const s=e(".local-search");s.is(o.target)||0!==s.has(o.target).length||t.removeClass("on")})),e(".local-search").length&&e.getScript("/js/search.js",(function(){searchFunc("/search.xml","local-search-input","local-search-result")})),e(".share-outer").on("click",(()=>e(".share-wrap").fadeToggle())),e("img.lazy").lazyload({effect:"fadeIn"}),e("#gallery").justifiedGallery({rowHeight:200,margins:5}),e(document).ready((function(e){e(".anchor").on("click",(function(t){t.preventDefault(),e("main").animate({scrollTop:e(".cover").height()},"smooth")}))})),(()=>{const t=e("#totop");t.hide(),e(".content").on("scroll",(()=>{e(".content").scrollTop()>1e3?e(t).stop().fadeTo(200,.6):e(t).stop().fadeTo(200,0)})),e(t).on("click",(()=>(e(".content").animate({scrollTop:0},1e3),!1)))})(),e(".article-entry").each((function(t){e(this).find("img").each((function(){if(e(this).parent().is("a"))return;const{alt:t}=this;t&&e(this).after('<span class="caption">'+t+"</span>")}))}));const s=e(".content"),r=e(".sidebar");e(".navbar-toggle").on("click",(()=>{e(".content,.sidebar").addClass("anim"),s.toggleClass("on"),r.toggleClass("on")})),e("#reward-btn").on("click",(()=>{e("#reward").fadeIn(150),e("#mask").fadeIn(150)})),e("#reward .close, #mask").on("click",(()=>{e("#mask").fadeOut(100),e("#reward").fadeOut(100)})),1==sessionStorage.getItem("darkmode")?(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line")):(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line")),e("#todark").on("click",(()=>{1==sessionStorage.getItem("darkmode")?(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"),sessionStorage.removeItem("darkmode")):(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"),sessionStorage.setItem("darkmode",1))}));console.log("%c%s%c%s%c%s","background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;","主题不错?⭐star 支持一下 ->","background-color: #ffbca2; padding: 8px; font-size: 14px;","https://github.com/Shen-Yu/hexo-theme-ayer","background-color: #eaf8ff;","\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n")}(jQuery),e={id:"JGjrOr2rebvP6q2a",ck:"JGjrOr2rebvP6q2a"},function(t){var o=window,s=document,r=e,n="".concat("https:"===s.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),a=s.createElement("script"),c=s.getElementsByTagName("script")[0];a.type="text/javascript",a.setAttribute("charset","UTF-8"),a.async=!0,a.src=n,a.id="LA_COLLECT",r.d=a;var i=function(){o.LA.ids.push(r)};o.LA?o.LA.ids&&i():(o.LA=e,o.LA.ids=[],i()),c.parentNode.insertBefore(a,c)}();(()=>{let e=document.querySelectorAll(".share-sns");if(!e||0===e.length)return;let t=window.location.href,r=document.querySelector("title").innerHTML,n=document.querySelectorAll(".article-entry img").length?document.querySelector(".article-entry img").getAttribute("src"):"";""===n||/^(http:|https:)?\/\//.test(n)||(n=window.location.origin+n),e.forEach((e=>{e.onclick=o=>{s(e.getAttribute("data-type"),{sUrl:t,sPic:n,sTitle:r,sDesc:r})}})),document.querySelector("#mask").onclick=o,document.querySelector(".modal-close").onclick=o})()}();
|
||||||
|
BIN
source/images/gitee.png
Normal file
BIN
source/images/gitee.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
source/images/github.png
Normal file
BIN
source/images/github.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
source/images/hexo-tag-chart.png
Normal file
BIN
source/images/hexo-tag-chart.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
source/images/hexo.png
Normal file
BIN
source/images/hexo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@@ -18,134 +18,134 @@ let pointerX = 0;
|
|||||||
let pointerY = 0;
|
let pointerY = 0;
|
||||||
|
|
||||||
let tap =
|
let tap =
|
||||||
"ontouchstart" in window || navigator.msMaxTouchPoints
|
"ontouchstart" in window || navigator.msMaxTouchPoints
|
||||||
? "touchstart"
|
? "touchstart"
|
||||||
: "mousedown";
|
: "mousedown";
|
||||||
|
|
||||||
// sea blue
|
// sea blue
|
||||||
let colors = ["127, 180, 226", "157, 209, 243", "204, 229, 255"];
|
let colors = ["127, 180, 226", "157, 209, 243", "204, 229, 255"];
|
||||||
|
|
||||||
function setCanvasSize() {
|
function setCanvasSize() {
|
||||||
canvasEl.width = window.innerWidth;
|
canvasEl.width = window.innerWidth;
|
||||||
canvasEl.height = window.innerHeight;
|
canvasEl.height = window.innerHeight;
|
||||||
canvasEl.style.width = window.innerWidth + "px";
|
canvasEl.style.width = window.innerWidth + "px";
|
||||||
canvasEl.style.height = window.innerHeight + "px";
|
canvasEl.style.height = window.innerHeight + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCoords(e) {
|
function updateCoords(e) {
|
||||||
pointerX = e.clientX || e.touches[0].clientX;
|
pointerX = e.clientX || e.touches[0].clientX;
|
||||||
pointerY = e.clientY || e.touches[0].clientY;
|
pointerY = e.clientY || e.touches[0].clientY;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setParticuleDirection(p) {
|
function setParticuleDirection(p) {
|
||||||
let angle = (anime.random(0, 360) * Math.PI) / 180;
|
let angle = (anime.random(0, 360) * Math.PI) / 180;
|
||||||
let value = anime.random(minDiffuseRadius, maxDiffuseRadius);
|
let value = anime.random(minDiffuseRadius, maxDiffuseRadius);
|
||||||
let radius = [-1, 1][anime.random(0, 1)] * value;
|
let radius = [-1, 1][anime.random(0, 1)] * value;
|
||||||
return {
|
return {
|
||||||
x: p.x + radius * Math.cos(angle),
|
x: p.x + radius * Math.cos(angle),
|
||||||
y: p.y + radius * Math.sin(angle)
|
y: p.y + radius * Math.sin(angle),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function createParticule(x, y) {
|
function createParticule(x, y) {
|
||||||
let p = {};
|
let p = {};
|
||||||
p.x = x;
|
p.x = x;
|
||||||
p.y = y;
|
p.y = y;
|
||||||
p.color =
|
p.color =
|
||||||
"rgba(" +
|
"rgba(" +
|
||||||
colors[anime.random(0, colors.length - 1)] +
|
colors[anime.random(0, colors.length - 1)] +
|
||||||
"," +
|
"," +
|
||||||
anime.random(0.2, 0.8) +
|
anime.random(0.2, 0.8) +
|
||||||
")";
|
")";
|
||||||
p.radius = anime.random(minCircleRadius, maxCircleRadius);
|
p.radius = anime.random(minCircleRadius, maxCircleRadius);
|
||||||
p.endPos = setParticuleDirection(p);
|
p.endPos = setParticuleDirection(p);
|
||||||
p.draw = function () {
|
p.draw = function () {
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
||||||
ctx.fillStyle = p.color;
|
ctx.fillStyle = p.color;
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
};
|
};
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
function createCircle(x, y) {
|
function createCircle(x, y) {
|
||||||
let p = {};
|
let p = {};
|
||||||
p.x = x;
|
p.x = x;
|
||||||
p.y = y;
|
p.y = y;
|
||||||
p.color = "#000";
|
p.color = "#000";
|
||||||
p.radius = 0.1;
|
p.radius = 0.1;
|
||||||
p.alpha = 0.5;
|
p.alpha = 0.5;
|
||||||
p.lineWidth = 6;
|
p.lineWidth = 6;
|
||||||
p.draw = function () {
|
p.draw = function () {
|
||||||
ctx.globalAlpha = p.alpha;
|
ctx.globalAlpha = p.alpha;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true);
|
||||||
ctx.lineWidth = p.lineWidth;
|
ctx.lineWidth = p.lineWidth;
|
||||||
ctx.strokeStyle = p.color;
|
ctx.strokeStyle = p.color;
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
ctx.globalAlpha = 1;
|
ctx.globalAlpha = 1;
|
||||||
};
|
};
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderParticule(anim) {
|
function renderParticule(anim) {
|
||||||
for (let i = 0; i < anim.animatables.length; i++) {
|
for (let i = 0; i < anim.animatables.length; i++) {
|
||||||
anim.animatables[i].target.draw();
|
anim.animatables[i].target.draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function animateParticules(x, y) {
|
function animateParticules(x, y) {
|
||||||
let circle = createCircle(x, y);
|
let circle = createCircle(x, y);
|
||||||
let particules = [];
|
let particules = [];
|
||||||
for (let i = 0; i < numberOfParticules; i++) {
|
for (let i = 0; i < numberOfParticules; i++) {
|
||||||
particules.push(createParticule(x, y));
|
particules.push(createParticule(x, y));
|
||||||
}
|
}
|
||||||
anime
|
anime
|
||||||
.timeline()
|
.timeline()
|
||||||
.add({
|
.add({
|
||||||
targets: particules,
|
targets: particules,
|
||||||
x: function (p) {
|
x: function (p) {
|
||||||
return p.endPos.x;
|
return p.endPos.x;
|
||||||
},
|
},
|
||||||
y: function (p) {
|
y: function (p) {
|
||||||
return p.endPos.y;
|
return p.endPos.y;
|
||||||
},
|
},
|
||||||
radius: 0.1,
|
radius: 0.1,
|
||||||
duration: anime.random(minAnimeDuration, maxAnimeDuration),
|
duration: anime.random(minAnimeDuration, maxAnimeDuration),
|
||||||
easing: "easeOutExpo",
|
easing: "easeOutExpo",
|
||||||
update: renderParticule
|
update: renderParticule,
|
||||||
})
|
})
|
||||||
.add({
|
.add({
|
||||||
targets: circle,
|
targets: circle,
|
||||||
radius: anime.random(minOrbitRadius, maxOrbitRadius),
|
radius: anime.random(minOrbitRadius, maxOrbitRadius),
|
||||||
lineWidth: 0,
|
lineWidth: 0,
|
||||||
alpha: {
|
alpha: {
|
||||||
value: 0,
|
value: 0,
|
||||||
easing: "linear",
|
easing: "linear",
|
||||||
duration: anime.random(600, 800)
|
duration: anime.random(600, 800),
|
||||||
},
|
},
|
||||||
duration: anime.random(1200, 1800),
|
duration: anime.random(1200, 1800),
|
||||||
easing: "easeOutExpo",
|
easing: "easeOutExpo",
|
||||||
update: renderParticule,
|
update: renderParticule,
|
||||||
offset: 0
|
offset: 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let render = anime({
|
let render = anime({
|
||||||
duration: Infinity,
|
duration: Infinity,
|
||||||
update: function () {
|
update: function () {
|
||||||
ctx.clearRect(0, 0, canvasEl.width, canvasEl.height);
|
ctx.clearRect(0, 0, canvasEl.width, canvasEl.height);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener(
|
document.addEventListener(
|
||||||
tap,
|
tap,
|
||||||
function (e) {
|
function (e) {
|
||||||
render.play();
|
render.play();
|
||||||
updateCoords(e);
|
updateCoords(e);
|
||||||
animateParticules(pointerX, pointerY);
|
animateParticules(pointerX, pointerY);
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
setCanvasSize();
|
setCanvasSize();
|
||||||
|
@@ -1,154 +1,180 @@
|
|||||||
class Circle {
|
class Circle {
|
||||||
constructor({ origin, speed, color, angle, context }) {
|
constructor({ origin, speed, color, angle, context }) {
|
||||||
this.origin = origin
|
this.origin = origin;
|
||||||
this.position = { ...this.origin }
|
this.position = { ...this.origin };
|
||||||
this.color = color
|
this.color = color;
|
||||||
this.speed = speed
|
this.speed = speed;
|
||||||
this.angle = angle
|
this.angle = angle;
|
||||||
this.context = context
|
this.context = context;
|
||||||
this.renderCount = 0
|
this.renderCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
draw() {
|
draw() {
|
||||||
this.context.fillStyle = this.color
|
this.context.fillStyle = this.color;
|
||||||
this.context.beginPath()
|
this.context.beginPath();
|
||||||
this.context.arc(this.position.x, this.position.y, 2, 0, Math.PI * 2)
|
this.context.arc(this.position.x, this.position.y, 2, 0, Math.PI * 2);
|
||||||
this.context.fill()
|
this.context.fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
move() {
|
move() {
|
||||||
this.position.x = (Math.sin(this.angle) * this.speed) + this.position.x
|
this.position.x = Math.sin(this.angle) * this.speed + this.position.x;
|
||||||
this.position.y = (Math.cos(this.angle) * this.speed) + this.position.y + (this.renderCount * 0.3)
|
this.position.y =
|
||||||
this.renderCount++
|
Math.cos(this.angle) * this.speed +
|
||||||
|
this.position.y +
|
||||||
|
this.renderCount * 0.3;
|
||||||
|
this.renderCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Boom {
|
||||||
|
constructor({ origin, context, circleCount = 10, area }) {
|
||||||
|
this.origin = origin;
|
||||||
|
this.context = context;
|
||||||
|
this.circleCount = circleCount;
|
||||||
|
this.area = area;
|
||||||
|
this.stop = false;
|
||||||
|
this.circles = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
randomArray(range) {
|
||||||
|
const length = range.length;
|
||||||
|
const randomIndex = Math.floor(length * Math.random());
|
||||||
|
return range[randomIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
randomColor() {
|
||||||
|
const range = ["8", "9", "A", "B", "C", "D", "E", "F"];
|
||||||
|
return (
|
||||||
|
"#" +
|
||||||
|
this.randomArray(range) +
|
||||||
|
this.randomArray(range) +
|
||||||
|
this.randomArray(range) +
|
||||||
|
this.randomArray(range) +
|
||||||
|
this.randomArray(range) +
|
||||||
|
this.randomArray(range)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
randomRange(start, end) {
|
||||||
|
return (end - start) * Math.random() + start;
|
||||||
|
}
|
||||||
|
|
||||||
|
init() {
|
||||||
|
for (let i = 0; i < this.circleCount; i++) {
|
||||||
|
const circle = new Circle({
|
||||||
|
context: this.context,
|
||||||
|
origin: this.origin,
|
||||||
|
color: this.randomColor(),
|
||||||
|
angle: this.randomRange(Math.PI - 1, Math.PI + 1),
|
||||||
|
speed: this.randomRange(1, 6),
|
||||||
|
});
|
||||||
|
this.circles.push(circle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Boom {
|
move() {
|
||||||
constructor ({ origin, context, circleCount = 10, area }) {
|
this.circles.forEach((circle, index) => {
|
||||||
this.origin = origin
|
if (
|
||||||
this.context = context
|
circle.position.x > this.area.width ||
|
||||||
this.circleCount = circleCount
|
circle.position.y > this.area.height
|
||||||
this.area = area
|
) {
|
||||||
this.stop = false
|
return this.circles.splice(index, 1);
|
||||||
this.circles = []
|
|
||||||
}
|
|
||||||
|
|
||||||
randomArray(range) {
|
|
||||||
const length = range.length
|
|
||||||
const randomIndex = Math.floor(length * Math.random())
|
|
||||||
return range[randomIndex]
|
|
||||||
}
|
|
||||||
|
|
||||||
randomColor() {
|
|
||||||
const range = ['8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
|
|
||||||
return '#' + this.randomArray(range) + this.randomArray(range) + this.randomArray(range) + this.randomArray(range) + this.randomArray(range) + this.randomArray(range)
|
|
||||||
}
|
|
||||||
|
|
||||||
randomRange(start, end) {
|
|
||||||
return (end - start) * Math.random() + start
|
|
||||||
}
|
|
||||||
|
|
||||||
init() {
|
|
||||||
for(let i = 0; i < this.circleCount; i++) {
|
|
||||||
const circle = new Circle({
|
|
||||||
context: this.context,
|
|
||||||
origin: this.origin,
|
|
||||||
color: this.randomColor(),
|
|
||||||
angle: this.randomRange(Math.PI - 1, Math.PI + 1),
|
|
||||||
speed: this.randomRange(1, 6)
|
|
||||||
})
|
|
||||||
this.circles.push(circle)
|
|
||||||
}
|
}
|
||||||
}
|
circle.move();
|
||||||
|
});
|
||||||
move() {
|
if (this.circles.length == 0) {
|
||||||
this.circles.forEach((circle, index) => {
|
this.stop = true;
|
||||||
if (circle.position.x > this.area.width || circle.position.y > this.area.height) {
|
|
||||||
return this.circles.splice(index, 1)
|
|
||||||
}
|
|
||||||
circle.move()
|
|
||||||
})
|
|
||||||
if (this.circles.length == 0) {
|
|
||||||
this.stop = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
draw() {
|
|
||||||
this.circles.forEach(circle => circle.draw())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CursorSpecialEffects {
|
draw() {
|
||||||
constructor() {
|
this.circles.forEach((circle) => circle.draw());
|
||||||
this.computerCanvas = document.createElement('canvas')
|
|
||||||
this.renderCanvas = document.createElement('canvas')
|
|
||||||
|
|
||||||
this.computerContext = this.computerCanvas.getContext('2d')
|
|
||||||
this.renderContext = this.renderCanvas.getContext('2d')
|
|
||||||
|
|
||||||
this.globalWidth = window.innerWidth
|
|
||||||
this.globalHeight = window.innerHeight
|
|
||||||
|
|
||||||
this.booms = []
|
|
||||||
this.running = false
|
|
||||||
}
|
|
||||||
|
|
||||||
handleMouseDown(e) {
|
|
||||||
const boom = new Boom({
|
|
||||||
origin: { x: e.clientX, y: e.clientY },
|
|
||||||
context: this.computerContext,
|
|
||||||
area: {
|
|
||||||
width: this.globalWidth,
|
|
||||||
height: this.globalHeight
|
|
||||||
}
|
|
||||||
})
|
|
||||||
boom.init()
|
|
||||||
this.booms.push(boom)
|
|
||||||
this.running || this.run()
|
|
||||||
}
|
|
||||||
|
|
||||||
handlePageHide() {
|
|
||||||
this.booms = []
|
|
||||||
this.running = false
|
|
||||||
}
|
|
||||||
|
|
||||||
init() {
|
|
||||||
const style = this.renderCanvas.style
|
|
||||||
style.position = 'fixed'
|
|
||||||
style.top = style.left = 0
|
|
||||||
style.zIndex = '99999'
|
|
||||||
style.pointerEvents = 'none'
|
|
||||||
|
|
||||||
style.width = this.renderCanvas.width = this.computerCanvas.width = this.globalWidth
|
|
||||||
style.height = this.renderCanvas.height = this.computerCanvas.height = this.globalHeight
|
|
||||||
|
|
||||||
document.body.append(this.renderCanvas)
|
|
||||||
|
|
||||||
window.addEventListener('mousedown', this.handleMouseDown.bind(this))
|
|
||||||
window.addEventListener('pagehide', this.handlePageHide.bind(this))
|
|
||||||
}
|
|
||||||
|
|
||||||
run() {
|
|
||||||
this.running = true
|
|
||||||
if (this.booms.length == 0) {
|
|
||||||
return this.running = false
|
|
||||||
}
|
|
||||||
|
|
||||||
requestAnimationFrame(this.run.bind(this))
|
|
||||||
|
|
||||||
this.computerContext.clearRect(0, 0, this.globalWidth, this.globalHeight)
|
|
||||||
this.renderContext.clearRect(0, 0, this.globalWidth, this.globalHeight)
|
|
||||||
|
|
||||||
this.booms.forEach((boom, index) => {
|
|
||||||
if (boom.stop) {
|
|
||||||
return this.booms.splice(index, 1)
|
|
||||||
}
|
|
||||||
boom.move()
|
|
||||||
boom.draw()
|
|
||||||
})
|
|
||||||
this.renderContext.drawImage(this.computerCanvas, 0, 0, this.globalWidth, this.globalHeight)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const cursorSpecialEffects = new CursorSpecialEffects()
|
|
||||||
cursorSpecialEffects.init()
|
class CursorSpecialEffects {
|
||||||
|
constructor() {
|
||||||
|
this.computerCanvas = document.createElement("canvas");
|
||||||
|
this.renderCanvas = document.createElement("canvas");
|
||||||
|
|
||||||
|
this.computerContext = this.computerCanvas.getContext("2d");
|
||||||
|
this.renderContext = this.renderCanvas.getContext("2d");
|
||||||
|
|
||||||
|
this.globalWidth = window.innerWidth;
|
||||||
|
this.globalHeight = window.innerHeight;
|
||||||
|
|
||||||
|
this.booms = [];
|
||||||
|
this.running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleMouseDown(e) {
|
||||||
|
const boom = new Boom({
|
||||||
|
origin: { x: e.clientX, y: e.clientY },
|
||||||
|
context: this.computerContext,
|
||||||
|
area: {
|
||||||
|
width: this.globalWidth,
|
||||||
|
height: this.globalHeight,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
boom.init();
|
||||||
|
this.booms.push(boom);
|
||||||
|
this.running || this.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
handlePageHide() {
|
||||||
|
this.booms = [];
|
||||||
|
this.running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
init() {
|
||||||
|
const style = this.renderCanvas.style;
|
||||||
|
style.position = "fixed";
|
||||||
|
style.top = style.left = 0;
|
||||||
|
style.zIndex = "99999";
|
||||||
|
style.pointerEvents = "none";
|
||||||
|
|
||||||
|
style.width =
|
||||||
|
this.renderCanvas.width =
|
||||||
|
this.computerCanvas.width =
|
||||||
|
this.globalWidth;
|
||||||
|
style.height =
|
||||||
|
this.renderCanvas.height =
|
||||||
|
this.computerCanvas.height =
|
||||||
|
this.globalHeight;
|
||||||
|
|
||||||
|
document.body.append(this.renderCanvas);
|
||||||
|
|
||||||
|
window.addEventListener("mousedown", this.handleMouseDown.bind(this));
|
||||||
|
window.addEventListener("pagehide", this.handlePageHide.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
run() {
|
||||||
|
this.running = true;
|
||||||
|
if (this.booms.length == 0) {
|
||||||
|
return (this.running = false);
|
||||||
|
}
|
||||||
|
|
||||||
|
requestAnimationFrame(this.run.bind(this));
|
||||||
|
|
||||||
|
this.computerContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
||||||
|
this.renderContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
||||||
|
|
||||||
|
this.booms.forEach((boom, index) => {
|
||||||
|
if (boom.stop) {
|
||||||
|
return this.booms.splice(index, 1);
|
||||||
|
}
|
||||||
|
boom.move();
|
||||||
|
boom.draw();
|
||||||
|
});
|
||||||
|
this.renderContext.drawImage(
|
||||||
|
this.computerCanvas,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
this.globalWidth,
|
||||||
|
this.globalHeight
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const cursorSpecialEffects = new CursorSpecialEffects();
|
||||||
|
cursorSpecialEffects.init();
|
||||||
|
6
source/js/jquery-2.0.3.min.js
vendored
6
source/js/jquery-2.0.3.min.js
vendored
File diff suppressed because one or more lines are too long
2
source/js/jquery-3.6.0.min.js
vendored
Normal file
2
source/js/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user