有没有晓得 hexo 生成博客后的 fancybox 效果是怎么实现的,如下网址,不如大神的效果

2016-01-20 22:05:15 +08:00
 chuhemiao

附上网址: http://ibruce.info/reading/
请问下这个是怎样搞成的,有没有类似的文章,网上看了好多,都是一个版本,没一个说到正点上!!!!

7233 次点击
所在节点    Node.js
35 条回复
agate
2016-01-21 20:27:09 +08:00
hey. 我刚才有空玩了一下那个模板. 发现是它好像没有用你的 config override 自己的 config 所以你只要在 theme 里头的 config 的 fancybox 设为 true. 就激活了...
https://github.com/A-limon/pacman/blob/master/_config.yml#L52
Outshine
2016-01-21 20:37:34 +08:00
卧槽,我说你纠结个蛋蛋啊,官方文档说得这儿清楚了自己不去看,跑来问这点时间早搞定了

官方文档原文如下:
Galleries are created from elements who have the same "data-fancybox-group" or "rel" attribute value.

就是说 data-fancybox-group 或者 rel 一样的几张图片可以组成画廊(就是你说的幻灯片咯)
Outshine
2016-01-21 20:44:06 +08:00
哎呀。。。不能编辑了
好吧,我开始以为是你自己用 fancybox 插件弄图片呢,原来是要用主题集成的。。。
楼主只有自己去看下源码咯~
agate
2016-01-21 20:45:08 +08:00
@Outshine 手太快了... 哈哈
Tiande
2016-01-22 06:12:25 +08:00
## if you want use fancybox in ANY post please copy the file `fancybox.js`.
## in theme folder `/pacman/scripts` to your hexo blog folder `../scritps`.

实在不行,可以考虑换个主题试试, https://github.com/wuchong/jacman
chuhemiao
2016-01-22 11:43:27 +08:00
@Tiande 主题的注释啊
chuhemiao
2016-01-22 11:45:53 +08:00
@agate 我贴出的主题配置里面已经是加了 true 的啊,但是也没出现轮播的情况啊
chuhemiao
2016-01-22 11:46:18 +08:00
@Outshine 请原谅我英语小白
Tiande
2016-01-22 16:35:16 +08:00
if you want use fancybox in ANY post please copy the file `fancybox.js` in theme folder `/pacman/scripts` to your hexo blog folder `../scritps`.

估计是 pacman 还需要在文章头添加相关配置,才能让某一文章实现 fancybox 。
你就按说明 use fancybox in ANY post 试试看。
chuhemiao
2016-01-23 10:23:49 +08:00
@Tiande use fancybox in ANY post?这要怎么声明?
Tiande
2016-01-23 11:43:38 +08:00
if you want use fancybox in ANY post please copy the file `fancybox.js` in theme folder `/pacman/scripts` to your hexo blog folder `../scritps`.

copy the file `fancybox.js` in theme folder `/pacman/scripts` to your hexo blog folder `../scritps`.
看不懂文档吗😓
chuhemiao
2016-01-23 13:50:58 +08:00
@Tiande 这个已经加了的,文档是这样写,加了没什么反应才问的
Tiande
2016-01-23 18:16:25 +08:00
爱莫能助了。
我用的 jacman , fancybox 可用,你可以考虑换过去试试,主题配置差的不多。
chuhemiao
2016-01-23 18:33:05 +08:00
@Tiande jacman 直接就能用?或许我可以试试那个好使不好,感谢
Tiande
2016-01-23 19:16:11 +08:00
Jacman is a fresh looking and responsive theme for Hexo with more features based on Pacman.

改改配置文件、图标就差不多了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/252222

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX