Image description linked

main
Bob Mottram 2019-11-28 10:48:51 +00:00
parent d2206dd9c9
commit 5d6eefaf03
2 changed files with 8 additions and 2 deletions

View File

@ -585,6 +585,7 @@ div.gallery img {
font-size: var(--font-size4); font-size: var(--font-size4);
} }
div.gallerytext { div.gallerytext {
text-decoration: none;
color: var(--main-fg-color); color: var(--main-fg-color);
font-size: var(--gallery-font-size); font-size: var(--gallery-font-size);
} }
@ -874,6 +875,7 @@ div.gallery img {
font-size: var(--font-size3); font-size: var(--font-size3);
} }
div.gallerytext { div.gallerytext {
text-decoration: none;
color: var(--main-fg-color); color: var(--main-fg-color);
font-size: var(--gallery-font-size-mobile); font-size: var(--gallery-font-size-mobile);
} }

View File

@ -2192,10 +2192,14 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
if boxName=='tlmedia': if boxName=='tlmedia':
galleryStr+='<div class="gallery">\n' galleryStr+='<div class="gallery">\n'
galleryStr+=' <a href="'+attach['url']+'">\n' galleryStr+=' <a href="'+attach['url']+'">\n'
galleryStr+=' <img loading="lazy" src="'+attach['url']+'" width="600" height="400">\n' galleryStr+=' <img loading="lazy" src="'+attach['url']+'" alt="" title="" width="600" height="400">\n'
galleryStr+=' </a>\n' galleryStr+=' </a>\n'
if postJsonObject['object'].get('url'):
imagePostUrl=postJsonObject['object']['url']
else:
imagePostUrl=postJsonObject['object']['id']
if imageDescription: if imageDescription:
galleryStr+=' <div class="gallerytext">'+imageDescription+'</div>\n' galleryStr+=' <a href="'+imagePostUrl+'"><div class="gallerytext">'+imageDescription+'</div></a>\n'
galleryStr+='</div>\n' galleryStr+='</div>\n'
attachmentStr+='<a href="'+attach['url']+'">' attachmentStr+='<a href="'+attach['url']+'">'