-
-
Notifications
You must be signed in to change notification settings - Fork 16.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples: replace jade with hbs in mvc example
- Loading branch information
1 parent
8acaa9a
commit 3763d73
Showing
13 changed files
with
100 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="/style.css"> | ||
<title>Edit {{user.name}}</title> | ||
</head> | ||
<body> | ||
<h1>{{user.name}}</h1> | ||
<form action="/user/{{user.id}}?_method=put" method="post"> | ||
<label for="user[name]">Name: | ||
<input type="text" name="user[name]" value="{{user.name}}"> | ||
</label> | ||
|
||
<input type="submit" name="submit" value="Update"> | ||
</form> | ||
|
||
<form action="/user/{{user.id}}/pet" method="post"> | ||
<label for="pet[name]">Pet: | ||
<input type="text" name="pet[name]" placeholder="Pet Name"> | ||
</label> | ||
|
||
<input type="submit" name="submit" value="Add"> | ||
</form> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="/style.css"> | ||
<title>Users</title> | ||
</head> | ||
<body> | ||
<h1>Users</h1> | ||
<p>Click a user below to view their pets.</p> | ||
<ul> | ||
{{#each users}} | ||
<li><a href="/user/{{id}}">{{name}}</a></li> | ||
{{/each}} | ||
</ul> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="/style.css"> | ||
<title>{{user.name}}</title> | ||
</head> | ||
<body> | ||
<h1>{{user.name}} <a href="/user/{{user.id}}/edit">edit</a></h1> | ||
|
||
{{#if hasMessages}} | ||
<ul> | ||
{{#each messages}} | ||
<li>{{this}}</li> | ||
{{/each}} | ||
</ul> | ||
{{/if}} | ||
|
||
{{#if user.pets.length}} | ||
<p>View {{user.name}}'s pets:</p> | ||
<ul> | ||
{{#each user.pets}} | ||
<li><a href="/pet/{{id}}">{{name}}</a></li> | ||
{{/each}} | ||
</ul> | ||
{{else}} | ||
<p>No pets!</p> | ||
{{/if}} | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Not Found</title> | ||
<link rel="stylesheet" href="/style.css"> | ||
</head> | ||
<body> | ||
<h1>404: Not Found</h1> | ||
<p>Sorry we can't find <%= url %></p> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Internal Server Error</title> | ||
<link rel="stylesheet" href="/style.css"> | ||
</head> | ||
<body> | ||
<h1>500: Internal Server Error</h1> | ||
<p>Looks like something blew up!</p> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters