我正在尝试使用Node.js向我的网站添加登录/注册功能,因此它将保存用户进度,因为他将继续使用网站。但是这个问题不是关于node.js的代码,而是关于.jade的更多信息。我对jade不太熟悉,我只是不明白为什么它不想加载我的CSS文件。快速问题:当你使用nodejs时是否有必要使用jade,或者有一种方法可以使用html代替节点?
layout.jade
doctype html
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1, shrink-
to-fit=no')
meta(name='description', content='')
meta(name='author', content='')
link(rel='icon', href='favicon.ico')
title Job Finder
// Bootstrap core CSS
link(href='public/stylesheets/bootstrap.min.css', rel='stylesheet')
// Custom styles for this template
link(href='public/stylesheets/album.css', rel='stylesheet')
link(href='public/stylesheets/cover.css', rel='stylesheet')
link(href='public/stylesheets/path.css', rel='stylesheet')
#navbarHeader.collapse.bg-dark
.container
.row
.col-sm-8.py-4
h4.text-white About Us
p.text-muted
text
.col-sm-4.py-4
h4.text-white Support Us
ul.list-unstyled
li
a.text-white(href='#') Patreon Page
li
a.text-white(href='contactus.html') Email Us
.container
block content
// Placed at the end of the document so the pages load faster
script(src='https://code.jquery.com/jquery-3.2.1.min.js', integrity='sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=', crossorigin='anonymous')
script(src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js')
script.
window.jQuery || document.write('<script src="js/vendor/jquery.min.js"><\\/script>')
script.
window.jQuery || document.write('<script src="js/button.js><\\/script>")
script(src='public/javascript/popper.min.js')
script(src='public/javascript/holder.min.js')
script(src='public/javascript/bootstrap.min.js')
script(src='public/javascript/button.js')
// IE10 viewport hack for Surface/desktop Windows 8 bug
script(src='public/javascript/ie10-viewport-bug-workaround.js')
index.jade
extends layout
block content
.navbar.navbar-dark.bg-dark
.container.d-flex.justify-content-between
a.navbar-brand(href='index.html') Job Finder
button.navbar-toggler(type='button', data-toggle='collapse', data-target='#navbarHeader', aria-controls='navbarHeader', aria-expanded='false', aria-label='Toggle navigation')
span.navbar-toggler-icon
section.jumbotron.text-center
.container
button#btnSlideUp.btn.btn-outline-success.btn-sm.title
h1#title.jumbotron-heading Find Job
p#p1.lead.text-muted
|text
p
a(href='contactus.html')
button.btn.btn-outline-primary.btn-lg(type='button') Contact Us
a(href='path.html')
button.btn.btn-outline-secondary.btn-lg(type='button') Start finding a job
.album.text-muted
.container
.row
.card
a(href='path.html')
img.card-img-top(src='pictures/photo-1494707924465-e1426acb48cb.jpg', alt='Card image cap')
.card-body
p.card-text How to start finding a job?
.card
a(href='path2.html')
img.card-img-top(src='pictures/photo-1500015139098-84b51c349a60.jpg', alt='Card image cap')
.card-body
p.card-text Continue finding job
.card
img.card-img-top(src='pictures/photo-1495681803763-410ec9ff583d.jpg', alt='Card image cap')
.card-body
p.card-text
.card
img.card-img-top(src='pictures/photo-1498622205843-3b0ac17f8ba4.jpg', alt='Card image cap')
.card-body
p.card-text
.card
img.card-img-top(src='pictures/photo-1461773518188-b3e86f98242f.jpg', alt='Card image cap')
.card-body
p.card-text
.card
img.card-img-top(src='pictures/type-away-numero-dos.jpg', alt='Card image cap')
.card-body
p.card-text
.card
img.card-img-top(src='pictures/photo-1479920252409-6e3d8e8d4866.jpg', alt='Card image cap')
.card-body
p.card-text
.card
img.card-img-top(src='pictures/photo-1454165804606-c3d57bc86b40.jpg', alt='Card image cap')
.card-body
p.card-text
.card
img.card-img-top(src='pictures/photo-1501504905252-473c47e087f8.jpg', alt='Card image cap')
.card-body
p.card-text
footer.text-muted
.container
p.float-right
a(href='#') Back to top
//
Bootstrap core JavaScript
==================================================
script(src='https://code.jquery.com/jquery-3.2.1.min.js', integrity='sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=', crossorigin='anonymous')
script(src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js')
script.
window.jQuery || document.write('<script src="js/vendor/jquery.min.js"><\\/script>')
script.
window.jQuery || document.write('<script src="js/button.js><\\/script>")
script(src='public/javascript/popper.min.js')
script(src='public/javascript/holder.min.js')
script(src='public/javascript/bootstrap.min.js')
script(src='public/javascript/button.js')
// IE10 viewport hack for Surface/desktop Windows 8 bug
script(src='public/javascript/ie10-viewport-bug-workaround.js')
link(href='public/stylesheets/album.css', rel='stylesheet')
link(href='public/stylesheets/cover.css', rel='stylesheet')
link(href='public/stylesheets/path.css', rel='stylesheet')