Image object fit

merge-requests/6/head
Bob Mottram 2019-11-30 10:06:03 +00:00
parent 7dcc589864
commit 4c481b5dfc
2 changed files with 6 additions and 1 deletions

View File

@ -68,6 +68,11 @@ a:link {
font-weight: bold;
}
.fill {object-fit: fill;}
.contain {object-fit: contain;}
.cover {object-fit: cover;}
.scale-down {object-fit: scale-down;}
.cwText {
display: none;
}

View File

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