Show image underneath the settings

just before the long description (if there is one)
This commit is contained in:
Florian Festi 2020-05-24 13:52:24 +02:00
parent c065e154be
commit ce90f06e1e
2 changed files with 8 additions and 0 deletions

View File

@ -263,6 +263,13 @@ class BServer:
<div class="clear"></div>
<hr />
""")
no_img_msg = _('There is no image yet. Please donate an image of your project on <a href=&quot;https://github.com/florianfesti/boxes/issues/140&quot;>GitHub</a>!')
result.append(f'''<div>
<img src="static/samples/{box.__class__.__name__}.jpg" width="100%" onerror="this.parentElement.innerHTML = '{no_img_msg}';"/>
</div>
''')
if box.description:
result.append(markdown.markdown(_(box.description)))
result.append("""

View File

@ -76,6 +76,7 @@ table {
margin-left: auto;
margin-right: auto;
padding: 10px;
padding-bottom: 15px;
width: 996px;
-webkit-border-radius: 30px;
border-radius: 30px;