Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fireworks effect failed to open #6

Closed
JacklinZhang opened this issue Jun 16, 2019 · 1 comment
Closed

Fireworks effect failed to open #6

JacklinZhang opened this issue Jun 16, 2019 · 1 comment

Comments

@JacklinZhang
Copy link

JacklinZhang commented Jun 16, 2019

I add fireworks: true to melody.yml,but there is no fireworks effect .

hexo-theme-melody-Fireworks

@jerryc127
Copy link
Owner

舊的版本這個fireworks被刪掉了
剛才提交的版本加上了

你也可以自己修改

在 additional-js.pug加上
if theme.fireworks && theme.fireworks.enable
  script(src='https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js')
  script(src=url_for('/js/third-party/fireworks.js'))

在layout.pug

  body
    if theme.fireworks && theme.fireworks.enable
      canvas.fireworks
    if (is_post() && page.toc != false && theme.toc.enable)
      i.fa.fa-arrow-right#toggle-sidebar(aria-hidden="true")
      include ./sidebar.pug

在 _GLOBEL/index.styl添加
.fireworks
  position: fixed
  z-index: -1
  pointer-events: none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants