forked from doubaniux/boofilsic
-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05821ea
commit 15a7b55
Showing
31 changed files
with
379 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
unsupported notification: announcement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% load bleach_tags %} | ||
boosted your post | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
{{ event.post.content|bleach:"a,p,span,br,div,img"|default:"<br>" }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
boosted your collection <a href="{{ event.piece.url }}">{{ event.piece.title }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% load duration %} | ||
boost your comment on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span> | ||
{% if event.piece.rating_grade %}{{ event.piece.rating_grade|rating_star }}{% endif %} | ||
</span> | ||
{{ event.piece.html|safe }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
boosted your review <a href="{{ event.piece.url }}">{{ event.piece.title }}</a> on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% load duration %} | ||
boosted your mark on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span> | ||
{% if event.piece.mark.rating_grade %}{{ event.piece.mark.rating_grade|rating_star }}{% endif %} | ||
</span> | ||
{{ event.piece.mark.comment.html|safe }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% load bleach_tags %} | ||
requested to follow you | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span class="action">{% include 'users/profile_actions.html' with show_home=1 identity=event.identity %}</span> | ||
<div> | ||
<code class="{{ event.identity.id }}_handler" | ||
style="cursor:pointer" | ||
onmouseleave="$(this).removeAttr('data-tooltip')" | ||
onclick="navigator.clipboard.writeText(this.innerText);$(this).data('tooltip','copied');">@{{ event.identity.full_handle }}</code> | ||
</div> | ||
{{ event.identity.summary|bleach:"a,p,span,br"|default:"<br>" }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% load bleach_tags %} | ||
followed you | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span class="action">{% include 'users/profile_actions.html' with show_home=1 identity=event.identity %}</span> | ||
<div> | ||
<code class="{{ event.identity.id }}_handler" | ||
style="cursor:pointer" | ||
onmouseleave="$(this).removeAttr('data-tooltip')" | ||
onclick="navigator.clipboard.writeText(this.innerText);$(this).data('tooltip','copied');">@{{ event.identity.full_handle }}</code> | ||
</div> | ||
{{ event.identity.summary|bleach:"a,p,span,br"|default:"<br>" }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
joined {{ site_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% load bleach_tags %} | ||
liked your post | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
{{ event.post.content|bleach:"a,p,span,br,div,img"|default:"<br>" }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
liked your collection <a href="{{ event.piece.url }}">{{ event.piece.title }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% load duration %} | ||
liked your comment on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span> | ||
{% if event.piece.rating_grade %}{{ event.piece.rating_grade|rating_star }}{% endif %} | ||
</span> | ||
{{ event.piece.html|safe }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
liked your review <a href="{{ event.piece.url }}">{{ event.piece.title }}</a> on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% load duration %} | ||
liked your mark on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span> | ||
{% if event.piece.mark.rating_grade %}{{ event.piece.mark.rating_grade|rating_star }}{% endif %} | ||
</span> | ||
{{ event.piece.mark.comment.html|safe }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% load bleach_tags %} | ||
mentioned you | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
{{ event.post.content|bleach:"a,p,span,br,div,img"|default:"<br>" }} | ||
</blockquote> | ||
{% include "events/_post.html" with post=event.reply %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
replied to your collection <a href="{{ event.piece.url }}">{{ event.piece.title }}</a> | ||
{% include "events/_post.html" with post=event.reply %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load duration %} | ||
replied to your comment on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span> | ||
{% if event.piece.rating_grade %}{{ event.piece.rating_grade|rating_star }}{% endif %} | ||
</span> | ||
{{ event.piece.html|safe }} | ||
</blockquote> | ||
{% include "events/_post.html" with post=event.reply %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
replied to your review <a href="{{ event.piece.url }}">{{ event.piece.title }}</a> on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> | ||
{% include "events/_post.html" with post=event.reply %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load duration %} | ||
replied to your mark on <a href="{{ event.item.url }}">{{ event.item.display_title }}</a> | ||
<blockquote class="tldr" _="on click toggle .tldr on me"> | ||
<span> | ||
{% if event.piece.mark.rating_grade %}{{ event.piece.mark.rating_grade|rating_star }}{% endif %} | ||
</span> | ||
{{ event.piece.mark.comment.html|safe }} | ||
</blockquote> | ||
{% include "events/_post.html" with post=event.reply %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
unsupported notification: post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{% load static %} | ||
{% load i18n %} | ||
{% load l10n %} | ||
{% load humanize %} | ||
{% load admin_url %} | ||
{% load mastodon %} | ||
{% load oauth_token %} | ||
{% load truncate %} | ||
{% load thumb %} | ||
{% load prettydate %} | ||
{% load user_actions %} | ||
{% load duration %} | ||
{% for event in events %} | ||
<section class="activity"> | ||
<div class="avatar"> | ||
<img src="{{ event.identity.avatar }}" alt="cover" /> | ||
</div> | ||
<div> | ||
<div> | ||
<span class="time"> | ||
<span>{{ event.created|naturaltime }}</span> | ||
</span> | ||
<div> | ||
<span> | ||
<a href="{{ event.identity.url }}" | ||
class="nickname" | ||
title="@{{ event.identity.full_handle }}">{{ event.identity.display_name }}</a> | ||
</span> | ||
{% with "event/"|add:event.template|add:".html" as template %} | ||
{% include template %} | ||
{% endwith %} | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
{% if forloop.last %} | ||
<div class="htmx-indicator" | ||
style="margin-left: 60px" | ||
hx-get="{% url 'social:events' %}?last={{ event.created|date:'Y-m-d H:i:s.uO'|urlencode }}" | ||
hx-trigger="revealed" | ||
hx-swap="outerHTML"> | ||
<i class="fa-solid fa-compact-disc fa-spin loading"></i> | ||
</div> | ||
{% endif %} | ||
{% empty %} | ||
{% if request.GET.last %} | ||
<div class="empty">{% trans 'nothing more.' %}</div> | ||
{% else %} | ||
<div class="empty">{% trans 'nothing so far.' %}</div> | ||
{% endif %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div> | ||
<span class="action"> | ||
{% include "action_reply_post.html" %} | ||
{% include "action_like_post.html" %} | ||
{% include "action_boost_post.html" %} | ||
{% include "action_open_post.html" %} | ||
</span> | ||
{% if post.summary %} | ||
<details> | ||
<summary>{{ post.summary }}</summary> | ||
{{ post.safe_content_local }} | ||
</details> | ||
{% else %} | ||
{{ post.safe_content_local }} | ||
{% endif %} | ||
<div id="replies_{{ post.pk }}"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% load static %} | ||
{% load i18n %} | ||
{% load l10n %} | ||
{% load admin_url %} | ||
{% load mastodon %} | ||
{% load oauth_token %} | ||
{% load truncate %} | ||
{% load thumb %} | ||
<!DOCTYPE html> | ||
<html lang="zh" class="feed-page"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{{ site_name }} - {% trans 'Notification' %}</title> | ||
{% include "common_libs.html" %} | ||
<script src="{{ cdn_url }}/npm/shikwasa@2.2.1/dist/shikwasa.min.js"></script> | ||
<link href="{{ cdn_url }}/npm/shikwasa@2.2.1/dist/style.min.css" | ||
rel="stylesheet"></link> | ||
<script src="{% static 'js/podcast.js' %}"></script> | ||
</head> | ||
<body> | ||
{% include "_header.html" with current="timeline" %} | ||
<main> | ||
<div class="grid__main"> | ||
<h5>{% trans 'Notification' %}</h5> | ||
<div class="feed"> | ||
<div hx-get="{% url 'social:events' %}" | ||
hx-trigger="intersect once delay:0.1s" | ||
hx-swap="outerHTML"> | ||
<i class="fa-solid fa-compact-disc fa-spin loading"></i> | ||
</div> | ||
</div> | ||
</div> | ||
{% include "_sidebar.html" with show_progress=1 identity=request.user.identity %} | ||
</main> | ||
{% include "_footer.html" %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.