JGa*_*rdo 4 node.js express pug
我想在我的Express应用程序的所有页面上使用的布局中添加页脚.我跟着这个相关的教程
http://www.devthought.com/code/use-jade-blocks-not-layouts/
但我似乎错过了一些东西.这是我的代码.
layout.jade
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
block footer
Run Code Online (Sandbox Code Playgroud)
footer.jade
extends layout
block footer
footer
ul
li
a(href="/team") Team
li
a(href="/privacy") Privacy
p
| company name <br>
| © 2014, All Rights Reserved
Run Code Online (Sandbox Code Playgroud)
显然它可以使用包含.我将它添加到我的布局中,因为它在所有页面上都是相同的.
layout.jade
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
include footer
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2531 次 |
| 最近记录: |