block main
h2.content-heading My profile
.block
.block-content.block-content-full
a.block.block-link-hover2(href="#" data-toggle="modal" data-target="#modal-fadein" type="button")
.block-header
//- h3.block-title.text-center Author of the Month
div(class="block-content block-content-full text-center bg-image" style=(account.backgroundImage))
div
img.img-avatar.img-avatar96.img-avatar-thumb(src=(account.avatar), alt='')
.h5.text-white.push-15-t.push-5 #{account.displayname}
.block-content
.row.items-push.text-center
.col-xs-6.col-xs-offset-3
.push-5
if account.premium
i.fa.fa-bolt.fa-2x(style="color: #FF9800;")
.h5.font-w300.text-muted Premium member
else
i.fa.fa-thumbs-up.fa-2x(style="color: #3c3c3c;")
.h5.font-w300.text-muted Free user错误:
Unexpected else without if我把account.premium作为假通过res.render传递。account对象下的其他所有东西都正常工作,除了这个if/else块。
发布于 2015-08-28 20:16:39
压痕很重要。
工作代码: if account.premium i.fa.fa-bolt.fa-2x(style="color: #FF9800;") .h5.font-w300.text-muted Premium member else i.fa.fa-thumbs-up.fa-2x(style="color: #3c3c3c;") .h5.font-w300.text-muted Free user
https://stackoverflow.com/questions/32278837
复制相似问题