diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2020-04-10 13:34:23 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2020-04-10 13:34:23 +0100 |
| commit | 78400d587ea5367d3424333913ff4f94ca3f1908 (patch) | |
| tree | 2cf5f5ff8069740b0b7dd00853a4ea8c13d6e05c /src/main/resources/templates/posts.ftlh | |
| parent | d5a608143ad2250d8b35b9e4a488d39faaf5a021 (diff) | |
| download | reddit-lite-78400d587ea5367d3424333913ff4f94ca3f1908.tar.xz reddit-lite-78400d587ea5367d3424333913ff4f94ca3f1908.zip | |
Reimplement in Kotlin
Diffstat (limited to 'src/main/resources/templates/posts.ftlh')
| -rw-r--r-- | src/main/resources/templates/posts.ftlh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/resources/templates/posts.ftlh b/src/main/resources/templates/posts.ftlh new file mode 100644 index 0000000..56dbd1b --- /dev/null +++ b/src/main/resources/templates/posts.ftlh @@ -0,0 +1,30 @@ +<#include 'lib.ftlh'> + +<@wrapper title="/r/${subreddit}"> + <#assign thumbnailUrlFragment>/r/${subreddit}?after=${postAfterId!}&showThumbs=</#assign> + <@header subreddit> + <#if showThumbs> + <a href='${thumbnailUrlFragment}false'>hide thumbnails</a> + <#else> + <a href='${thumbnailUrlFragment}true'>show thumbnails</a> + </#if> + </@header> + + <ol class="post-list no-list-style"> + <#list posts as post> + <li> + <div class="post"> + <#if showThumbs && !post.isSelfPost() && post.thumbnailUrl?has_content> + <a class="post-title" href="${post.primaryLink}"> + <img src="${post.thumbnailUrl}" class="post-thumbnail"> </img> + </a> + </#if> + <@postSummary post/> + </div> + </li> + </#list> + </ol> + + <a class="next-page-link" href="/r/${subreddit}?after=${nextPostId}&showThumbs=${showThumbs?c}">next page ></a> + +</@wrapper>
\ No newline at end of file |