This theme component adds some animated snow to your forum.
Warning: the animations will increase browser CPU usage ![]()
Javascript mode (shared by @cjk77 here):
CSS Mode (adapted from here)
This theme component adds some animated snow to your forum.
Warning: the animations will increase browser CPU usage ![]()
Javascript mode (shared by @cjk77 here):
CSS Mode (adapted from here)
Thanks - now with snow ![]()
Installation:
Go to: /admin/customize/themes
Choose Compontes - add Install.
Paste in the link: https://github.com/davidtaylorhq/discourse-snow-theme.git
Go back to admin/customize/themes and find your theme.
Click it and you can customize your theme.
Scroll down
Add the new component to your theme.
And your have ![]()
I’ve got a couple of users using Firefox and Opera where this isn’t working (configured with js-mode), but the codepen example of the code does work. Works fine in Chrome. Any ideas?
ETA: Both users have confirmed that css mode works for them
It seems to be a Chrome-only component. On Firefox, with JS-mode, there’s nothing, and with CSS mode there’s a wall of jerky snow flakes that covers the screen, so it’s not really usable.
It is now updated so that js-mode works for Firefox. I haven’t tested Opera, but I suspect the same fix will help there as well.
Can confirm it’s now working for both of my users, Firefox and Opera. Thanks for the fix.
有没有办法把雪花换成随机烟花?
而且使用雪花效果时,我的 CPU 占用从未上升。我在桌面和手机上都测试过,整个论坛的用户都非常喜欢,没有任何关于 CPU 占用的投诉。
你好!我很喜欢这个功能,它非常可爱,真的让页面生动了起来。不过我在想,是否可以让它只出现在棋盘的左右两侧(即未使用的空间),或者让它出现在棋盘后面?这样雪花就不会飘满整个文本区域,从而避免影响阅读。
在最新的 Discourse 版本中似乎运行正常……
非常喜欢这个主题组件,但有没有办法将“点”(或者说“圆点”?)更改为真正的雪花图标?
有没有办法让雪花下落得慢一点,这样就不会那么分散注意力了?有点像懒洋洋的雪?或者有没有办法让用户自己关闭雪花,这样有些人可以享受它,而那些觉得它有问题的人可以关闭它?
您使用的是 CSS 版本还是 JS 版本?
已从 JS 切换到 CSS!但我们可以尝试任何一种,看哪种更容易。@famousamos.1 供您参考
@dennisjbr 正在处理 - 我应该先问他的,但我的待办事项清单太长了。他帮助我们维护网站。
CSS 版本更容易更改,但这并非相同效果。![]()
如果您对 CSS 版本感到满意,并希望减慢下落速度,请将此 CSS 添加到您的主题或新的主题组件中,并根据需要调整值。值越高,速度越慢。
#snow {
animation: snow 60s linear infinite;
}
非常感谢
感谢您的报告 @frold。我刚刚推送了一个修复,因此在您更新主题组件后应该已经修复了。
顺便说一下,在线用户(whos-online)错误也应该已经修复了。您是否正在运行该插件的最新版本?
我喜欢这个,但用户有投诉,如果用户自己可以选择禁用它就太棒了。