deno.land / x / opine@2.3.4 / examples / mvc / controllers / user / views / show.ejs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!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 (user.pets.length) { %> <p>View <%= user.name %>'s pets:</p> <ul> <% user.pets.forEach(function(pet) { %> <li> <a href="/pet/<%= pet.id %>"><%= pet.name %></a> </li> <% }); %> </ul> <% } else { %> <p>No pets!</p> <% } %> </body></html>
opine

Version Info

Tagged at
2 years ago