From 78400d587ea5367d3424333913ff4f94ca3f1908 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Fri, 10 Apr 2020 13:34:23 +0100 Subject: Reimplement in Kotlin --- src/main/resources/templates/lib.ftlh | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/main/resources/templates/lib.ftlh (limited to 'src/main/resources/templates/lib.ftlh') diff --git a/src/main/resources/templates/lib.ftlh b/src/main/resources/templates/lib.ftlh new file mode 100644 index 0000000..9b9e96b --- /dev/null +++ b/src/main/resources/templates/lib.ftlh @@ -0,0 +1,62 @@ +<#macro wrapper title> + + + ${title} + + + + + <#nested> + + + + +<#macro header subreddit> +
+ /r/${subreddit} + + <#nested> + +
+ + +<#macro postSummary post> +
+
+ ${post.title} + (${post.domain}) +
+ +
+ + +<#macro postComment comment> +
+ <#if comment.author?has_content> +
+ + ${comment.author} <#if comment.flairText?has_content>${comment.flairText} | ${comment.relativeCreatedDate} | <@pluralise comment.score "point"/> + +
${comment.bodyHtmlUnescaped?no_esc}
+ <#list comment.replies as childComment> + <@postComment childComment/> + +
+ <#else> + TODO Load more comments... + +
+ + +<#macro pluralise count word> + <#if count == 1> + ${count} ${word} + <#else> + ${count} ${word}s + + \ No newline at end of file -- cgit v1.2.3