add: reposts/quotes pages
add: repost notification
This commit is contained in:
parent
41250ef7ed
commit
276f25a496
17 changed files with 601 additions and 50 deletions
|
@ -79,6 +79,7 @@ secondary=false) -%}
|
|||
{% endif %}
|
||||
</button>
|
||||
|
||||
{% if not user or not user.settings.hide_dislikes %}
|
||||
<button
|
||||
title="Dislike"
|
||||
class="{% if secondary %}quaternary{% else %}camo{% endif %} small"
|
||||
|
@ -89,8 +90,8 @@ secondary=false) -%}
|
|||
<span>{{ dislikes }}</span>
|
||||
{% endif %}
|
||||
</button>
|
||||
{%- endmacro %} {% macro full_username(user) -%}
|
||||
<div class="flex">
|
||||
{% endif %} {%- endmacro %} {% macro full_username(user) -%}
|
||||
<div class="flex items-center">
|
||||
<a href="/@{{ user.username }}" class="flush" style="font-weight: 600">
|
||||
{{ components::username(user=user) }}
|
||||
</a>
|
||||
|
|
|
@ -48,24 +48,35 @@
|
|||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %} {% if user and user.id == post.owner or can_manage_posts %}
|
||||
{% endif %}
|
||||
<div class="pillmenu">
|
||||
<a href="#/replies" data-tab-button="replies" class="active">
|
||||
{{ icon "newspaper" }}
|
||||
<span>{{ text "communities:label.replies" }}</span>
|
||||
</a>
|
||||
|
||||
{% if user.id == post.owner %}
|
||||
<a href="/post/{{ post.id }}/reposts">
|
||||
{{ icon "repeat-2" }}
|
||||
<span>{{ text "communities:label.reposts" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/post/{{ post.id }}/reposts?quotes=true">
|
||||
{{ icon "quote" }}
|
||||
<span>{{ text "communities:label.quotes" }}</span>
|
||||
</a>
|
||||
|
||||
{% if user and user.id == post.owner %}
|
||||
<a href="#/edit" data-tab-button="edit">
|
||||
{{ icon "pen" }}
|
||||
<span>{{ text "communities:label.edit_content" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% endif %} {% if (user and user.id == post.owner) or can_manage_posts
|
||||
%}
|
||||
<a href="#/configure" data-tab-button="configure">
|
||||
{{ icon "settings" }}
|
||||
<span>{{ text "communities:action.configure" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-2 hidden" data-tab="configure">
|
||||
|
@ -169,7 +180,7 @@
|
|||
</script>
|
||||
</div>
|
||||
|
||||
{% if user.id == post.owner %}
|
||||
{% if user and user.id == post.owner %}
|
||||
<div class="card-nest w-full hidden" data-tab="edit">
|
||||
<div class="card small flex items-center gap-2">
|
||||
{{ icon "pen" }}
|
||||
|
@ -223,7 +234,7 @@
|
|||
});
|
||||
}
|
||||
</script>
|
||||
{% endif %} {% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="card-nest w-full" data-tab="replies">
|
||||
<div class="card small flex items-center gap-2">
|
67
crates/app/src/public/html/post/quotes.html
Normal file
67
crates/app/src/public/html/post/quotes.html
Normal file
|
@ -0,0 +1,67 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Post quotes - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{% if post.replying_to %}
|
||||
<a href="/post/{{ post.replying_to }}" class="button">
|
||||
{{ icon "arrow-up" }}
|
||||
<span>{{ text "communities:action.continue_thread" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div style="display: contents;">
|
||||
{% if post.context.repost and post.context.repost.reposting %}
|
||||
{{ components::repost(repost=reposting, post=post, owner=owner, community=community, show_community=true, can_manage_post=can_manage_posts) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post, owner=owner, question=question, community=community, show_community=true, can_manage_post=can_manage_posts) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="pillmenu">
|
||||
<a href="/post/{{ post.id }}#/replies">
|
||||
{{ icon "newspaper" }}
|
||||
<span>{{ text "communities:label.replies" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/post/{{ post.id }}/reposts">
|
||||
{{ icon "repeat-2" }}
|
||||
<span>{{ text "communities:label.reposts" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/post/{{ post.id }}/reposts?quotes=true" class="active">
|
||||
{{ icon "quote" }}
|
||||
<span>{{ text "communities:label.quotes" }}</span>
|
||||
</a>
|
||||
|
||||
{% if user and user.id == post.owner %}
|
||||
<a href="/post/{{ post.id }}#/edit">
|
||||
{{ icon "pen" }}
|
||||
<span>{{ text "communities:label.edit_content" }}</span>
|
||||
</a>
|
||||
{% endif %} {% if (user and user.id == post.owner) or can_manage_posts
|
||||
%}
|
||||
<a href="/post/{{ post.id }}#/configure">
|
||||
{{ icon "settings" }}
|
||||
<span>{{ text "communities:action.configure" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card-nest w-full">
|
||||
<div class="card small flex items-center gap-2">
|
||||
{{ icon "quote" }}
|
||||
<span>{{ text "communities:label.quotes" }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card flex flex-col gap-4">
|
||||
<!-- prettier-ignore -->
|
||||
{% for post in list %}
|
||||
{{ components::post(post=post[0], owner=post[1], question=post[3], secondary=true, show_community=false) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length, key="quotes", value="true") }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
86
crates/app/src/public/html/post/reposts.html
Normal file
86
crates/app/src/public/html/post/reposts.html
Normal file
|
@ -0,0 +1,86 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Post reposts - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{% if post.replying_to %}
|
||||
<a href="/post/{{ post.replying_to }}" class="button">
|
||||
{{ icon "arrow-up" }}
|
||||
<span>{{ text "communities:action.continue_thread" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div style="display: contents;">
|
||||
{% if post.context.repost and post.context.repost.reposting %}
|
||||
{{ components::repost(repost=reposting, post=post, owner=owner, community=community, show_community=true, can_manage_post=can_manage_posts) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post, owner=owner, question=question, community=community, show_community=true, can_manage_post=can_manage_posts) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="pillmenu">
|
||||
<a href="/post/{{ post.id }}#/replies">
|
||||
{{ icon "newspaper" }}
|
||||
<span>{{ text "communities:label.replies" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/post/{{ post.id }}/reposts" class="active">
|
||||
{{ icon "repeat-2" }}
|
||||
<span>{{ text "communities:label.reposts" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/post/{{ post.id }}/reposts?quotes=true">
|
||||
{{ icon "quote" }}
|
||||
<span>{{ text "communities:label.quotes" }}</span>
|
||||
</a>
|
||||
|
||||
{% if user and user.id == post.owner %}
|
||||
<a href="/post/{{ post.id }}#/edit">
|
||||
{{ icon "pen" }}
|
||||
<span>{{ text "communities:label.edit_content" }}</span>
|
||||
</a>
|
||||
{% endif %} {% if (user and user.id == post.owner) or can_manage_posts
|
||||
%}
|
||||
<a href="/post/{{ post.id }}#/configure">
|
||||
{{ icon "settings" }}
|
||||
<span>{{ text "communities:action.configure" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card-nest w-full">
|
||||
<div class="card small flex items-center gap-2">
|
||||
{{ icon "repeat-2" }}
|
||||
<span>{{ text "communities:label.reposts" }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card flex flex-col gap-4">
|
||||
{% for post in list %}
|
||||
<div class="card-nest">
|
||||
<div class="card flex items-center gap-2">
|
||||
<a href="/@{{ post[1].username }}">
|
||||
{{ components::avatar(username=post[1].username,
|
||||
size="24px", selector_type="username") }}
|
||||
</a>
|
||||
|
||||
<div class="name">
|
||||
{{ components::full_username(user=post[1]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card flex items-center gap-2 flex-wrap secondary">
|
||||
<a
|
||||
href="/post/{{ post[0].id }}"
|
||||
class="quaternary small button"
|
||||
>
|
||||
{{ icon "external-link" }}
|
||||
<span>{{ text "general:action.open" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %} {{ components::pagination(page=page, items=list|length,
|
||||
key="quotes", value="false") }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
|
@ -320,7 +320,9 @@
|
|||
ui_ident="awful_contrast"
|
||||
>
|
||||
<div class="flex gap-2 items-center">
|
||||
{{ icon "contrast" }}
|
||||
<span class="desktop" style="display: contents"
|
||||
>{{ icon "contrast" }}</span
|
||||
>
|
||||
<b>Some of your custom colors fail contrast checks:</b>
|
||||
</div>
|
||||
|
||||
|
@ -830,6 +832,17 @@
|
|||
settings.anonymous_avatar_url,
|
||||
"input",
|
||||
],
|
||||
[[], "Misc", "title"],
|
||||
[
|
||||
["hide_dislikes", "Hide post dislikes"],
|
||||
"{{ profile.settings.hide_dislikes }}",
|
||||
"checkbox",
|
||||
],
|
||||
[
|
||||
[],
|
||||
"Hides dislikes on all posts. Users can still dislike your posts, you just won't be able to see it.",
|
||||
"text",
|
||||
],
|
||||
],
|
||||
settings,
|
||||
);
|
||||
|
@ -852,7 +865,6 @@
|
|||
"Allow the site to build the theme for you given a base hue, saturation, and lightness. Scroll down to the next section to manually build the theme.",
|
||||
"text",
|
||||
],
|
||||
|
||||
[
|
||||
["theme_hue", "Theme hue (integer 0-255)"],
|
||||
"{{ profile.settings.theme_hue }}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue