netproxy / src / Netproxy.Web / wwwroot / template-test.html
Code · 44 lines · 759 bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>{{ title }}</title>
</head>
<body>
	<header>
		<h1><%= data.title %></h1>
	</header>

	<nav>
		<ul>
			<% data.menu.forEach(function(item) { %>
			<li><a href="<%= item.url %>"><%= item.name %></a></li>
			<% }); %>
		</ul>
	</nav>

	<main>
		<section>
			<h2><%= data.sectionTitle %></h2>
			<% if (data.articles.length) { %>
			<% data.articles.forEach(function(article) { %>
			<article>
				<h3><%= article.title %></h3>
				<p><%= article.content %></p>
			</article>
			<% }); %>
			<% } else { %>
			<p>No articles available.</p>
			<% } %>
		</section>

		<aside>
		</aside>
	</main>

	<footer>
		<p>&copy; <%= data.currentYear %> My Website</p>
	</footer>

	</body>
</html>