File: HelloView.csp

package info (click to toggle)
drogon 1.9.11%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,820 kB
  • sloc: cpp: 57,270; sh: 297; xml: 20; makefile: 11
file content (24 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<%c++
    auto name=@@.get<std::string>("name");
	bool nameIsEmpty = name == "";
	if (nameIsEmpty)
		name = "anonymous";
	auto message = "Hello, " + name + " from a CSP template";
%>
<head>
    <meta charset="UTF-8">
    <title>[[ name ]]</title>
</head>
<body>
    <%c++ $$<<message; %>
	<%c++
	if (nameIsEmpty)
	{
		$$ << "<br>"
			<< "You can revisit the same page and append ?name=<i>your_name</i> to change the name";
	}
	%>
</body>
</html>