[PLUGIN][Pinned Notes] Allow user to pin his notes

This commit is contained in:
2022-01-16 13:04:56 -03:00
committed by Hugo Sales
parent f7cbfbff8c
commit 21c7912702
7 changed files with 336 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
{% import '/cards/note/view.html.twig' as noteView %}
{# Backwards compatibility with hAtom 0.1 #}
{% if pinnednotes is not empty %}
<main class="feed pinned" tabindex="0" role="feed">
<h2>Pinned Notes</h2>
<div class="h-feed hfeed notes">
{% for conversation in pinnednotes %}
{% block current_note %}
{% if conversation is instanceof('array') %}
{{ noteView.macro_note(conversation['note'], conversation['replies']) }}
{% else %}
{{ noteView.macro_note(conversation) }}
{% endif %}
<hr tabindex="0" title="{{ 'End of note and replies.' | trans }}">
{% endblock current_note %}
{% endfor %}
</div>
</main>
{% endif %}

View File

@@ -0,0 +1,19 @@
{% extends 'stdgrid.html.twig' %}
{% import "/cards/note/view.html.twig" as noteView %}
{% block title %}{{ title }}{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
{% endblock stylesheets %}
{% block body %}
{{ parent() }}
<div class="page">
<div class="main">
{{ noteView.macro_note_minimal(note) }}
{{ form(toggle_form) }}
</div>
</div>
{% endblock body %}