add fix
This commit is contained in:
parent
dfe59e9ee1
commit
daf0dc891d
@ -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)
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>%s</style>
|
||||
</head>
|
||||
<body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user