From feef968fb997739e0f532786e6f851eaef3e5497 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 3 Jun 2024 21:55:00 -0400 Subject: [PATCH] show avatar in posts --- common/static/scss/_common.scss | 1 + common/templates/_footer.html | 12 ++++ common/templates/_sidebar.html | 14 ---- common/templates/_sidebar_anonymous.html | 14 ---- journal/templates/posts.html | 58 +++++++++------- locale/zh_Hans/LC_MESSAGES/django.po | 88 ++++++++++++------------ locale/zh_Hant/LC_MESSAGES/django.po | 88 ++++++++++++------------ 7 files changed, 133 insertions(+), 142 deletions(-) diff --git a/common/static/scss/_common.scss b/common/static/scss/_common.scss index e11d8d7a..bb7b520f 100644 --- a/common/static/scss/_common.scss +++ b/common/static/scss/_common.scss @@ -196,6 +196,7 @@ form img { display: inline-block; img { + max-width: unset; border-radius: 50%; height: calc(1rem * var(--pico-line-height) + var(--pico-nav-link-spacing-vertical) * 2 - var(--pico-border-width) * 2); width: calc(1rem * var(--pico-line-height) + var(--pico-nav-link-spacing-vertical) * 2 - var(--pico-border-width) * 2); diff --git a/common/templates/_footer.html b/common/templates/_footer.html index c5b3d2b1..c480466b 100644 --- a/common/templates/_footer.html +++ b/common/templates/_footer.html @@ -18,6 +18,18 @@
diff --git a/common/templates/_sidebar_anonymous.html b/common/templates/_sidebar_anonymous.html index a995b4be..d74d5e09 100644 --- a/common/templates/_sidebar_anonymous.html +++ b/common/templates/_sidebar_anonymous.html @@ -62,17 +62,3 @@ - diff --git a/journal/templates/posts.html b/journal/templates/posts.html index 70140a95..fb06070f 100644 --- a/journal/templates/posts.html +++ b/journal/templates/posts.html @@ -4,33 +4,39 @@ {% load i18n %} {% for post in posts %}
-
- - {{ post.created|naturaldelta }} - {% include "action_reply_post.html" %} - {% include "action_like_post.html" %} - {% include "action_boost_post.html" %} - {% include "action_open_post.html" %} - - - - {{ post.author.name }} - -
{{ post.summary|default:'' }}
-
-
- {% for attachment in post.attachments.all %} - {% if attachment.is_image %} - attachment.file_display_name - {% endif %} - {% endfor %} +
+
+
+ @{{ post.author.handle }} +
+
+
+ + {{ post.created|naturaldelta }} + {% include "action_reply_post.html" %} + {% include "action_like_post.html" %} + {% include "action_boost_post.html" %} + {% include "action_open_post.html" %} + + + {{ post.author.name }} + +
{{ post.summary|default:'' }}
+
+
+ {% for attachment in post.attachments.all %} + {% if attachment.is_image %} + attachment.file_display_name + {% endif %} + {% endfor %} +
+ {{ post.content|bleach:"a,p,span,br,div,img"|default:"" }}
- {{ post.content|bleach:"a,p,span,br,div,img"|default:"" }}
diff --git a/locale/zh_Hans/LC_MESSAGES/django.po b/locale/zh_Hans/LC_MESSAGES/django.po index bef71044..9721457f 100644 --- a/locale/zh_Hans/LC_MESSAGES/django.po +++ b/locale/zh_Hans/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-03 17:32-0400\n" +"POT-Creation-Date: 2024-06-03 21:53-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -667,7 +667,7 @@ msgstr "不再提示" #: catalog/templates/_item_comments_by_episode.html:78 #: catalog/templates/_item_reviews.html:43 #: catalog/templates/podcast_episode_data.html:41 -#: common/templates/_sidebar.html:231 +#: common/templates/_sidebar.html:203 msgid "show more" msgstr "显示更多" @@ -1093,6 +1093,40 @@ msgstr "显示" msgid "hide" msgstr "隐藏" +#: catalog/templates/discover.html:155 common/templates/_sidebar.html:14 +msgid "Unread Announcements" +msgstr "未读公告" + +#: catalog/templates/discover.html:161 common/templates/_sidebar.html:20 +msgid "mark all as read" +msgstr "全部标为已读" + +#: catalog/templates/discover.html:170 +msgid "Popular Posts" +msgstr "热门帖文" + +#: catalog/templates/discover.html:178 +#: common/templates/_sidebar_anonymous.html:51 +msgid "Popular Tags" +msgstr "热门标签" + +#: catalog/templates/discover.html:185 catalog/templates/item_base.html:236 +#: catalog/templates/item_mark_list.html:54 +#: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:98 +#: common/templates/_sidebar.html:198 +#: common/templates/_sidebar_anonymous.html:43 +#: common/templates/_sidebar_anonymous.html:58 +#: journal/templates/collection_items.html:8 journal/templates/posts.html:43 +#: 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_item_list_base.html:25 +#: journal/templates/user_tag_list.html:29 social/templates/events.html:45 +#: users/templates/users/announcements.html:54 +#: users/templates/users/relationship_list.html:11 +msgid "nothing so far." +msgstr "暂无内容。" + #: catalog/templates/edition.html:36 msgid "publication date" msgstr "发行时间" @@ -1163,23 +1197,6 @@ msgstr "评分人数不足" msgid "overview" msgstr "简介" -#: catalog/templates/item_base.html:236 -#: catalog/templates/item_mark_list.html:54 -#: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:37 -#: common/templates/_sidebar.html:126 common/templates/_sidebar.html:226 -#: common/templates/_sidebar_anonymous.html:43 -#: common/templates/_sidebar_anonymous.html:58 -#: journal/templates/collection_items.html:8 journal/templates/posts.html:39 -#: 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_item_list_base.html:25 -#: journal/templates/user_tag_list.html:29 social/templates/events.html:45 -#: users/templates/users/announcements.html:54 -#: users/templates/users/relationship_list.html:11 -msgid "nothing so far." -msgstr "暂无内容。" - #: catalog/templates/item_base.html:243 msgid "comments" msgstr "短评" @@ -1523,52 +1540,35 @@ msgstr "注册或登录" msgid "Set a username." msgstr "设置用户名" -#: common/templates/_sidebar.html:14 -msgid "Unread Announcements" -msgstr "未读公告" - -#: common/templates/_sidebar.html:20 -msgid "mark all as read" -msgstr "全部标为已读" - -#: common/templates/_sidebar.html:30 -#: common/templates/_sidebar_anonymous.html:51 -msgid "Popular Tags" -msgstr "热门标签" - -#: common/templates/_sidebar.html:48 -msgid "Popular Posts" -msgstr "热门帖文" - -#: common/templates/_sidebar.html:81 +#: common/templates/_sidebar.html:53 msgid "approving followers manually" msgstr "已开启关注审核" -#: common/templates/_sidebar.html:111 +#: common/templates/_sidebar.html:83 msgid "Current Targets" msgstr "当前目标" -#: common/templates/_sidebar.html:124 +#: common/templates/_sidebar.html:96 msgid "Set a collection as target, its progress will show up here." msgstr "将自己或他人的收藏单设为目标,这里就会显示进度" -#: common/templates/_sidebar.html:137 +#: common/templates/_sidebar.html:109 msgid "Recent podcast episodes" msgstr "近期播客节目" -#: common/templates/_sidebar.html:172 +#: common/templates/_sidebar.html:144 msgid "Currently reading" msgstr "正在阅读" -#: common/templates/_sidebar.html:195 +#: common/templates/_sidebar.html:167 msgid "Currently watching" msgstr "正在追看" -#: common/templates/_sidebar.html:218 +#: common/templates/_sidebar.html:190 msgid "Common Tags" msgstr "常用标签" -#: common/templates/_sidebar.html:242 +#: common/templates/_sidebar.html:214 msgid "Recent Posts" msgstr "近期帖文" diff --git a/locale/zh_Hant/LC_MESSAGES/django.po b/locale/zh_Hant/LC_MESSAGES/django.po index 4b572d60..bbb73869 100644 --- a/locale/zh_Hant/LC_MESSAGES/django.po +++ b/locale/zh_Hant/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-03 17:32-0400\n" +"POT-Creation-Date: 2024-06-03 21:53-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -667,7 +667,7 @@ msgstr "不再提示" #: catalog/templates/_item_comments_by_episode.html:78 #: catalog/templates/_item_reviews.html:43 #: catalog/templates/podcast_episode_data.html:41 -#: common/templates/_sidebar.html:231 +#: common/templates/_sidebar.html:203 msgid "show more" msgstr "顯示更多" @@ -1093,6 +1093,40 @@ msgstr "顯示" msgid "hide" msgstr "隱藏" +#: catalog/templates/discover.html:155 common/templates/_sidebar.html:14 +msgid "Unread Announcements" +msgstr "未讀公告" + +#: catalog/templates/discover.html:161 common/templates/_sidebar.html:20 +msgid "mark all as read" +msgstr "全部標爲已讀" + +#: catalog/templates/discover.html:170 +msgid "Popular Posts" +msgstr "熱門帖文" + +#: catalog/templates/discover.html:178 +#: common/templates/_sidebar_anonymous.html:51 +msgid "Popular Tags" +msgstr "熱門標籤" + +#: catalog/templates/discover.html:185 catalog/templates/item_base.html:236 +#: catalog/templates/item_mark_list.html:54 +#: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:98 +#: common/templates/_sidebar.html:198 +#: common/templates/_sidebar_anonymous.html:43 +#: common/templates/_sidebar_anonymous.html:58 +#: journal/templates/collection_items.html:8 journal/templates/posts.html:43 +#: 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_item_list_base.html:25 +#: journal/templates/user_tag_list.html:29 social/templates/events.html:45 +#: users/templates/users/announcements.html:54 +#: users/templates/users/relationship_list.html:11 +msgid "nothing so far." +msgstr "暫無內容。" + #: catalog/templates/edition.html:36 msgid "publication date" msgstr "發行時間" @@ -1163,23 +1197,6 @@ msgstr "評分人數不足" msgid "overview" msgstr "簡介" -#: catalog/templates/item_base.html:236 -#: catalog/templates/item_mark_list.html:54 -#: catalog/templates/item_review_list.html:50 common/templates/_sidebar.html:37 -#: common/templates/_sidebar.html:126 common/templates/_sidebar.html:226 -#: common/templates/_sidebar_anonymous.html:43 -#: common/templates/_sidebar_anonymous.html:58 -#: journal/templates/collection_items.html:8 journal/templates/posts.html:39 -#: 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_item_list_base.html:25 -#: journal/templates/user_tag_list.html:29 social/templates/events.html:45 -#: users/templates/users/announcements.html:54 -#: users/templates/users/relationship_list.html:11 -msgid "nothing so far." -msgstr "暫無內容。" - #: catalog/templates/item_base.html:243 msgid "comments" msgstr "短評" @@ -1523,52 +1540,35 @@ msgstr "註冊或登錄" msgid "Set a username." msgstr "設置用戶名" -#: common/templates/_sidebar.html:14 -msgid "Unread Announcements" -msgstr "未讀公告" - -#: common/templates/_sidebar.html:20 -msgid "mark all as read" -msgstr "全部標爲已讀" - -#: common/templates/_sidebar.html:30 -#: common/templates/_sidebar_anonymous.html:51 -msgid "Popular Tags" -msgstr "熱門標籤" - -#: common/templates/_sidebar.html:48 -msgid "Popular Posts" -msgstr "熱門帖文" - -#: common/templates/_sidebar.html:81 +#: common/templates/_sidebar.html:53 msgid "approving followers manually" msgstr "已開啓關注審覈" -#: common/templates/_sidebar.html:111 +#: common/templates/_sidebar.html:83 msgid "Current Targets" msgstr "當前目標" -#: common/templates/_sidebar.html:124 +#: common/templates/_sidebar.html:96 msgid "Set a collection as target, its progress will show up here." msgstr "將自己或他人的收藏單設爲目標,這裏就會顯示進度" -#: common/templates/_sidebar.html:137 +#: common/templates/_sidebar.html:109 msgid "Recent podcast episodes" msgstr "近期播客節目" -#: common/templates/_sidebar.html:172 +#: common/templates/_sidebar.html:144 msgid "Currently reading" msgstr "正在閱讀" -#: common/templates/_sidebar.html:195 +#: common/templates/_sidebar.html:167 msgid "Currently watching" msgstr "正在追看" -#: common/templates/_sidebar.html:218 +#: common/templates/_sidebar.html:190 msgid "Common Tags" msgstr "常用標籤" -#: common/templates/_sidebar.html:242 +#: common/templates/_sidebar.html:214 msgid "Recent Posts" msgstr "近期帖文"