首页没有样式,其他页面都有
index.jade如下:
extends ../layout
block content
.container
.row
each item in movies
.col-md-2
.thumbnail
a(href="/movie/#{item._id}")
img(src="#{item.poster}",alt="#{item.title}")
.caption
h3 #{title}
p: a.btn.btn-primary(href="/movie/#{item._id}",role="button")
观看预告片app.js中相关的:
//index page
app.get('/', function (req, res) {
res.render('index', {
title: 'movieWeb 首页',
movies: [{
title: '悟空传',
_id: 1,
poster: 'https://movie.douban.com/photos/photo/2475055266/#title-anchor'
},
{
title: '悟空传',
_id: 2,
poster: 'https://movie.douban.com/photos/photo/2475055266/#title-anchor'
}]
})
})首页只能显示一个title,哪里出错了啊??