From daf0dc891d3684cb8142342e45eeed3015d02340 Mon Sep 17 00:00:00 2001 From: harold Date: Sun, 23 Mar 2025 11:20:56 +0500 Subject: [PATCH] add fix --- internal/model/widget-templates.go | 63 ++++++------------------------ 1 file changed, 11 insertions(+), 52 deletions(-) diff --git a/internal/model/widget-templates.go b/internal/model/widget-templates.go index 19395c4..80f67d6 100644 --- a/internal/model/widget-templates.go +++ b/internal/model/widget-templates.go @@ -17,15 +17,17 @@ func GetTemplate1(streamerID int) string { display: flex; flex-direction: column; align-items: center; - margin-top: 100px; + width: 100%; + max-width: 1920px; + margin: 20px auto; gap: 20px; } #content img { - width: 50vw; - height: 50vh; - object-fit: cover; + width: 100%; + height: auto; + max-height: 90vh; + object-fit: contain; border-radius: 15px; - animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .text-container { display: flex; @@ -34,14 +36,9 @@ func GetTemplate1(streamerID int) string { font-size: 40px; color: #fff; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); - opacity: 0; - animation: textSlideIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; } .donation-text { margin: 0; - transform: translateX(-50px); - opacity: 0; - animation: textFadeIn 0.6s 0.3s ease-out forwards; } .donation-amount { color: #4CAF50; @@ -49,50 +46,11 @@ func GetTemplate1(streamerID int) string { padding: 5px 15px; background: rgba(0,0,0,0.7); border-radius: 8px; - transform: translateX(50px); - opacity: 0; - animation: amountFadeIn 0.6s 0.5s ease-out forwards; - } - - @keyframes scaleUp { - from { - transform: scale(0.8); - opacity: 0; - } - to { - transform: scale(1); - opacity: 1; - } - } - - @keyframes textSlideIn { - from { - transform: translateY(100px); - opacity: 0; - } - to { - transform: translateY(0); - opacity: 1; - } - } - - @keyframes textFadeIn { - to { - transform: translateX(0); - opacity: 1; - } - } - - @keyframes amountFadeIn { - to { - transform: translateX(0); - opacity: 1; - } }` script := fmt.Sprintf(` -let widgetUrl = 'http://212.60.21.70:8002/api'; -let ttsUrl = 'http://212.60.21.70:8005/api/tts'; +let widgetUrl = 'http://localhost:8002/api'; +let ttsUrl = 'http://147.45.237.174/api/tts'; function createTextWithAmount(text, amount) { const container = document.createElement('div'); @@ -104,7 +62,7 @@ function createTextWithAmount(text, amount) { const amountElem = document.createElement('div'); amountElem.className = 'donation-amount'; - amountElem.textContent = '₽' + amount; + amountElem.textContent = '$' + amount; container.appendChild(textElem); container.appendChild(amountElem); @@ -240,6 +198,7 @@ document.addEventListener('DOMContentLoaded', widgetView);`, streamerID) +