From 565f4f23b373c05ac57cc7da54f86274dd2186af Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Sun, 20 Dec 2020 17:45:26 -0800 Subject: [PATCH] Multireddit Support & Referrer Policy --- src/subreddit.rs | 11 ++++++++++- static/style.css | 2 +- templates/base.html | 11 ++++++----- templates/popular.html | 1 - templates/subreddit.html | 8 +++++++- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/subreddit.rs b/src/subreddit.rs index dfe212b..201c3fe 100644 --- a/src/subreddit.rs +++ b/src/subreddit.rs @@ -33,7 +33,16 @@ pub async fn render(sub_name: String, sort: Option, ends: (Option {% block head %} - {% block title %}{% endblock %} - + {% block title %}Libreddit{% endblock %} + + @@ -19,11 +20,11 @@ {% endblock %} - {% block header %} -
+ {% block navbar %} +
+ {% endblock %} {% block body %} diff --git a/templates/popular.html b/templates/popular.html index d3f3c53..c8d4265 100644 --- a/templates/popular.html +++ b/templates/popular.html @@ -1,5 +1,4 @@ {% extends "base.html" %} -{% block title %}Libreddit{% endblock %} {% block content %}
diff --git a/templates/subreddit.html b/templates/subreddit.html index a18f86c..83a6a50 100644 --- a/templates/subreddit.html +++ b/templates/subreddit.html @@ -1,6 +1,11 @@ {% extends "base.html" %} + +{% if sub.name != "" %} {% block title %}r/{{ sub.name }}: {{ sub.description }}{% endblock %} +{% endif %} + {% block body %} + {% if sub.name != "" %}
@@ -13,6 +18,7 @@
+ {% endif %}
@@ -26,7 +32,7 @@

- r/{{ sub.name }} + r/{{ post.community }} {% if post.author_flair.0 != "" %} {{ post.author_flair.0 }}