[COMPONENTS][Tag] Actor/Note tag template polished
[PLUGINS][RelatedTags] Disable rendering of template when no results are found
This commit is contained in:
parent
ef435b824b
commit
546c5c84fd
|
@ -36,6 +36,7 @@ class Tag extends Controller
|
|||
|
||||
return [
|
||||
'_template' => $template,
|
||||
'tag_name' => $canonical,
|
||||
'results' => $results,
|
||||
'page' => $page,
|
||||
];
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
|
||||
{% endblock stylesheets %}
|
||||
|
||||
{% block body %}
|
||||
<h2>{{ 'Notes containing tag:' | trans }} {{ tag_name }}</h2>
|
||||
|
||||
{% for pinned in handle_event('AddPinnedFeedContent', app.request) %}
|
||||
{% include pinned['template'] with { 'actor_tags': pinned['vars']} only %}
|
||||
{% endfor %}
|
||||
|
@ -9,5 +16,7 @@
|
|||
{% block profile_view %}{% include 'cards/profile/view.html.twig' %}{% endblock profile_view %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="section-widget section-widget-padded">
|
||||
{{ "Page: " ~ page }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,18 +1,25 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
{% import '/cards/note/view.html.twig' as noteView %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
|
||||
{% endblock stylesheets %}
|
||||
|
||||
{% block body %}
|
||||
<h2>{{ 'Notes containing tag:' | trans }} {{ tag_name }}</h2>
|
||||
|
||||
{% for pinned in handle_event('AddPinnedFeedContent', app.request) %}
|
||||
{% include pinned['template'] with { 'note_tags': pinned['vars']} only %}
|
||||
{% endfor %}
|
||||
|
||||
{% for note in results %}
|
||||
{% block current_note %}
|
||||
<div class="section-widget">
|
||||
{{ noteView.macro_note(note) }}
|
||||
</div>
|
||||
{% endblock current_note %}
|
||||
{% endfor %}
|
||||
|
||||
{{ "Page: " ~ page }}
|
||||
<div class="section-widget section-widget-padded section-widget-paging">
|
||||
{{ "Page " ~ page }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<div class="section-widget">
|
||||
<p>Related tags:</p>
|
||||
{% if note_tags is not empty %}
|
||||
<div class="section-widget section-widget-padded">
|
||||
<h2>Related tags:</h2>
|
||||
{% for at in actor_tags %}
|
||||
{% include 'cards/tag/actor_tag.html.twig' with { 'tag': at, 'actor': null } %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<div class="section-widget">
|
||||
<p>Related tags:</p>
|
||||
{% if note_tags is not empty %}
|
||||
<div class="section-widget section-widget-padded">
|
||||
<h2>Related tags:</h2>
|
||||
|
||||
{% for nt in note_tags %}
|
||||
{% include 'cards/tag/note_tag.html.twig' with { 'tag': nt } %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -38,6 +38,10 @@
|
|||
margin-top: var(--smaller);
|
||||
}
|
||||
|
||||
.profile-info-bio {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.profile-avatar {
|
||||
max-width: 4rem;
|
||||
max-height: 4rem;
|
||||
|
@ -66,6 +70,12 @@
|
|||
padding: var(--smaller);
|
||||
}
|
||||
|
||||
.section-widget-paging {
|
||||
display: block;
|
||||
margin-top: var(--smaller);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: var(--small);
|
||||
font-weight: 700;
|
||||
|
|
Loading…
Reference in New Issue
Block a user