From f78d24ad0794e026599b9d840b10515955b75129 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Tue, 24 Apr 2018 08:09:16 -0400 Subject: [PATCH] Add title to timeline; dividers for text/non-css browsers --- brutaldon/templates/main/timeline.html | 138 +++++++++++++------------ brutaldon/views.py | 3 +- 2 files changed, 75 insertions(+), 66 deletions(-) diff --git a/brutaldon/templates/main/timeline.html b/brutaldon/templates/main/timeline.html index 501050f..f1fc4f6 100644 --- a/brutaldon/templates/main/timeline.html +++ b/brutaldon/templates/main/timeline.html @@ -1,69 +1,77 @@ {% extends "base.html" %} {% load humanize %} -{% block content %} -{% for toot in toots %} -
-
-

- -

-
-
-
-

- {{ toot.account.display_name }} - @{{ toot.account.username }} - {{ toot.created_at |naturaltime }} -
- {{ toot.content | safe }} -

- {% if toot.media_attachments %} -
-
- {% for media in toot.media_attachments %} - - 
-                                      {% if media.text_url  %}
-                                      {{ media.text_url }}
-                                      {% else %}
-                                      {{ media.url  }}
-                                      {% endif %} - - {% endfor %} -
-
- {% endif %} -
- -
-
-
-
-{% endfor %} +{% block title %} + Brutaldon - {{ timeline }} timelime +{% endblock %} + +{% block content %} +

Your {{ timeline }} timeline

+ {% for toot in toots %} +
+ +
+ + {% endfor %} {% endblock %} diff --git a/brutaldon/views.py b/brutaldon/views.py index 0547bb3..b464d0e 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -20,7 +20,8 @@ def home(request): api_base_url = client.api_base_id, ratelimit_method="pace") data = mastodon.timeline() - return render(request, 'main/timeline.html', {'toots': data }) + return render(request, 'main/timeline.html', + {'toots': data, 'timeline': 'Home' }) def login(request):