refactor(emoji): adjust spacing for better alignment

Improved spacing around emojis in multiple components to enhance visual consistency and readability. Simplified the selector for content modification in the Telegram library function for better maintainability.
This commit is contained in:
ccbikai
2024-08-06 13:12:51 +08:00
parent 3102c01b4e
commit a83c3069e6
3 changed files with 3 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'
& :global(.emoji) {
font-style: normal;
margin-right: 2px;
}
}

View File

@@ -178,6 +178,7 @@ const timeago = datetime.isBefore(dayjs().subtract(1, 'w'))
.content :global(.emoji) {
font-style: normal;
margin-right: 2px;
}
.tag-box {

View File

@@ -65,7 +65,7 @@ function modifyHTMLContent($, content) {
function getPost($, item, { channel, staticProxy, index = 0 }) {
item = item ? $(item).find('.tgme_widget_message') : $('.tgme_widget_message')
const content = modifyHTMLContent($, $(item).find('.tgme_widget_message_bubble > .tgme_widget_message_text'))
const content = modifyHTMLContent($, $(item).find('.tgme_widget_message_text'))
const title = content?.text()?.match(/[^。\n]*(?=[。\n]|http)/g)?.[0] ?? content?.text() ?? ''
const id = $(item).attr('data-post')?.replace(`${channel}/`, '')