教程

  1. theme主题/layout/includes/widget添加card_yq.pug,代码如下:
1
2
3
4
5
6
.card-widget.card-yq
.card-content
.item_headline
i.fa.fa-location-arrow.card-yq-animation(aria-hidden="true")
span= _p('aside.card_yq')
iframe(src='https://www.lovestu.com/api/project/cnmapyinqing/obj.php', height='500', frameborder='no', border='0', width='100%')
  1. theme主题/layout/includes/widget下修改index.pug,代码如下:
1
2
3
+      if theme.aside.card_yq
+ !=partial('includes/widget/card_yq', {}, {cache:theme.fragment_cache})
if theme.aside.card_recent_post.enable
  1. theme主题/languages/下修改zh-CN.yml,代码如下:
1
2
aside:
+ card_yq: 新型肺炎疫情数据
  1. 修改主题的配置文件butterfly.yml
1
2
aside:
+ card_yq: true

成果图