之前看张洪heo大佬的博客,在他的个人主页,爱好的游戏卡片上,发现了他将自己喜欢的英雄展示了出来。
因为我也喜欢玩联盟(尤其他喜欢玩的英雄恰巧我也喜欢玩),于是也想在自己的博客中添加类似的功能。花了一下午的时间,终于实现了这个功能。
效果:
教程打开文件:博客根目录/themes/anzhiyu/layout/includes/page/about.pug
在大约175行,找到如下代码段:
.author-content - let {game_tips, game_title, game_uid, game_bg} = item.game .author-content-item.game-yuanshen(style=`background: url(${game_bg}) top / cover no-repeat;`) .card-content .author-content-item-tips=game_tips span.author-content-item-title=game_title ...



