<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <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>
