mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-23 07:13:52 -05:00
Add title to timeline; dividers for text/non-css browsers
This commit is contained in:
parent
2608b9ddea
commit
f78d24ad07
@ -1,69 +1,77 @@
|
||||
{% extends "base.html" %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block content %}
|
||||
{% for toot in toots %}
|
||||
<article class="media">
|
||||
<figure class="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img src="{{ toot.account.avatar }}"
|
||||
alt="">
|
||||
</p>
|
||||
</figure>
|
||||
<div class="media-content">
|
||||
<div class="content">
|
||||
<p>
|
||||
<strong>{{ toot.account.display_name }}</strong>
|
||||
<small>@{{ toot.account.username }}</small>
|
||||
<small>{{ toot.created_at |naturaltime }}</small>
|
||||
<br>
|
||||
{{ toot.content | safe }}
|
||||
</p>
|
||||
{% if toot.media_attachments %}
|
||||
<div class="level">
|
||||
<div class="level-left">
|
||||
{% for media in toot.media_attachments %}
|
||||
<a class="level-item" href="{{ media.url }}">
|
||||
<img src="{{ media.preview_url }}" alt="
|
||||
{% if media.text_url %}
|
||||
{{ media.text_url }}
|
||||
{% else %}
|
||||
{{ media.url }}
|
||||
{% endif %}"
|
||||
class="image is-128x128">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<nav class="level is-mobile">
|
||||
<div class="level-left">
|
||||
<a class="level-item">
|
||||
<span class="icon is-small"><i class="fa fa-reply">
|
||||
<span class="is-invisible">Reply</span>
|
||||
</i></span>
|
||||
</a>
|
||||
<a class="level-item">
|
||||
<span class="icon is-small"><i class="fa fa-retweet">
|
||||
<span class="is-invisible" >Boost</span>
|
||||
</i></span>
|
||||
</a>
|
||||
<a class="level-item">
|
||||
<span class="icon is-small"><i class="fa fa-heart">
|
||||
<span class="is-invisible" >Favorite</span>
|
||||
</i></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
<a class="level-item">
|
||||
{{ toot.visibility }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="media-right">
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% block title %}
|
||||
Brutaldon - {{ timeline }} timelime
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">Your {{ timeline }} timeline</h1>
|
||||
{% for toot in toots %}
|
||||
<div class="box">
|
||||
<article class="media">
|
||||
<figure class="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img src="{{ toot.account.avatar }}"
|
||||
alt="">
|
||||
</p>
|
||||
</figure>
|
||||
<div class="media-content">
|
||||
<div class="content">
|
||||
<p>
|
||||
<strong>{{ toot.account.display_name }}</strong>
|
||||
<small>@{{ toot.account.username }}</small>
|
||||
<small>{{ toot.created_at |naturaltime }}</small>
|
||||
<br>
|
||||
{{ toot.content | safe }}
|
||||
</p>
|
||||
{% if toot.media_attachments %}
|
||||
<div class="level">
|
||||
<div class="level-left">
|
||||
{% for media in toot.media_attachments %}
|
||||
<a class="level-item" href="{{ media.url }}">
|
||||
<img src="{{ media.preview_url }}" alt="
|
||||
{% if media.text_url %}
|
||||
{{ media.text_url }}
|
||||
{% else %}
|
||||
{{ media.url }}
|
||||
{% endif %}"
|
||||
class="image is-128x128">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<nav class="level is-mobile">
|
||||
<div class="level-left">
|
||||
<a class="level-item">
|
||||
<span class="icon is-small"><i class="fa fa-reply">
|
||||
<span class="is-invisible">Reply</span>
|
||||
</i></span>
|
||||
</a>
|
||||
<a class="level-item">
|
||||
<span class="icon is-small"><i class="fa fa-retweet">
|
||||
<span class="is-invisible" >Boost</span>
|
||||
</i></span>
|
||||
</a>
|
||||
<a class="level-item">
|
||||
<span class="icon is-small"><i class="fa fa-heart">
|
||||
<span class="is-invisible" >Favorite</span>
|
||||
</i></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
<a class="level-item">
|
||||
{{ toot.visibility }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="media-right">
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<hr class="is-hidden">
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user