From 53b2adecec6cd19deff36735031eefdecac75701 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 25 Jul 2015 13:59:50 +0200 Subject: [PATCH] Include images of an album below a post with an album link --- src/main/resources/i18n/sone.en.properties | 1 + src/main/resources/static/css/sone.css | 43 ++++++++++++++++++++++ src/main/resources/templates/include/viewPost.html | 23 ++++++++++++ 3 files changed, 67 insertions(+) diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index ccc8657..f8f3211 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -370,6 +370,7 @@ View.Post.ShowSource=Toggle Parser View.Post.NotDownloaded=This post has not yet been downloaded, or it has been deleted. View.Post.ShowMore=show more View.Post.ShowLess=show less +View.Post.LinkedAlbum.SizeAndAuthor={1,number} by {0} View.UpdateStatus.Text.ChooseSenderIdentity=Choose the sender identity diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 1767090..b7ae3b7 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -353,6 +353,49 @@ textarea { cursor: pointer; } +#sone .post .linked-album { + display: table; + border-collapse: collapse; +} + +#sone .post .linked-album .album-header { + display: table-caption; + margin-bottom: 1ex; +} + +#sone .post .linked-album .album-header .album-title { + font-size: 150%; + font-weight: bold; +} + +#sone .post .linked-image { + display: table-row; +} + +#sone .post .linked-image .image-left { + display: table-cell; + padding-bottom: 1ex; +} + +#sone .post .linked-image .image { + width: 160px; + height: 90px; + overflow: hidden; + border: solid 1px black; + display: inline-block; + padding: 0px; +} + +#sone .post .linked-image .about-image { + display: table-cell; + padding-left: 1ex; +} + +#sone .post .linked-image .about-image .title { + font-weight: bold; + margin-bottom: 0.5ex; +} + #sone .post .status-line { margin-top: 0.5ex; font-size: 85%; diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index f899e36..1b8d1ad 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -36,6 +36,29 @@ <%if !shortText|match value=parsedText><%if !raw><%= View.Post.ShowMore|l10n|html><%/if><%/if> <%if !shortText|match value=parsedText><%if !raw><%/if><%/if> + <%foreach parts part> + <%if part.class.simpleName|match value==AlbumPart> +
+
+
<% part.album.title|html>
+
<%= View.Post.LinkedAlbum.SizeAndAuthor|l10n 0=part.album.sone.niceName 1=part.album.images.size|html>
+
+ <%foreach part.album.images image> +
+ +
+
<% image.title|html>
+
<% image.description|parse sone=post.sone|render>
+
+
+ <%/foreach> +
+ <%/if> + <%/foreach>
-- 2.7.4