From 66e4782c5c422b4f99a4763212bdc974efffc65b Mon Sep 17 00:00:00 2001 From: James Barnett Date: Sun, 5 Jul 2020 19:29:49 +0100 Subject: Add dark theme. Improve display of multi-reddits. Add NetPositive inspired error pages --- src/main/resources/templates/error/404.ftlh | 12 ++++++++++++ src/main/resources/templates/error/500.ftlh | 12 ++++++++++++ src/main/resources/templates/lib.ftlh | 10 +++++++++- src/main/resources/templates/postDetail.ftlh | 4 +++- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/templates/error/404.ftlh create mode 100644 src/main/resources/templates/error/500.ftlh (limited to 'src/main/resources/templates') diff --git a/src/main/resources/templates/error/404.ftlh b/src/main/resources/templates/error/404.ftlh new file mode 100644 index 0000000..3237d4d --- /dev/null +++ b/src/main/resources/templates/error/404.ftlh @@ -0,0 +1,12 @@ + + + 404 + + + + + You step in the stream
+ But the water has moved on
+ This page was not found + + diff --git a/src/main/resources/templates/error/500.ftlh b/src/main/resources/templates/error/500.ftlh new file mode 100644 index 0000000..a8d7693 --- /dev/null +++ b/src/main/resources/templates/error/500.ftlh @@ -0,0 +1,12 @@ + + + 500 + + + + + To have no errors
+ Would be life without meaning
+ No struggle, no joy + + diff --git a/src/main/resources/templates/lib.ftlh b/src/main/resources/templates/lib.ftlh index 9b9e96b..ee013a4 100644 --- a/src/main/resources/templates/lib.ftlh +++ b/src/main/resources/templates/lib.ftlh @@ -13,7 +13,15 @@ <#macro header subreddit>
- /r/${subreddit} + + <#if subreddit?contains("+")> + <#list subreddit?split("+") as multiRedditName> + <#if multiRedditName?is_first>/r/<#else>+${multiRedditName} + + <#else> + /r/${subreddit} + + <#nested> diff --git a/src/main/resources/templates/postDetail.ftlh b/src/main/resources/templates/postDetail.ftlh index 576e6e1..13d2ee5 100644 --- a/src/main/resources/templates/postDetail.ftlh +++ b/src/main/resources/templates/postDetail.ftlh @@ -7,7 +7,9 @@ <@postSummary postDetail.post/>
- ${(postDetail.selftextHtmlUnescaped?no_esc)!""} +
+ ${(postDetail.selftextHtmlUnescaped?no_esc)!""} +
<@pluralise postDetail.commentCount, "comment"/>
-- cgit v1.2.3