diff --git a/plugins/Embed/templates/embed/embedView.html.twig b/plugins/Embed/templates/embed/embedView.html.twig index 2d0956cf2f..624b02b93d 100644 --- a/plugins/Embed/templates/embed/embedView.html.twig +++ b/plugins/Embed/templates/embed/embedView.html.twig @@ -1,18 +1,22 @@ +
+
- {% if attributes['has_attachment'] != false %} - {% set thumbnail_parameters = { - 'id': embed.getAttachmentId(), - 'size': 'medium' - } %} - {{embed.getTitle() | escape}} - {% endif %} -
- {{embed.getTitle() | escape}} -
-
+ + {% if attributes['has_attachment'] != false %} + {% set thumbnail_parameters = { + 'id': embed.getAttachmentId(), + 'size': 'medium' + } %} + {{embed.getTitle() | escape}} + {% endif %} + +
+
{% if embed.getAuthorName() is not null %}
{% if embed.getAuthorUrl() is null %} @@ -32,8 +36,9 @@
{% endif %}
- -
+ +
+ {{ embed.getDescription() | escape }}
diff --git a/public/assets/default_theme/css/colors.css b/public/assets/default_theme/css/colors.css index dc81add238..f2f7ae3a4d 100644 --- a/public/assets/default_theme/css/colors.css +++ b/public/assets/default_theme/css/colors.css @@ -43,7 +43,7 @@ input[type=checkbox] { .markdown-blocks, .profile, .section-title-details, -.section-attachments, +.note-attachments-unit, .section-settings, .section-settings ul, .section-widget, @@ -114,7 +114,7 @@ select { } .doc-navigation, -.h-entry, +.h-entry:not(.embed), .markdown-blocks, .section-settings, .section-settings ul, @@ -128,7 +128,7 @@ textarea { } #header, -.h-entry, +.h-entry:not(.embed), .header-extra-forms-open, .profile, .set-shadow-dark, diff --git a/public/assets/default_theme/css/pages/feeds.css b/public/assets/default_theme/css/pages/feeds.css index 5a40c5028b..ed207c86bc 100644 --- a/public/assets/default_theme/css/pages/feeds.css +++ b/public/assets/default_theme/css/pages/feeds.css @@ -49,22 +49,50 @@ background: repeating-conic-gradient(#ffffff66 0deg 90deg, #ffffff33 0deg 180deg) 0 0/40px 40px round; } -.h-entry .embed { +.embed { display: -webkit-box; display: -webkit-flex; display: -moz-box; display: -ms-flexbox; display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -moz-box-orient: vertical; - -moz-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; + flex-wrap: wrap; padding: var(--smaller); border: unset; - width: 100% +} + +.embed header { + width: 100%; + margin-bottom: var(--small); +} + +.embed img { + width: 25%; + height: auto; + margin-right: var(--smaller); +} + +.embed .p-summary { + width: 60%; +} + +.embed .p-name, +.embed .p-author { + font-weight: bold; +} + +.embed img { + padding: unset; + max-width: -webkit-min-content; + max-width: -moz-min-content; + max-width: min-content; + max-height: -webkit-min-content; + max-height: -moz-min-content; + max-height: min-content +} + +.embed .p-summary hr { + margin-top: var(--smaller); + margin-bottom: var(--smaller); } .h-entry .embed[class*="p-"] { @@ -75,16 +103,6 @@ text-decoration: underline } -.h-entry .embed header img { - padding: unset; - max-width: -webkit-min-content; - max-width: -moz-min-content; - max-width: min-content; - max-height: -webkit-min-content; - max-height: -moz-min-content; - max-height: min-content -} - .h-entry { display: -webkit-box; display: -webkit-flex; @@ -108,7 +126,8 @@ margin-left: var(--small) } -.note-info { +.note-info, +embed header { display: -webkit-box; display: -webkit-flex; display: -moz-box; @@ -240,7 +259,7 @@ margin-bottom: var(--smaller) } -.section-attachments { +.note-attachments-unit { display: -webkit-box; display: -webkit-flex; display: -moz-box; @@ -261,11 +280,11 @@ align-self: flex-start } -.note-attachments:not(:only-child) { +.note-attachments-unit:not(:only-child) { margin-right: var(--smaller) } -.note-attachments>figure figcaption { +.note-attachments-unit>figure figcaption { display: -webkit-box; display: -webkit-flex; display: -moz-box; diff --git a/templates/cards/attachments/view.html.twig b/templates/cards/attachments/view.html.twig index 1ba86ffc92..a4858a918c 100644 --- a/templates/cards/attachments/view.html.twig +++ b/templates/cards/attachments/view.html.twig @@ -1,12 +1,12 @@ {% set handled = false %} {% for block in handle_event('ViewAttachment', {'attachment': attachment, 'note': note}) %} {% set handled = true %} -
+
{{ block | raw }}
{% endfor %} {% if not handled %} -
+ {% endif %} diff --git a/templates/cards/note/view.html.twig b/templates/cards/note/view.html.twig index 70c7a2b517..79ab47f647 100644 --- a/templates/cards/note/view.html.twig +++ b/templates/cards/note/view.html.twig @@ -37,7 +37,7 @@ {% if hide_attachments is not defined %} {% if note.getAttachments() is not empty %} -
+
{% for attachment in note.getAttachments() %} {% include '/cards/attachments/view.html.twig' with {'attachment': attachment, 'note': note} only%} {% endfor %}