kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
4e0fb6536c
commit
dbf4712af4
7
pages.py
7
pages.py
|
@ -130,13 +130,10 @@ def feed(domain):
|
||||||
'url': f'https://{domain}',
|
'url': f'https://{domain}',
|
||||||
}
|
}
|
||||||
title = f'Bridgy Fed feed for {domain}'
|
title = f'Bridgy Fed feed for {domain}'
|
||||||
extra = '<link rel="stylesheet" href="/static/feed.css" type="text/css" />'
|
|
||||||
if not as1_activities:
|
|
||||||
extra += '\n<p>Nothing yet. Follow more people, check back soon!</p>'
|
|
||||||
|
|
||||||
if format == 'html':
|
if format == 'html':
|
||||||
return microformats2.activities_to_html(as1_activities, extra=extra,
|
entries = [microformats2.object_to_html(a) for a in as1_activities]
|
||||||
body_class='h-feed')
|
return render_template('feed.html', **locals())
|
||||||
elif format == 'atom':
|
elif format == 'atom':
|
||||||
body = atom.activities_to_atom(as1_activities, actor=actor, title=title,
|
body = atom.activities_to_atom(as1_activities, actor=actor, title=title,
|
||||||
request_url=request.url)
|
request_url=request.url)
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}{{ domain }}'s feed - Bridgy Fed{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<h2 class="row">
|
||||||
|
<a href="/user/{{ domain }}">🌐 {{ domain }}</a>'s feed
|
||||||
|
</h2>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/static/feed.css" type="text/css" />
|
||||||
|
<div class="row h-feed">
|
||||||
|
{% for e in entries %}
|
||||||
|
{{ e|safe }}
|
||||||
|
{% else %}
|
||||||
|
Nothing yet. <a href="/#To+use+it">Follow more people</a>, check back soon!
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
Ładowanie…
Reference in New Issue