show date in recent posts

This commit is contained in:
Your Name 2024-06-03 17:33:39 -04:00 committed by Henri Dickson
parent ba479c98b5
commit 42ab248de3
14 changed files with 104 additions and 103 deletions

View file

@ -1,7 +1,10 @@
from datetime import date, datetime, timedelta, timezone
from django import template from django import template
from django.conf import settings from django.conf import settings
from django.template.defaultfilters import stringfilter from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from catalog.common.models import item_categories from catalog.common.models import item_categories
from catalog.search.views import visible_categories as _visible_categories from catalog.search.views import visible_categories as _visible_categories
@ -37,6 +40,26 @@ def duration_format(value, unit):
return f"{value} (format error)" return f"{value} (format error)"
@register.filter(is_safe=True)
def naturaldelta(v: datetime | None):
if not v:
return ""
d = int(datetime.timestamp(datetime.now()) - datetime.timestamp(v))
if d < 60:
return _("just now")
if d < 3600:
return f"{d//60}m"
if d < 38400:
return f"{d//3600}h"
if d < 38400 * 14:
return f"{d//38400}d"
if d < 38400 * 56:
return f"{d//38400//7}w"
if d < 38400 * 30 * 18:
return f"{d//38400//30}mo"
return f"{d//38400//365}yr"
@register.filter(is_safe=True) @register.filter(is_safe=True)
@stringfilter @stringfilter
def rating_star(value): def rating_star(value):

View file

@ -1,22 +0,0 @@
from django import template
from django.utils import timezone
from django.utils.translation import gettext as _
register = template.Library()
@register.filter
def prettydate(d):
# TODO use date and naturaltime instead https://docs.djangoproject.com/en/3.2/ref/contrib/humanize/
diff = timezone.now() - d
s = diff.seconds
if diff.days > 14 or diff.days < 0:
return d.strftime("%Y-%m-%d")
elif diff.days >= 1:
return "{}d".format(diff.days)
elif s < 120:
return _("just now")
elif s < 3600:
return "{}m".format(s // 60)
else:
return "{}h".format(s // 3600)

View file

@ -1,19 +1,18 @@
{% load bleach_tags %} {% load bleach_tags %}
{% load duration %}
{% load humanize %} {% load humanize %}
{% load i18n %} {% load i18n %}
{% for post in posts %} {% for post in posts %}
<section class="activity"> <section class="activity">
<div> <div>
<span class="action"> <span class="action">
{# <span class="timestamp">{{ post.created|date }}</span> #} <span class="timestamp">{{ post.created|naturaldelta }}</span>
{% include "action_reply_post.html" %} {% include "action_reply_post.html" %}
{% include "action_like_post.html" %} {% include "action_like_post.html" %}
{% include "action_boost_post.html" %} {% include "action_boost_post.html" %}
{% include "action_open_post.html" %} {% include "action_open_post.html" %}
</span> </span>
<!--span class="avatar" style="margin:0.5em;"> <!--span class="avatar" style="margin:0.5em;"> <img src="{{ post.author.icon_uri }}" alt="cover" /> </span -->
<img src="{{ post.author.icon_uri }}" alt="cover" />
</span -->
<span style=""> <span style="">
<a href="{{ post.author.url }}" <a href="{{ post.author.url }}"
class="nickname" class="nickname"

View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-03 09:12-0400\n" "POT-Creation-Date: 2024-06-03 17:32-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -667,7 +667,7 @@ msgstr "不再提示"
#: catalog/templates/_item_comments_by_episode.html:78 #: catalog/templates/_item_comments_by_episode.html:78
#: catalog/templates/_item_reviews.html:43 #: catalog/templates/_item_reviews.html:43
#: catalog/templates/podcast_episode_data.html:41 #: catalog/templates/podcast_episode_data.html:41
#: common/templates/_sidebar.html:270 #: common/templates/_sidebar.html:231
msgid "show more" msgid "show more"
msgstr "显示更多" msgstr "显示更多"
@ -675,7 +675,7 @@ msgstr "显示更多"
#: catalog/templates/_item_comments_by_episode.html:82 #: catalog/templates/_item_comments_by_episode.html:82
#: catalog/templates/_item_reviews.html:47 #: catalog/templates/_item_reviews.html:47
#: catalog/templates/podcast_episode_data.html:44 #: catalog/templates/podcast_episode_data.html:44
#: social/templates/events.html:44 social/templates/feed_data.html:45 #: social/templates/events.html:43 social/templates/feed_data.html:44
msgid "nothing more." msgid "nothing more."
msgstr "没有更多内容了。" msgstr "没有更多内容了。"
@ -1166,16 +1166,16 @@ msgstr "简介"
#: catalog/templates/item_base.html:236 #: catalog/templates/item_base.html:236
#: catalog/templates/item_mark_list.html:54 #: catalog/templates/item_mark_list.html:54
#: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:37 #: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:37
#: common/templates/_sidebar.html:86 common/templates/_sidebar.html:165 #: common/templates/_sidebar.html:126 common/templates/_sidebar.html:226
#: common/templates/_sidebar.html:265
#: common/templates/_sidebar_anonymous.html:43 #: common/templates/_sidebar_anonymous.html:43
#: common/templates/_sidebar_anonymous.html:58 #: common/templates/_sidebar_anonymous.html:58
#: journal/templates/collection_items.html:8 journal/templates/profile.html:109 #: journal/templates/collection_items.html:8 journal/templates/posts.html:39
#: journal/templates/profile.html:151 journal/templates/profile.html:187 #: journal/templates/profile.html:109 journal/templates/profile.html:151
#: journal/templates/profile.html:187
#: journal/templates/user_collection_list.html:51 #: journal/templates/user_collection_list.html:51
#: journal/templates/user_item_list_base.html:25 #: journal/templates/user_item_list_base.html:25
#: journal/templates/user_tag_list.html:29 social/templates/events.html:46 #: journal/templates/user_tag_list.html:29 social/templates/events.html:45
#: users/templates/users/announcements.html:53 #: users/templates/users/announcements.html:54
#: users/templates/users/relationship_list.html:11 #: users/templates/users/relationship_list.html:11
msgid "nothing so far." msgid "nothing so far."
msgstr "暂无内容。" msgstr "暂无内容。"
@ -1442,8 +1442,8 @@ msgid "Terms"
msgstr "服务协议" msgstr "服务协议"
#: common/templates/_footer.html:8 common/templates/_sidebar_anonymous.html:40 #: common/templates/_footer.html:8 common/templates/_sidebar_anonymous.html:40
#: users/templates/users/announcements.html:10 #: users/templates/users/announcements.html:11
#: users/templates/users/announcements.html:40 #: users/templates/users/announcements.html:41
msgid "Announcements" msgid "Announcements"
msgstr "公告栏" msgstr "公告栏"
@ -1540,34 +1540,38 @@ msgstr "热门标签"
msgid "Popular Posts" msgid "Popular Posts"
msgstr "热门帖文" msgstr "热门帖文"
#: common/templates/_sidebar.html:120 #: common/templates/_sidebar.html:81
msgid "approving followers manually" msgid "approving followers manually"
msgstr "已开启关注审核" msgstr "已开启关注审核"
#: common/templates/_sidebar.html:150 #: common/templates/_sidebar.html:111
msgid "Current Targets" msgid "Current Targets"
msgstr "当前目标" msgstr "当前目标"
#: common/templates/_sidebar.html:163 #: common/templates/_sidebar.html:124
msgid "Set a collection as target, its progress will show up here." msgid "Set a collection as target, its progress will show up here."
msgstr "将自己或他人的收藏单设为目标,这里就会显示进度" msgstr "将自己或他人的收藏单设为目标,这里就会显示进度"
#: common/templates/_sidebar.html:176 #: common/templates/_sidebar.html:137
msgid "Recent podcast episodes" msgid "Recent podcast episodes"
msgstr "近期播客节目" msgstr "近期播客节目"
#: common/templates/_sidebar.html:211 #: common/templates/_sidebar.html:172
msgid "Currently reading" msgid "Currently reading"
msgstr "正在阅读" msgstr "正在阅读"
#: common/templates/_sidebar.html:234 #: common/templates/_sidebar.html:195
msgid "Currently watching" msgid "Currently watching"
msgstr "正在追看" msgstr "正在追看"
#: common/templates/_sidebar.html:257 #: common/templates/_sidebar.html:218
msgid "Common Tags" msgid "Common Tags"
msgstr "常用标签" msgstr "常用标签"
#: common/templates/_sidebar.html:242
msgid "Recent Posts"
msgstr "近期帖文"
#: common/templates/_sidebar_anonymous.html:16 #: common/templates/_sidebar_anonymous.html:16
#, python-format #, python-format
msgid "" msgid ""
@ -1622,6 +1626,10 @@ msgstr "验证邮件已发送,请查阅收件箱。"
msgid "Please click the login link in the email, or enter the verification code you received." msgid "Please click the login link in the email, or enter the verification code you received."
msgstr "请点击邮件中的登录链接,或输入收到的验证码。" msgstr "请点击邮件中的登录链接,或输入收到的验证码。"
#: common/templatetags/duration.py:49
msgid "just now"
msgstr "刚刚"
#: common/templatetags/mastodon.py:42 #: common/templatetags/mastodon.py:42
msgid "mutual followed" msgid "mutual followed"
msgstr "互相关注" msgstr "互相关注"
@ -1634,10 +1642,6 @@ msgstr "已关注"
msgid "following you" msgid "following you"
msgstr "关注了你" msgstr "关注了你"
#: common/templatetags/prettydate.py:18
msgid "just now"
msgstr "刚刚"
#: common/utils.py:61 common/utils.py:91 users/views.py:35 users/views.py:121 #: common/utils.py:61 common/utils.py:91 users/views.py:35 users/views.py:121
msgid "User not found" msgid "User not found"
msgstr "用户不存在" msgstr "用户不存在"
@ -2755,35 +2759,35 @@ msgstr "本地标识"
msgid "target site domain name" msgid "target site domain name"
msgstr "目标实例域名" msgstr "目标实例域名"
#: social/templates/activity/comment_child_item.html:13 #: social/templates/activity/comment_child_item.html:12
msgid "play" msgid "play"
msgstr "播放" msgstr "播放"
#: social/templates/activity/comment_child_item.html:26 #: social/templates/activity/comment_child_item.html:25
msgid "comment" msgid "comment"
msgstr "写短评" msgstr "写短评"
#: social/templates/activity/create_collection.html:17 takahe/utils.py:561 #: social/templates/activity/create_collection.html:16 takahe/utils.py:561
msgid "created collection" msgid "created collection"
msgstr "创建了收藏单" msgstr "创建了收藏单"
#: social/templates/activity/feature_collection.html:18 #: social/templates/activity/feature_collection.html:17
msgid "set a target" msgid "set a target"
msgstr "设置了目标" msgstr "设置了目标"
#: social/templates/activity/like_collection.html:18 #: social/templates/activity/like_collection.html:17
#, python-format #, python-format
msgid "liked <a href=\"%(owner_url)s\">%(owner_name)s</a>'s collection" msgid "liked <a href=\"%(owner_url)s\">%(owner_name)s</a>'s collection"
msgstr "赞了 <a href=\"%(owner_url)s\">%(owner_name)s</a> 的收藏单" msgstr "赞了 <a href=\"%(owner_url)s\">%(owner_name)s</a> 的收藏单"
#: social/templates/activity/mark_item.html:13 #: social/templates/activity/mark_item.html:12
#: social/templates/activity/mark_item.html:20 #: social/templates/activity/mark_item.html:19
#: social/templates/activity/review_item.html:13 #: social/templates/activity/review_item.html:12
#: social/templates/activity/review_item.html:20 #: social/templates/activity/review_item.html:19
msgid "mark" msgid "mark"
msgstr "标记" msgstr "标记"
#: social/templates/activity/review_item.html:36 #: social/templates/activity/review_item.html:35
#, python-format #, python-format
msgid "wrote a review of %(item)s" msgid "wrote a review of %(item)s"
msgstr "评论了 %(item)s" msgstr "评论了 %(item)s"
@ -2947,7 +2951,7 @@ msgstr ""
msgid "Activities from those you follow" msgid "Activities from those you follow"
msgstr "好友动态" msgstr "好友动态"
#: social/templates/feed_data.html:49 #: social/templates/feed_data.html:48
#, python-format #, python-format
msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here." msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here."
msgstr "搜索并标记一些书影音/播客/游戏,<a href=\"%(import_url)s\">导入你的豆瓣、Letterboxd或Goodreads记录</a>,去联邦宇宙(长毛象)关注一些正在使用%(site_name)s的用户这里就会显示你和她们的近期动态。" msgstr "搜索并标记一些书影音/播客/游戏,<a href=\"%(import_url)s\">导入你的豆瓣、Letterboxd或Goodreads记录</a>,去联邦宇宙(长毛象)关注一些正在使用%(site_name)s的用户这里就会显示你和她们的近期动态。"

View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-03 09:12-0400\n" "POT-Creation-Date: 2024-06-03 17:32-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -667,7 +667,7 @@ msgstr "不再提示"
#: catalog/templates/_item_comments_by_episode.html:78 #: catalog/templates/_item_comments_by_episode.html:78
#: catalog/templates/_item_reviews.html:43 #: catalog/templates/_item_reviews.html:43
#: catalog/templates/podcast_episode_data.html:41 #: catalog/templates/podcast_episode_data.html:41
#: common/templates/_sidebar.html:270 #: common/templates/_sidebar.html:231
msgid "show more" msgid "show more"
msgstr "顯示更多" msgstr "顯示更多"
@ -675,7 +675,7 @@ msgstr "顯示更多"
#: catalog/templates/_item_comments_by_episode.html:82 #: catalog/templates/_item_comments_by_episode.html:82
#: catalog/templates/_item_reviews.html:47 #: catalog/templates/_item_reviews.html:47
#: catalog/templates/podcast_episode_data.html:44 #: catalog/templates/podcast_episode_data.html:44
#: social/templates/events.html:44 social/templates/feed_data.html:45 #: social/templates/events.html:43 social/templates/feed_data.html:44
msgid "nothing more." msgid "nothing more."
msgstr "沒有更多內容了。" msgstr "沒有更多內容了。"
@ -1166,16 +1166,16 @@ msgstr "簡介"
#: catalog/templates/item_base.html:236 #: catalog/templates/item_base.html:236
#: catalog/templates/item_mark_list.html:54 #: catalog/templates/item_mark_list.html:54
#: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:37 #: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:37
#: common/templates/_sidebar.html:86 common/templates/_sidebar.html:165 #: common/templates/_sidebar.html:126 common/templates/_sidebar.html:226
#: common/templates/_sidebar.html:265
#: common/templates/_sidebar_anonymous.html:43 #: common/templates/_sidebar_anonymous.html:43
#: common/templates/_sidebar_anonymous.html:58 #: common/templates/_sidebar_anonymous.html:58
#: journal/templates/collection_items.html:8 journal/templates/profile.html:109 #: journal/templates/collection_items.html:8 journal/templates/posts.html:39
#: journal/templates/profile.html:151 journal/templates/profile.html:187 #: journal/templates/profile.html:109 journal/templates/profile.html:151
#: journal/templates/profile.html:187
#: journal/templates/user_collection_list.html:51 #: journal/templates/user_collection_list.html:51
#: journal/templates/user_item_list_base.html:25 #: journal/templates/user_item_list_base.html:25
#: journal/templates/user_tag_list.html:29 social/templates/events.html:46 #: journal/templates/user_tag_list.html:29 social/templates/events.html:45
#: users/templates/users/announcements.html:53 #: users/templates/users/announcements.html:54
#: users/templates/users/relationship_list.html:11 #: users/templates/users/relationship_list.html:11
msgid "nothing so far." msgid "nothing so far."
msgstr "暫無內容。" msgstr "暫無內容。"
@ -1442,8 +1442,8 @@ msgid "Terms"
msgstr "服務協議" msgstr "服務協議"
#: common/templates/_footer.html:8 common/templates/_sidebar_anonymous.html:40 #: common/templates/_footer.html:8 common/templates/_sidebar_anonymous.html:40
#: users/templates/users/announcements.html:10 #: users/templates/users/announcements.html:11
#: users/templates/users/announcements.html:40 #: users/templates/users/announcements.html:41
msgid "Announcements" msgid "Announcements"
msgstr "公告欄" msgstr "公告欄"
@ -1540,34 +1540,38 @@ msgstr "熱門標籤"
msgid "Popular Posts" msgid "Popular Posts"
msgstr "熱門帖文" msgstr "熱門帖文"
#: common/templates/_sidebar.html:120 #: common/templates/_sidebar.html:81
msgid "approving followers manually" msgid "approving followers manually"
msgstr "已開啓關注審覈" msgstr "已開啓關注審覈"
#: common/templates/_sidebar.html:150 #: common/templates/_sidebar.html:111
msgid "Current Targets" msgid "Current Targets"
msgstr "當前目標" msgstr "當前目標"
#: common/templates/_sidebar.html:163 #: common/templates/_sidebar.html:124
msgid "Set a collection as target, its progress will show up here." msgid "Set a collection as target, its progress will show up here."
msgstr "將自己或他人的收藏單設爲目標,這裏就會顯示進度" msgstr "將自己或他人的收藏單設爲目標,這裏就會顯示進度"
#: common/templates/_sidebar.html:176 #: common/templates/_sidebar.html:137
msgid "Recent podcast episodes" msgid "Recent podcast episodes"
msgstr "近期播客節目" msgstr "近期播客節目"
#: common/templates/_sidebar.html:211 #: common/templates/_sidebar.html:172
msgid "Currently reading" msgid "Currently reading"
msgstr "正在閱讀" msgstr "正在閱讀"
#: common/templates/_sidebar.html:234 #: common/templates/_sidebar.html:195
msgid "Currently watching" msgid "Currently watching"
msgstr "正在追看" msgstr "正在追看"
#: common/templates/_sidebar.html:257 #: common/templates/_sidebar.html:218
msgid "Common Tags" msgid "Common Tags"
msgstr "常用標籤" msgstr "常用標籤"
#: common/templates/_sidebar.html:242
msgid "Recent Posts"
msgstr "近期帖文"
#: common/templates/_sidebar_anonymous.html:16 #: common/templates/_sidebar_anonymous.html:16
#, python-format #, python-format
msgid "" msgid ""
@ -1622,6 +1626,10 @@ msgstr "驗證郵件已發送,請查閱收件箱。"
msgid "Please click the login link in the email, or enter the verification code you received." msgid "Please click the login link in the email, or enter the verification code you received."
msgstr "請點擊郵件中的登錄鏈接,或輸入收到的驗證碼。" msgstr "請點擊郵件中的登錄鏈接,或輸入收到的驗證碼。"
#: common/templatetags/duration.py:49
msgid "just now"
msgstr "剛剛"
#: common/templatetags/mastodon.py:42 #: common/templatetags/mastodon.py:42
msgid "mutual followed" msgid "mutual followed"
msgstr "互相關注" msgstr "互相關注"
@ -1634,10 +1642,6 @@ msgstr "已關注"
msgid "following you" msgid "following you"
msgstr "關注了你" msgstr "關注了你"
#: common/templatetags/prettydate.py:18
msgid "just now"
msgstr "剛剛"
#: common/utils.py:61 common/utils.py:91 users/views.py:35 users/views.py:121 #: common/utils.py:61 common/utils.py:91 users/views.py:35 users/views.py:121
msgid "User not found" msgid "User not found"
msgstr "用戶不存在" msgstr "用戶不存在"
@ -2757,35 +2761,35 @@ msgstr "本地標識"
msgid "target site domain name" msgid "target site domain name"
msgstr "目標實例域名" msgstr "目標實例域名"
#: social/templates/activity/comment_child_item.html:13 #: social/templates/activity/comment_child_item.html:12
msgid "play" msgid "play"
msgstr "播放" msgstr "播放"
#: social/templates/activity/comment_child_item.html:26 #: social/templates/activity/comment_child_item.html:25
msgid "comment" msgid "comment"
msgstr "寫短評" msgstr "寫短評"
#: social/templates/activity/create_collection.html:17 takahe/utils.py:561 #: social/templates/activity/create_collection.html:16 takahe/utils.py:561
msgid "created collection" msgid "created collection"
msgstr "創建了收藏單" msgstr "創建了收藏單"
#: social/templates/activity/feature_collection.html:18 #: social/templates/activity/feature_collection.html:17
msgid "set a target" msgid "set a target"
msgstr "設置了目標" msgstr "設置了目標"
#: social/templates/activity/like_collection.html:18 #: social/templates/activity/like_collection.html:17
#, python-format #, python-format
msgid "liked <a href=\"%(owner_url)s\">%(owner_name)s</a>'s collection" msgid "liked <a href=\"%(owner_url)s\">%(owner_name)s</a>'s collection"
msgstr "讚了 <a href=\"%(owner_url)s\">%(owner_name)s</a> 的收藏單" msgstr "讚了 <a href=\"%(owner_url)s\">%(owner_name)s</a> 的收藏單"
#: social/templates/activity/mark_item.html:13 #: social/templates/activity/mark_item.html:12
#: social/templates/activity/mark_item.html:20 #: social/templates/activity/mark_item.html:19
#: social/templates/activity/review_item.html:13 #: social/templates/activity/review_item.html:12
#: social/templates/activity/review_item.html:20 #: social/templates/activity/review_item.html:19
msgid "mark" msgid "mark"
msgstr "標記" msgstr "標記"
#: social/templates/activity/review_item.html:36 #: social/templates/activity/review_item.html:35
#, python-format #, python-format
msgid "wrote a review of %(item)s" msgid "wrote a review of %(item)s"
msgstr "評論了 %(item)s" msgstr "評論了 %(item)s"
@ -2949,7 +2953,7 @@ msgstr ""
msgid "Activities from those you follow" msgid "Activities from those you follow"
msgstr "好友動態" msgstr "好友動態"
#: social/templates/feed_data.html:49 #: social/templates/feed_data.html:48
#, python-format #, python-format
msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here." msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here."
msgstr "搜索並標記一些書影音/播客/遊戲,<a href=\"%(import_url)s\">導入你的豆瓣、Letterboxd或Goodreads記錄</a>,去聯邦宇宙(長毛象)關注一些正在使用%(site_name)s的用戶這裏就會顯示你和她們的近期動態。" msgstr "搜索並標記一些書影音/播客/遊戲,<a href=\"%(import_url)s\">導入你的豆瓣、Letterboxd或Goodreads記錄</a>,去聯邦宇宙(長毛象)關注一些正在使用%(site_name)s的用戶這裏就會顯示你和她們的近期動態。"

View file

@ -3,7 +3,6 @@
{% load l10n %} {% load l10n %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
{% load duration %} {% load duration %}
{% wish_item_action activity.action_object.item.parent_item as action %} {% wish_item_action activity.action_object.item.parent_item as action %}

View file

@ -3,7 +3,6 @@
{% load l10n %} {% load l10n %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
<span class="action"> <span class="action">
{% if activity.action_object.latest_post %} {% if activity.action_object.latest_post %}

View file

@ -3,7 +3,6 @@
{% load l10n %} {% load l10n %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
{% with activity.action_object.target as collection %} {% with activity.action_object.target as collection %}
<span class="action"> <span class="action">

View file

@ -3,7 +3,6 @@
{% load l10n %} {% load l10n %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
{% with activity.action_object.target as collection %} {% with activity.action_object.target as collection %}
<span class="action"> <span class="action">

View file

@ -3,7 +3,6 @@
{% load l10n %} {% load l10n %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
{% load duration %} {% load duration %}
{% wish_item_action activity.action_object.item as action %} {% wish_item_action activity.action_object.item as action %}

View file

@ -3,7 +3,6 @@
{% load l10n %} {% load l10n %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
{% load duration %} {% load duration %}
{% wish_item_action activity.action_object.item as action %} {% wish_item_action activity.action_object.item as action %}

View file

@ -4,7 +4,6 @@
{% load humanize %} {% load humanize %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
{% load duration %} {% load duration %}
{% for event in events %} {% for event in events %}
@ -15,7 +14,7 @@
<div> <div>
<div> <div>
<span class="time"> <span class="time">
<span>{{ event.created|naturaltime }}</span> <span>{{ event.created|naturaldelta }}</span>
</span> </span>
<div> <div>
<span> <span>

View file

@ -4,7 +4,6 @@
{% load humanize %} {% load humanize %}
{% load mastodon %} {% load mastodon %}
{% load thumb %} {% load thumb %}
{% load prettydate %}
{% load user_actions %} {% load user_actions %}
{% load duration %} {% load duration %}
{% for activity in activities %} {% for activity in activities %}
@ -15,7 +14,7 @@
<div> <div>
<div> <div>
<span class="time"> <span class="time">
<span>{{ activity.action_object.created_time|naturaltime }}</span> <span>{{ activity.action_object.created_time|naturaldelta }}</span>
</span> </span>
<div class="spacing"> <div class="spacing">
<span> <span>

View file

@ -1,6 +1,7 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load humanize %} {% load humanize %}
{% load duration %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head> <head>
@ -45,7 +46,7 @@
<article> <article>
{{ announcement.html | safe }} {{ announcement.html | safe }}
<footer> <footer>
<span class="action inline"><span><a>{{ announcement.created|default:announcement.created|naturaltime }}</a></span> <span class="action inline"><span><a>{{ announcement.created|default:announcement.created|naturaldelta }}</a></span>
</span> </span>
</footer> </footer>
</article> </article>