X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fresources%2Ftemplates%2Finclude%2FviewPost.html;h=edcabcebb08c32a287a5eb5f7091b624ad2046f3;hp=7120d0693b757f802c9b04999ee694117c3240cd;hb=faf66247a34f64946990a985d2ea3003465969cb;hpb=efb1006429e52a74f41fb6e1d7736736156bb13a diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index 7120d06..edcabce 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -9,7 +9,7 @@ <%ifnull !post.sone.profile.avatar> <%post.sone.profile.avatar|image-link max-width==48 max-height==48 mode==enlarge title=="Avatar Image"> <%else> - Avatar Image + Avatar Image <%/if> <%else> Avatar Image @@ -18,22 +18,35 @@
class="hidden"<%/if>> - <%ifnull !post.recipient> + <%if post.recipientId.present> → - <%ifnull post.recipient.identity> - + <%if !post.recipient.present> + <%else> - + <%/if> <%/if> <% post.text|html|store key==originalText text==true> - <% post.text|parse sone=post.sone|store key==parsedText text==true> - <% post.text|parse sone=post.sone length=core.preferences.charactersPerPost cut-off-length=core.preferences.postCutOffLength|store key==shortText text==true> + <% post.text|parse sone=post.sone|store key==parsedText> + <% parsedText|render|store key==renderedText text==true> + <% parsedText|shorten length=preferences.charactersPerPost cut-off-length=preferences.postCutOffLength|render|store key==shortText text==true>
<% originalText>
-
<% parsedText>
-
<% shortText>
- <%if !shortText|match value=parsedText><%if !raw><%= View.Post.ShowMore|l10n|html><%/if><%/if> - <%if !shortText|match value=parsedText><%if !raw><%/if><%/if> +
<% renderedText>
+
<% shortText>
+ <%if !shortText|match value=renderedText><%if !raw><%= View.Post.ShowMore|l10n|html><%/if><%/if> + <%if !shortText|match value=renderedText><%if !raw><%/if><%/if> + <% parsedText|linked-elements sone=post.sone|store key==linkedElements> + <% foreach linkedElements linkedElement> + <%if !linkedElement.failed> + <% first> +
+ <%/first> + <% linkedElement|render-linked-element> + <% last> +
+ <%/last> + <%/if> + <%/foreach>
@@ -56,7 +69,7 @@ · - <%if ! originalText|match value=parsedText> + <%if ! originalText|match value=renderedText> · <%/if> @@ -80,30 +93,9 @@ - <%if !post.sone.current> - <%ifnull !post.sone.trust> - · -
- - - - -
-
- - - - -
-
- - - - -
- <%/if> - <%/if> <%/if> + · + <%= View.Post.WebOfTrustLink|l10n|html> <%if post.sone.local> ·
@@ -130,7 +122,7 @@