learning_go/book_with_bridge/http/template.html
2025-12-30 21:55:12 +03:00

34 lines
992 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>TABLE</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
.header { background: #3498db; color: white; padding: 20px; border-radius: 8px; }
.content { margin: 20px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border: 1px solid #ddd; text-align: left; }
th { background: #f4f4f4; }
.price { text-align: right; font-weight: bold; color: #27ae60; }
.total { background: #ecf0f1; font-weight: bold; }
</style>
</head>
<body>
<div class="content">
<h2>Items</h2>
<table>
<tr>
<th>Item Name</th>
<th>Price</th>
</tr>
{{range $key, $value := .Items}}
<tr>
<td>{{$key}}</td>
<td class="price">{{$value.String}}</td>
</tr>
{{end}}
</table>
</div>
</body>
</html>