changeset 1114:fe2d403b8be7

templates: display a faux twitter card for post previews This way it is painfully obvious whether or not the post has the correct twitter image URL. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Mon, 02 Apr 2018 15:19:41 -0400
parents 80c6a8d0b4cb
children 1dc65e2b39e7
files templates/html/story.tmpl
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/templates/html/story.tmpl	Mon Apr 02 15:17:20 2018 -0400
+++ b/templates/html/story.tmpl	Mon Apr 02 15:19:41 2018 -0400
@@ -8,6 +8,25 @@
 		&#8212; JeffPC @ <span title="{time|zulu}">{time|date} {time|time}</span>
 	</div>
 
+{ifset(preview)}
+	<br/>
+	<div style="border: 3px solid red; width: 90%">
+{ifset(twitteruser)}
+{ifset(twittertitle)}
+{ifset(twitterdesc)}
+{ifset(twitterimg)}
+	<div>
+	<img src="{twitterimg}" width="100%" />
+	</div>
+{endif()}
+	<strong>{twittertitle|escape}</strong><br/>
+	<small>{twitterdesc|escape}</small>
+{endif()}
+{endif()}
+{endif()}
+	</div>
+{endif()}
+
 	<div class="storycontent">
 {body}
 	</div>