Skip to content

Commit cf463b7

Browse files
freemarker template for posting etc are added.
1 parent e650094 commit cf463b7

File tree

5 files changed

+257
-40
lines changed

5 files changed

+257
-40
lines changed

.idea/workspace.xml

Lines changed: 115 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>My Blog</title>
5+
</head>
6+
<body>
7+
8+
<#if username??>
9+
Welcome ${username} <a href="/logout">Logout</a> | <a href="/newpost">New Post</a>
10+
11+
<p>
12+
</#if>
13+
14+
<h1>My Blog</h1>
15+
16+
<#if myposts?has_content>
17+
<#list myposts as post>
18+
<h2><a href="/post/${post["permalink"]}">${post["title"]}</a></h2>
19+
Posted ${post["date"]?datetime} <i>By ${post["author"]}</i><br>
20+
Comments:
21+
<#if post["comments"]??>
22+
<#assign numComments = post["comments"]?size>
23+
<#else>
24+
<#assign numComments = 0>
25+
</#if>
26+
27+
<a href="/post/${post["permalink"]}">${numComments}</a>
28+
<hr>
29+
${post["body"]!""}
30+
<p>
31+
32+
<p>
33+
<em>Filed Under</em>:
34+
<#if post["tags"]??>
35+
<#list post["tags"] as tag>
36+
<a href="/tag/${tag}">${tag}</a>
37+
</#list>
38+
</#if>
39+
40+
<p>
41+
</#list>
42+
<#else>
43+
<h2>There are no posts yet. Please add a post!</h2>
44+
</#if>
45+
</body>
46+
</html>
47+

0 commit comments

Comments
 (0)