Resize sticker

This commit is contained in:
KnugiHK
2023-06-15 16:59:54 +08:00
parent a49a911e03
commit f7f6b01c86
4 changed files with 15 additions and 2 deletions

View File

@@ -82,6 +82,10 @@
.blue {
color: #70777a;
}
.sticker {
max-width: 100px !important;
max-height: 100px !important;
}
</style>
</head>
<body>
@@ -128,7 +132,9 @@
{{ msg.data | sanitize_except() }}
{% else %}
{% if "image/" in msg.mime %}
<a href="{{ msg.data }}"><img src="{{ msg.thumb if msg.thumb is not none else msg.data }}" /></a>
<a href="{{ msg.data }}">
<img src="{{ msg.thumb if msg.thumb is not none else msg.data }}" {{ 'class="sticker"' if msg.sticker }} />
</a>
{% elif "audio/" in msg.mime %}
<audio controls="controls" autobuffer="autobuffer">
<source src="{{ msg.data }}" />
@@ -206,7 +212,9 @@
{{ msg.data | sanitize_except() }}
{% else %}
{% if "image/" in msg.mime %}
<a href="{{ msg.data }}"><img src="{{ msg.thumb if msg.thumb is not none else msg.data }}" /></a>
<a href="{{ msg.data }}">
<img src="{{ msg.thumb if msg.thumb is not none else msg.data }}" {{ 'class="sticker"' if msg.sticker }}/>
</a>
{% elif "audio/" in msg.mime %}
<audio controls preload="auto">
<source src="{{ msg.data }}" />