upstream V3 development https://www.gnusocial.rocks/v3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 lines
3.0 KiB

  1. <article class="h-entry hentry note">
  2. {% set nickname = note.getActorNickname() %}
  3. <aside class="note-sidebar">
  4. <img class="u-logo avatar" src="{{ note.getActorAvatarUrl() }}" alt="{{ nickname }}'s avatar" width="32px" height="32px">
  5. </aside>
  6. <div class="note-wrapper">
  7. {# TODO: this should link to the note's user profile? #}
  8. <div tabindex="0" title="{{ 'Begin a note by the user: ' | trans }} {{ nickname }}." class="note-info">
  9. <strong class="note-author u-url">
  10. {# Microformat's h-card properties indicates a face icon is a "u-logo" #}
  11. {{ nickname }}
  12. </strong>
  13. {% if app.user %}
  14. <div class="note-actions">
  15. {% for current_action in get_note_actions(note) %}
  16. {{ form(current_action) }}
  17. {% endfor %}
  18. </div>
  19. {% endif %}
  20. {% set reply_to = note.getReplyToNickname() %}
  21. {% if reply_to is not null and not skip_reply_to is defined %}
  22. {% trans with {'%name%': reply_to} %} in reply to %name% {% endtrans %}
  23. {% endif %}
  24. </div>
  25. <section tabindex="0" role="dialog" class="e-content entry-content note-content">
  26. <div class="note-text" tabindex="0" title="{{ 'Note text content.' | trans }}">
  27. {{ note.getRendered() | raw }}
  28. </div>
  29. {% if hide_attachments is not defined %}
  30. {% if note.getAttachments() is not empty %}
  31. <section class="section-attachments" tabindex="0" title="{{ 'Note attachments.' | trans }}">
  32. {% for attachment in note.getAttachments() %}
  33. {% include '/attachments/view.html.twig' with {'attachment': attachment, 'note': note} only%}
  34. {% endfor %}
  35. </section>
  36. {% endif %}
  37. {% endif %}
  38. {% if note.getLinks() is not empty %}
  39. <div tabindex="0" class="note-links" title="{{ 'Shared links.' | trans }}">
  40. {% for link in note.getLinks() %}
  41. {% for block in handle_event('ViewLink', {'link': link, 'note': note}) %}
  42. {{ block | raw }}
  43. {% endfor %}
  44. {% endfor %}
  45. </div>
  46. {% endif %}
  47. </section>
  48. {% if replies is defined and replies is not empty %}
  49. <div class="u-in-reply-to replies" tabindex="0" title="{{ 'Begin replies to ' | trans }} {{ nickname }}'s note!">
  50. {% for conversation in replies %}
  51. {% include '/note/view.html.twig' with {'note': conversation['note'], 'skip_reply_to': true, 'have_user': have_user, 'replies': conversation['replies']} only %}
  52. {% endfor %}
  53. </div>
  54. {% endif %}
  55. {% if reply_to is not empty %}
  56. <hr tabindex="0" title="{{ 'End of this reply' | trans }}">
  57. {% endif %}
  58. </div>
  59. </article>