mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-22 21:46:27 +00:00
Change how we link individual-post view
This commit is contained in:
parent
c7b6264f23
commit
842b458395
3 changed files with 16 additions and 11 deletions
|
@ -48,6 +48,7 @@ class Individual(TemplateView):
|
||||||
[self.post_obj],
|
[self.post_obj],
|
||||||
self.request.identity,
|
self.request.identity,
|
||||||
),
|
),
|
||||||
|
"link_original": True,
|
||||||
"replies": Post.objects.filter(
|
"replies": Post.objects.filter(
|
||||||
models.Q(
|
models.Q(
|
||||||
visibility__in=[
|
visibility__in=[
|
||||||
|
|
|
@ -694,13 +694,10 @@ h1.identity small {
|
||||||
|
|
||||||
.post {
|
.post {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
overflow: hidden;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.post.mini {
|
.post.mini {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
cursor: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.post.reply {
|
.post.reply {
|
||||||
|
@ -747,6 +744,7 @@ h1.identity small {
|
||||||
background-color: var(--color-bg-main);
|
background-color: var(--color-bg-main);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 3px 3px;
|
padding: 3px 3px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post time i {
|
.post time i {
|
||||||
|
@ -863,6 +861,7 @@ h1.identity small {
|
||||||
|
|
||||||
.post .actions menu a i {
|
.post .actions menu a i {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
|
width: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boost-banner,
|
.boost-banner,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load activity_tags %}
|
{% load activity_tags %}
|
||||||
<div class="post {% if reply %}reply{% endif %}" data-takahe-id="{{ post.id }}" _="on click go url {{ post.urls.view }}">
|
<div class="post {% if reply %}reply{% endif %}" data-takahe-id="{{ post.id }}">
|
||||||
|
|
||||||
<a href="{{ post.author.urls.view }}">
|
<a href="{{ post.author.urls.view }}">
|
||||||
<img src="{{ post.author.local_icon_url }}" class="icon">
|
<img src="{{ post.author.local_icon_url }}" class="icon">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<time>
|
<time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt">
|
||||||
{% if post.visibility == 0 %}
|
{% if post.visibility == 0 %}
|
||||||
<i class="visibility fa-solid fa-earth-oceania" title="Public"></i>
|
<i class="visibility fa-solid fa-earth-oceania" title="Public"></i>
|
||||||
{% elif post.visibility == 1 %}
|
{% elif post.visibility == 1 %}
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
<i class="visibility fa-solid fa-link-slash" title="Local Only"></i>
|
<i class="visibility fa-solid fa-link-slash" title="Local Only"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if post.published %}
|
{% if post.published %}
|
||||||
<a href="{{ post.url }}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a>
|
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ post.url }}" title="{{ post.created }}">{{ post.created | timedeltashort }}</a>
|
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.created }}">{{ post.created | timedeltashort }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</time>
|
</time>
|
||||||
|
|
||||||
|
@ -30,19 +30,22 @@
|
||||||
{% include "activities/_reply.html" %}
|
{% include "activities/_reply.html" %}
|
||||||
{% include "activities/_like.html" %}
|
{% include "activities/_like.html" %}
|
||||||
{% include "activities/_boost.html" %}
|
{% include "activities/_boost.html" %}
|
||||||
{% if post.author == request.identity %}
|
<a title="Menu" class="menu" _="on click toggle .enabled on the next <menu/> then halt">
|
||||||
<a title="Menu" class="menu" _="on click toggle .enabled on the next <menu/>">
|
|
||||||
<i class="fa-solid fa-caret-down"></i>
|
<i class="fa-solid fa-caret-down"></i>
|
||||||
</a>
|
</a>
|
||||||
<menu>
|
<menu>
|
||||||
|
<a href="{{ post.urls.view }}">
|
||||||
|
<i class="fa-solid fa-comment"></i> View Post & Replies
|
||||||
|
</a>
|
||||||
|
{% if post.author == request.identity %}
|
||||||
<a href="{{ post.urls.action_edit }}">
|
<a href="{{ post.urls.action_edit }}">
|
||||||
<i class="fa-solid fa-pen-to-square"></i> Edit
|
<i class="fa-solid fa-pen-to-square"></i> Edit
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ post.urls.action_delete }}">
|
<a href="{{ post.urls.action_delete }}">
|
||||||
<i class="fa-solid fa-trash"></i> Delete
|
<i class="fa-solid fa-trash"></i> Delete
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
</menu>
|
</menu>
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -51,7 +54,7 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if post.summary %}
|
{% if post.summary %}
|
||||||
<div class="summary" _="on click toggle .enabled then toggle .hidden on the next .content">
|
<div class="summary" _="on click toggle .enabled then toggle .hidden on the next .content then halt">
|
||||||
{{ post.summary }}
|
{{ post.summary }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -75,4 +78,6 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<a class="whole-box" href="{{ post.urls.view }}"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue