From 22f394f28ff0e8c2d128d6cb70beb80731de8e2d Mon Sep 17 00:00:00 2001 From: Eliseu Amaro Date: Fri, 23 Jul 2021 13:04:04 +0100 Subject: [PATCH] [TWIG] Microformats added to timeline, note's view and media. Should be backwards compatiblr as well. Signed-off-by: Eliseu Amaro --- public/assets/css/right/right.css | 11 +++++++++++ templates/network/public.html.twig | 4 +++- templates/note/view.html.twig | 13 +++++++------ templates/sidepanel/right/right.html.twig | 5 ++--- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/public/assets/css/right/right.css b/public/assets/css/right/right.css index fca8295e61..3320eca569 100644 --- a/public/assets/css/right/right.css +++ b/public/assets/css/right/right.css @@ -29,4 +29,15 @@ width: 100%; padding: var(--small-size); +} + +input[type="file"] { + font-family: var(--display-font); +} + +.custom-file-upload { + border: 1px solid #ccc; + display: inline-block; + padding: 6px 12px; + cursor: pointer; } \ No newline at end of file diff --git a/templates/network/public.html.twig b/templates/network/public.html.twig index 1fac9199c6..719dbdcf0b 100644 --- a/templates/network/public.html.twig +++ b/templates/network/public.html.twig @@ -20,6 +20,7 @@ {% endblock %} {% block body %} +
-
+ {# Backwards compatibility with hAtom 0.1 #} +
{% if notes is defined and notes is not empty %} {% for conversation in notes %} diff --git a/templates/note/view.html.twig b/templates/note/view.html.twig index 2eea4edb38..9f6ee35243 100644 --- a/templates/note/view.html.twig +++ b/templates/note/view.html.twig @@ -1,10 +1,11 @@ -
+
{% set nickname = note.getActorNickname() %} - - {{ nickname }}'s avatar - {{ nickname }} + + {# Microformat's h-card properties indicates a face icon is a "u-logo" #} + + {{ nickname }} {% set reply_to = note.getReplyToNickname() %} @@ -12,7 +13,7 @@ {% trans with {'%name%': reply_to} %} in reply to %name% {% endtrans %} {% endif %}
-
+
{% block markdown %} {% apply markdown_to_html %} {{ note.getContent() }} @@ -39,7 +40,7 @@ {# {% endif %} #}
{% if replies is defined %} -
+
{% for conversation in replies %} {% include '/note/view.html.twig' with {'note': conversation['note'], 'skip_reply_to': true, 'have_user': have_user, 'replies': conversation['replies']} only %} {% endfor %} diff --git a/templates/sidepanel/right/right.html.twig b/templates/sidepanel/right/right.html.twig index a70be2fab5..2fdd0a7931 100644 --- a/templates/sidepanel/right/right.html.twig +++ b/templates/sidepanel/right/right.html.twig @@ -29,9 +29,8 @@
- {{ form_widget(post_form.attachments) }} -