forked from MarseyWorld/MarseyWorld
fdsfsdfds
parent
9007f63568
commit
b7abdf36d6
|
@ -196,7 +196,7 @@ def sanitize(sanitized, noimages=False):
|
|||
if emoji.startswith("!"):
|
||||
emoji = emoji[1:]
|
||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
new = re.sub(f'\w*(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=60 src="" data-src="https://{site}/assets/images/emojis/{emoji}.webp" style="transform: scaleX(-1);-webkit-transform: scaleX(-1);">', new)
|
||||
new = re.sub(f'\w*(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=60 src="" data-src="https://{site}/assets/images/emojis/{emoji}.webp" class="mirrored">', new)
|
||||
|
||||
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
new = re.sub(f'\w*(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=60 src="" data-src="https://{site}/assets/images/emojis/{emoji}.webp">', new)
|
||||
|
@ -212,7 +212,7 @@ def sanitize(sanitized, noimages=False):
|
|||
if emoji.startswith("!"):
|
||||
emoji = emoji[1:]
|
||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
sanitized = re.sub(f'\w*(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=30 src="" data-src="https://{site}/assets/images/emojis/{emoji}.webp" style="transform: scaleX(-1);-webkit-transform: scaleX(-1);">', sanitized)
|
||||
sanitized = re.sub(f'\w*(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=30 src="" data-src="https://{site}/assets/images/emojis/{emoji}.webp" class="mirrored">', sanitized)
|
||||
|
||||
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
sanitized = re.sub(f'\w*(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=30 src="" data-src="https://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
|
||||
|
|
|
@ -382,7 +382,7 @@ def filter_title(title):
|
|||
if emoji.startswith("!"):
|
||||
emoji = emoji[1:]
|
||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
title = title.replace(f':!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=20 src="https://{site}/assets/images/emojis/{emoji}.webp" style="transform: scaleX(-1);-webkit-transform: scaleX(-1);">')
|
||||
title = title.replace(f':!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=20 src="https://{site}/assets/images/emojis/{emoji}.webp" class="mirrored">')
|
||||
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
title = title.replace(f':{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=20 src="https://{site}/assets/images/emojis/{emoji}.webp">')
|
||||
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<style>
|
||||
.mirrored {
|
||||
transform: scaleX(-1);-webkit-transform: scaleX(-1);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
{% if v and v.agendaposter %}
|
||||
|
|
|
@ -60,7 +60,7 @@ On {{'SITE_NAME' | app_config}}, you can use Markdown formatting.
|
|||
<tr>
|
||||
<td>Mirrored Emojis</td>
|
||||
<td>:!marseylove:</td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" style="transform: scaleX(-1);-webkit-transform: scaleX(-1);" alt=":!marseylove:" title=":!marseylove:" delay="0" height="20" src="/assets/images/emojis/marseylove.webp"></td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="mirrored" alt=":!marseylove:" title=":!marseylove:" delay="0" height="20" src="/assets/images/emojis/marseylove.webp"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Poll Options</td>
|
||||
|
|
Loading…
Reference in New Issue