mirror of
https://github.com/sstent/expressmongotest.git
synced 2026-01-26 09:02:33 +00:00
upgraded to express 3.x, converted jade templates, and worked out array notation for articles/exercises
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
h1 Log in
|
||||
extends ../layout
|
||||
|
||||
form(method="POST", action="/session")
|
||||
p
|
||||
label(for="username") User name:<br />
|
||||
input#username(name="username")
|
||||
p
|
||||
label(for="password") Password:<br />
|
||||
input#password(type="password", name="password")
|
||||
p
|
||||
input(type="submit", value="Log in");
|
||||
block content
|
||||
h1 Log in
|
||||
|
||||
form(method="POST", action="/session")
|
||||
p
|
||||
label(for="username") User name:<br />
|
||||
input#username(name="username")
|
||||
p
|
||||
label(for="password") Password:<br />
|
||||
input#password(type="password", name="password")
|
||||
p
|
||||
input(type="submit", value="Log in");
|
||||
@@ -1,5 +1,4 @@
|
||||
- if (session.user) {
|
||||
|
||||
- if (session.user)
|
||||
p
|
||||
span Hello
|
||||
span= session.user.name
|
||||
@@ -8,12 +7,8 @@
|
||||
form(method="POST", action="/session")
|
||||
input(type="hidden", name="_method", value="DELETE")
|
||||
input(type="submit", value="Log out")
|
||||
|
||||
- } else {
|
||||
|
||||
- else
|
||||
p
|
||||
a(href="/session/new") Login
|
||||
span or
|
||||
a(href="/users/new") Register
|
||||
|
||||
- }
|
||||
a(href="/users/new") Register
|
||||
Reference in New Issue
Block a user