//新建TP.jade模板文件
mixin tpee_html(data)
-var data = data || {};
doctype html
html
meta(charset="utf-8")
title #{data.title || "jade模板"}
block link
each val,i in data.link || []
link(href="#{val}",rel="styleSheet",type="text/css")
block script
each val,i in data.scipt || []
script(src="#{val}")
head
body
block body
block tpee
//调用方法
extends TP
block tpee
+tpee_html()
//+tpee_html(data)
参数data可选填,data{
title:""//这是文档标题
link:["样式路径".....]//这是样式表
script:["脚本路径".....]//这是脚本
}
block body
///这里调用内容模板,例如:以下案例
include content_left
div 内容
include content_right
include foot