Spaces:
Running
Running
Add 2 files
Browse files- README.md +7 -5
- index.html +397 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: facepump
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,397 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 6 |
+
<title>Solana AI Meme Token Creator</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
+
<style>
|
| 11 |
+
body {
|
| 12 |
+
font-family: 'Poppins', sans-serif;
|
| 13 |
+
background: linear-gradient(135deg, #1a1b2f 0%, #2a2b3d 100%);
|
| 14 |
+
min-height: 100vh;
|
| 15 |
+
color: #fff;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.gradient-text {
|
| 19 |
+
background: linear-gradient(90deg, #9945FF 0%, #14F195 100%);
|
| 20 |
+
-webkit-background-clip: text;
|
| 21 |
+
background-clip: text;
|
| 22 |
+
color: transparent;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.glass-card {
|
| 26 |
+
background: rgba(255, 255, 255, 0.05);
|
| 27 |
+
backdrop-filter: blur(10px);
|
| 28 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 29 |
+
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.pulse-animation {
|
| 33 |
+
animation: pulse 2s infinite;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
@keyframes pulse {
|
| 37 |
+
0% {
|
| 38 |
+
box-shadow: 0 0 0 0 rgba(153, 69, 255, 0.7);
|
| 39 |
+
}
|
| 40 |
+
70% {
|
| 41 |
+
box-shadow: 0 0 0 10px rgba(153, 69, 255, 0);
|
| 42 |
+
}
|
| 43 |
+
100% {
|
| 44 |
+
box-shadow: 0 0 0 0 rgba(153, 69, 255, 0);
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.token-preview {
|
| 49 |
+
transition: all 0.3s ease;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.token-preview:hover {
|
| 53 |
+
transform: translateY(-5px);
|
| 54 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
|
| 55 |
+
}
|
| 56 |
+
</style>
|
| 57 |
+
</head>
|
| 58 |
+
<body class="min-h-screen flex flex-col">
|
| 59 |
+
<!-- Header -->
|
| 60 |
+
<header class="py-6 px-4 sm:px-6 lg:px-8">
|
| 61 |
+
<div class="flex justify-between items-center">
|
| 62 |
+
<div class="flex items-center space-x-2">
|
| 63 |
+
<img src="https://solana.com/src/img/branding/solanaLogoMark.svg" alt="Solana Logo" class="h-8 w-8">
|
| 64 |
+
<h1 class="text-2xl font-bold gradient-text">Solana AI Meme Creator</h1>
|
| 65 |
+
</div>
|
| 66 |
+
<div id="wallet-connect" class="flex items-center space-x-4">
|
| 67 |
+
<button id="connect-wallet-btn" class="px-4 py-2 bg-gradient-to-r from-purple-500 to-green-500 text-white rounded-full font-medium hover:opacity-90 transition">
|
| 68 |
+
Connect Wallet
|
| 69 |
+
</button>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
</header>
|
| 73 |
+
|
| 74 |
+
<!-- Main Content -->
|
| 75 |
+
<main class="flex-grow flex flex-col items-center justify-center px-4 sm:px-6 lg:px-8 py-12">
|
| 76 |
+
<div class="w-full max-w-4xl mx-auto">
|
| 77 |
+
<div class="text-center mb-12">
|
| 78 |
+
<h2 class="text-4xl md:text-5xl font-bold mb-4">Create Your <span class="gradient-text">Meme Token</span> with AI</h2>
|
| 79 |
+
<p class="text-xl text-gray-300 max-w-2xl mx-auto">
|
| 80 |
+
Just describe your token idea with your voice and our AI will handle everything else - from naming to deployment on Solana!
|
| 81 |
+
</p>
|
| 82 |
+
</div>
|
| 83 |
+
|
| 84 |
+
<!-- Voice Input Section -->
|
| 85 |
+
<div class="glass-card rounded-2xl p-8 mb-8">
|
| 86 |
+
<div class="flex flex-col items-center">
|
| 87 |
+
<div id="voice-input-container" class="relative mb-6">
|
| 88 |
+
<button id="voice-btn" class="w-24 h-24 rounded-full bg-gradient-to-r from-purple-500 to-green-500 text-white flex items-center justify-center pulse-animation hover:scale-105 transition">
|
| 89 |
+
<i class="fas fa-microphone text-3xl"></i>
|
| 90 |
+
</button>
|
| 91 |
+
<div id="recording-indicator" class="absolute -top-2 -right-2 w-6 h-6 bg-red-500 rounded-full hidden"></div>
|
| 92 |
+
</div>
|
| 93 |
+
|
| 94 |
+
<div id="voice-feedback" class="w-full max-w-md text-center mb-6">
|
| 95 |
+
<p id="status-message" class="text-gray-300">Click the microphone and describe your meme token idea</p>
|
| 96 |
+
<div id="transcript-container" class="mt-4 p-4 bg-gray-800 rounded-lg hidden">
|
| 97 |
+
<p id="transcript" class="text-left"></p>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<div id="ai-thinking" class="hidden flex items-center space-x-2 text-gray-300">
|
| 102 |
+
<div class="flex space-x-1">
|
| 103 |
+
<div class="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style="animation-delay: 0s"></div>
|
| 104 |
+
<div class="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style="animation-delay: 0.2s"></div>
|
| 105 |
+
<div class="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style="animation-delay: 0.4s"></div>
|
| 106 |
+
</div>
|
| 107 |
+
<span>AI is creating your token...</span>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
|
| 112 |
+
<!-- Token Preview Section -->
|
| 113 |
+
<div id="token-preview-section" class="glass-card rounded-2xl p-8 hidden">
|
| 114 |
+
<h3 class="text-2xl font-bold mb-6 text-center">Your Token Preview</h3>
|
| 115 |
+
|
| 116 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
| 117 |
+
<!-- Token Info -->
|
| 118 |
+
<div class="token-preview bg-gray-800 rounded-xl p-6">
|
| 119 |
+
<h4 class="text-lg font-semibold mb-4">Token Details</h4>
|
| 120 |
+
<div class="space-y-3">
|
| 121 |
+
<div>
|
| 122 |
+
<p class="text-sm text-gray-400">Name</p>
|
| 123 |
+
<p id="token-name" class="font-medium">-</p>
|
| 124 |
+
</div>
|
| 125 |
+
<div>
|
| 126 |
+
<p class="text-sm text-gray-400">Symbol</p>
|
| 127 |
+
<p id="token-symbol" class="font-medium">-</p>
|
| 128 |
+
</div>
|
| 129 |
+
<div>
|
| 130 |
+
<p class="text-sm text-gray-400">Supply</p>
|
| 131 |
+
<p id="token-supply" class="font-medium">-</p>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
+
</div>
|
| 135 |
+
|
| 136 |
+
<!-- Token Logo -->
|
| 137 |
+
<div class="token-preview bg-gray-800 rounded-xl p-6 flex flex-col items-center justify-center">
|
| 138 |
+
<h4 class="text-lg font-semibold mb-4">Logo</h4>
|
| 139 |
+
<div id="token-logo" class="w-24 h-24 rounded-full bg-gray-700 flex items-center justify-center mb-4">
|
| 140 |
+
<i class="fas fa-image text-3xl text-gray-500"></i>
|
| 141 |
+
</div>
|
| 142 |
+
<p class="text-sm text-gray-400 text-center">AI Generated</p>
|
| 143 |
+
</div>
|
| 144 |
+
|
| 145 |
+
<!-- Token Description -->
|
| 146 |
+
<div class="token-preview bg-gray-800 rounded-xl p-6">
|
| 147 |
+
<h4 class="text-lg font-semibold mb-4">Description</h4>
|
| 148 |
+
<p id="token-description" class="text-sm text-gray-300">-</p>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
<div class="mt-8 flex justify-center">
|
| 153 |
+
<button id="deploy-btn" class="px-6 py-3 bg-gradient-to-r from-purple-500 to-green-500 text-white rounded-full font-medium hover:opacity-90 transition">
|
| 154 |
+
Deploy to Solana
|
| 155 |
+
</button>
|
| 156 |
+
</div>
|
| 157 |
+
</div>
|
| 158 |
+
|
| 159 |
+
<!-- Success Message -->
|
| 160 |
+
<div id="success-message" class="glass-card rounded-2xl p-8 text-center hidden">
|
| 161 |
+
<div class="mb-6">
|
| 162 |
+
<i class="fas fa-check-circle text-6xl text-green-500"></i>
|
| 163 |
+
</div>
|
| 164 |
+
<h3 class="text-2xl font-bold mb-4">Token Deployed Successfully!</h3>
|
| 165 |
+
<p id="success-details" class="text-gray-300 mb-6">Your meme token is now live on Solana.</p>
|
| 166 |
+
<div class="flex justify-center space-x-4">
|
| 167 |
+
<a id="view-token-link" href="#" target="_blank" class="px-6 py-2 bg-gray-800 text-white rounded-full font-medium hover:bg-gray-700 transition">
|
| 168 |
+
View Token
|
| 169 |
+
</a>
|
| 170 |
+
<a id="pump-fun-link" href="#" target="_blank" class="px-6 py-2 bg-gradient-to-r from-purple-500 to-green-500 text-white rounded-full font-medium hover:opacity-90 transition">
|
| 171 |
+
Open in Pump.fun
|
| 172 |
+
</a>
|
| 173 |
+
</div>
|
| 174 |
+
</div>
|
| 175 |
+
</div>
|
| 176 |
+
</main>
|
| 177 |
+
|
| 178 |
+
<!-- Footer -->
|
| 179 |
+
<footer class="py-6 px-4 sm:px-6 lg:px-8 text-center text-gray-400 text-sm">
|
| 180 |
+
<div class="flex flex-col md:flex-row justify-center items-center space-y-2 md:space-y-0 md:space-x-6">
|
| 181 |
+
<p>Powered by Solana, OpenAI, and Pump.fun</p>
|
| 182 |
+
<div class="flex space-x-4">
|
| 183 |
+
<a href="#" class="hover:text-white transition">Terms</a>
|
| 184 |
+
<a href="#" class="hover:text-white transition">Privacy</a>
|
| 185 |
+
<a href="#" class="hover:text-white transition">Docs</a>
|
| 186 |
+
</div>
|
| 187 |
+
</div>
|
| 188 |
+
</footer>
|
| 189 |
+
|
| 190 |
+
<script>
|
| 191 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 192 |
+
// DOM Elements
|
| 193 |
+
const connectWalletBtn = document.getElementById('connect-wallet-btn');
|
| 194 |
+
const voiceBtn = document.getElementById('voice-btn');
|
| 195 |
+
const recordingIndicator = document.getElementById('recording-indicator');
|
| 196 |
+
const transcriptContainer = document.getElementById('transcript-container');
|
| 197 |
+
const transcript = document.getElementById('transcript');
|
| 198 |
+
const statusMessage = document.getElementById('status-message');
|
| 199 |
+
const aiThinking = document.getElementById('ai-thinking');
|
| 200 |
+
const tokenPreviewSection = document.getElementById('token-preview-section');
|
| 201 |
+
const successMessage = document.getElementById('success-message');
|
| 202 |
+
|
| 203 |
+
// Token preview elements
|
| 204 |
+
const tokenName = document.getElementById('token-name');
|
| 205 |
+
const tokenSymbol = document.getElementById('token-symbol');
|
| 206 |
+
const tokenSupply = document.getElementById('token-supply');
|
| 207 |
+
const tokenDescription = document.getElementById('token-description');
|
| 208 |
+
const tokenLogo = document.getElementById('token-logo');
|
| 209 |
+
|
| 210 |
+
// Buttons
|
| 211 |
+
const deployBtn = document.getElementById('deploy-btn');
|
| 212 |
+
const viewTokenLink = document.getElementById('view-token-link');
|
| 213 |
+
const pumpFunLink = document.getElementById('pump-fun-link');
|
| 214 |
+
|
| 215 |
+
// State
|
| 216 |
+
let isRecording = false;
|
| 217 |
+
let recognition;
|
| 218 |
+
let walletConnected = false;
|
| 219 |
+
|
| 220 |
+
// Mock wallet connection
|
| 221 |
+
connectWalletBtn.addEventListener('click', function() {
|
| 222 |
+
if (!walletConnected) {
|
| 223 |
+
walletConnected = true;
|
| 224 |
+
connectWalletBtn.textContent = '0x7f...3a4b';
|
| 225 |
+
connectWalletBtn.classList.remove('from-purple-500', 'to-green-500');
|
| 226 |
+
connectWalletBtn.classList.add('bg-gray-800');
|
| 227 |
+
|
| 228 |
+
// Show tooltip with mock address
|
| 229 |
+
const tooltip = document.createElement('div');
|
| 230 |
+
tooltip.className = 'absolute z-10 mt-2 px-3 py-1 bg-gray-800 text-white text-sm rounded-md shadow-lg';
|
| 231 |
+
tooltip.textContent = '0x7f3a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9';
|
| 232 |
+
connectWalletBtn.appendChild(tooltip);
|
| 233 |
+
|
| 234 |
+
setTimeout(() => {
|
| 235 |
+
tooltip.remove();
|
| 236 |
+
}, 2000);
|
| 237 |
+
}
|
| 238 |
+
});
|
| 239 |
+
|
| 240 |
+
// Voice recognition setup
|
| 241 |
+
if ('webkitSpeechRecognition' in window) {
|
| 242 |
+
recognition = new webkitSpeechRecognition();
|
| 243 |
+
recognition.continuous = true;
|
| 244 |
+
recognition.interimResults = true;
|
| 245 |
+
|
| 246 |
+
recognition.onstart = function() {
|
| 247 |
+
isRecording = true;
|
| 248 |
+
voiceBtn.classList.add('from-red-500', 'to-yellow-500');
|
| 249 |
+
voiceBtn.classList.remove('from-purple-500', 'to-green-500');
|
| 250 |
+
recordingIndicator.classList.remove('hidden');
|
| 251 |
+
statusMessage.textContent = "Listening... Describe your meme token idea";
|
| 252 |
+
transcriptContainer.classList.add('hidden');
|
| 253 |
+
};
|
| 254 |
+
|
| 255 |
+
recognition.onresult = function(event) {
|
| 256 |
+
let interimTranscript = '';
|
| 257 |
+
let finalTranscript = '';
|
| 258 |
+
|
| 259 |
+
for (let i = event.resultIndex; i < event.results.length; i++) {
|
| 260 |
+
const transcript = event.results[i][0].transcript;
|
| 261 |
+
if (event.results[i].isFinal) {
|
| 262 |
+
finalTranscript += transcript;
|
| 263 |
+
} else {
|
| 264 |
+
interimTranscript += transcript;
|
| 265 |
+
}
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
if (finalTranscript) {
|
| 269 |
+
transcript.textContent = finalTranscript;
|
| 270 |
+
transcriptContainer.classList.remove('hidden');
|
| 271 |
+
processTokenCreation(finalTranscript);
|
| 272 |
+
}
|
| 273 |
+
};
|
| 274 |
+
|
| 275 |
+
recognition.onerror = function(event) {
|
| 276 |
+
console.error('Speech recognition error', event.error);
|
| 277 |
+
stopRecording();
|
| 278 |
+
statusMessage.textContent = "Error occurred. Please try again.";
|
| 279 |
+
};
|
| 280 |
+
|
| 281 |
+
recognition.onend = function() {
|
| 282 |
+
if (isRecording) {
|
| 283 |
+
// If recording was stopped unexpectedly, try to restart
|
| 284 |
+
recognition.start();
|
| 285 |
+
}
|
| 286 |
+
};
|
| 287 |
+
} else {
|
| 288 |
+
voiceBtn.disabled = true;
|
| 289 |
+
statusMessage.textContent = "Voice recognition not supported in your browser";
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
// Voice button click handler
|
| 293 |
+
voiceBtn.addEventListener('click', function() {
|
| 294 |
+
if (!walletConnected) {
|
| 295 |
+
statusMessage.textContent = "Please connect your wallet first";
|
| 296 |
+
return;
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
if (isRecording) {
|
| 300 |
+
stopRecording();
|
| 301 |
+
} else {
|
| 302 |
+
startRecording();
|
| 303 |
+
}
|
| 304 |
+
});
|
| 305 |
+
|
| 306 |
+
// Deploy button click handler
|
| 307 |
+
deployBtn.addEventListener('click', function() {
|
| 308 |
+
deployBtn.disabled = true;
|
| 309 |
+
deployBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Deploying...';
|
| 310 |
+
|
| 311 |
+
// Simulate deployment process
|
| 312 |
+
setTimeout(() => {
|
| 313 |
+
tokenPreviewSection.classList.add('hidden');
|
| 314 |
+
successMessage.classList.remove('hidden');
|
| 315 |
+
|
| 316 |
+
// Set success details
|
| 317 |
+
document.getElementById('success-details').textContent =
|
| 318 |
+
`${tokenName.textContent} (${tokenSymbol.textContent}) has been deployed successfully with ${tokenSupply.textContent} tokens.`;
|
| 319 |
+
|
| 320 |
+
// Set links (mock)
|
| 321 |
+
viewTokenLink.href = "https://solscan.io/token/mocktokenaddress";
|
| 322 |
+
pumpFunLink.href = "https://pump.fun/mocktokenaddress";
|
| 323 |
+
|
| 324 |
+
// Reset deploy button
|
| 325 |
+
setTimeout(() => {
|
| 326 |
+
deployBtn.disabled = false;
|
| 327 |
+
deployBtn.innerHTML = 'Deploy to Solana';
|
| 328 |
+
}, 2000);
|
| 329 |
+
}, 3000);
|
| 330 |
+
});
|
| 331 |
+
|
| 332 |
+
// Helper functions
|
| 333 |
+
function startRecording() {
|
| 334 |
+
if (recognition) {
|
| 335 |
+
recognition.start();
|
| 336 |
+
}
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
function stopRecording() {
|
| 340 |
+
isRecording = false;
|
| 341 |
+
if (recognition) {
|
| 342 |
+
recognition.stop();
|
| 343 |
+
}
|
| 344 |
+
voiceBtn.classList.remove('from-red-500', 'to-yellow-500');
|
| 345 |
+
voiceBtn.classList.add('from-purple-500', 'to-green-500');
|
| 346 |
+
recordingIndicator.classList.add('hidden');
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
function processTokenCreation(description) {
|
| 350 |
+
stopRecording();
|
| 351 |
+
statusMessage.textContent = "Processing your request...";
|
| 352 |
+
aiThinking.classList.remove('hidden');
|
| 353 |
+
|
| 354 |
+
// Simulate AI processing
|
| 355 |
+
setTimeout(() => {
|
| 356 |
+
aiThinking.classList.add('hidden');
|
| 357 |
+
|
| 358 |
+
// Generate mock token data based on description
|
| 359 |
+
const words = description.toLowerCase().split(' ');
|
| 360 |
+
const animals = ['dog', 'cat', 'frog', 'whale', 'shark', 'ape', 'bull', 'bear'];
|
| 361 |
+
const adjectives = ['super', 'mega', 'hyper', 'ultra', 'quantum', 'epic', 'legendary'];
|
| 362 |
+
const themes = ['moon', 'mars', 'earth', 'sun', 'galaxy', 'universe', 'cosmos'];
|
| 363 |
+
|
| 364 |
+
// Find matching words
|
| 365 |
+
let animalMatch = animals.find(a => words.includes(a)) || animals[Math.floor(Math.random() * animals.length)];
|
| 366 |
+
let adjMatch = adjectives.find(a => words.includes(a)) || adjectives[Math.floor(Math.random() * adjectives.length)];
|
| 367 |
+
let themeMatch = themes.find(t => words.includes(t)) || themes[Math.floor(Math.random() * themes.length)];
|
| 368 |
+
|
| 369 |
+
// Set token details
|
| 370 |
+
const name = `${adjMatch.charAt(0).toUpperCase() + adjMatch.slice(1)} ${animalMatch.charAt(0).toUpperCase() + animalMatch.slice(1)}`;
|
| 371 |
+
const symbol = `${adjMatch.substring(0, 2).toUpperCase()}${animalMatch.substring(0, 2).toUpperCase()}`;
|
| 372 |
+
const supply = Math.floor(Math.random() * 900000 + 100000).toLocaleString() + ",000,000";
|
| 373 |
+
const desc = `The ${name} token represents the ${themeMatch} ${animalMatch} movement. ${description}`;
|
| 374 |
+
|
| 375 |
+
tokenName.textContent = name;
|
| 376 |
+
tokenSymbol.textContent = symbol;
|
| 377 |
+
tokenSupply.textContent = supply;
|
| 378 |
+
tokenDescription.textContent = desc;
|
| 379 |
+
|
| 380 |
+
// Generate random logo color
|
| 381 |
+
const colors = ['from-purple-500 to-pink-500', 'from-green-400 to-blue-500', 'from-yellow-400 to-red-500', 'from-indigo-500 to-purple-500'];
|
| 382 |
+
const randomColor = colors[Math.floor(Math.random() * colors.length)];
|
| 383 |
+
|
| 384 |
+
tokenLogo.innerHTML = '';
|
| 385 |
+
const logoDiv = document.createElement('div');
|
| 386 |
+
logoDiv.className = `w-full h-full rounded-full bg-gradient-to-r ${randomColor} flex items-center justify-center text-white font-bold text-xl`;
|
| 387 |
+
logoDiv.textContent = symbol;
|
| 388 |
+
tokenLogo.appendChild(logoDiv);
|
| 389 |
+
|
| 390 |
+
// Show preview
|
| 391 |
+
tokenPreviewSection.classList.remove('hidden');
|
| 392 |
+
}, 2000);
|
| 393 |
+
}
|
| 394 |
+
});
|
| 395 |
+
</script>
|
| 396 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=ordlibrary/facepump" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 397 |
+
</html>
|