1.9 KiB
1.9 KiB
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
5895f70ef9fc0f352b528e6b | How to Put a Profile Together | 2 | 如何将配置文件放在一起 |
Description
h2.center#welcome Welcome, #{username}!
行h2.center#welcome Welcome, #{username}!
使用“center”类创建h2元素,并使用包含文本“Welcome”和用户名的id“welcome”创建!同样在配置文件中,添加指向/ logout的链接。该路由将托管用于取消身份验证用户的逻辑。 a(href='/logout') Logout
当您认为自己正确时,请提交您的页面。 Instructions
Tests
tests:
- text: 正确地将Pug渲染变量添加到/ profile
testString: 'getUserInput => $.get(getUserInput("url")+ "/_api/server.js") .then(data => { assert.match(data, /\/views\/pug\/profile[^]*username:( |)req.user.username/gi, "You should be passing the variable username with req.user.username into the render function of the profile page"); }, xhr => { throw new Error(xhr.statusText); })'
Challenge Seed
Solution
// solution required