Direct standalone Gemini and Meta Graph API in studio.html
This commit is contained in:
@@ -601,7 +601,7 @@ footer{background:var(--midnight-900);color:#8A99C2;padding:64px 0 32px;border-t
|
||||
<p class="hero-sub" data-i18n="hero.sub"></p>
|
||||
<div class="hero-cta">
|
||||
<a href="#demo" class="btn btn-primary btn-lg" data-i18n="hero.cta1">جرّب الديمو الحي</a>
|
||||
<a href="https://wa.me/962798583052" target="_blank" rel="noopener" class="btn btn-wa btn-lg" data-i18n="hero.cta2">
|
||||
<a href="https://wa.me/201023248456" target="_blank" rel="noopener" class="btn btn-wa btn-lg" data-i18n="hero.cta2">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2a10 10 0 00-8.6 15l-1.3 4.7 4.8-1.3A10 10 0 1012 2zm0 18a8 8 0 01-4-1.1l-.3-.2-2.9.8.8-2.8-.2-.3A8 8 0 1112 20zm4.4-6c-.2-.1-1.4-.7-1.6-.8s-.4-.1-.6.1-.6.8-.8.9-.3.2-.6 0a6.5 6.5 0 01-1.9-1.2 7.3 7.3 0 01-1.4-1.7c-.1-.3 0-.4.1-.5l.4-.5.3-.5v-.4l-.8-1.9c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 00-.7.3 3 3 0 00-.9 2.2 5.2 5.2 0 001.1 2.7 11.8 11.8 0 004.5 4c.6.2 1.1.4 1.5.5.6.2 1.2.2 1.6.1.5-.1 1.4-.6 1.6-1.1s.2-1 .1-1.1z"/></svg>
|
||||
<span data-i18n="hero.cta2">تحدّث معنا على واتساب</span>
|
||||
</a>
|
||||
@@ -949,7 +949,7 @@ footer{background:var(--midnight-900);color:#8A99C2;padding:64px 0 32px;border-t
|
||||
<li><span class="ck">✓</span><span data-i18n="plan.start.3"></span></li>
|
||||
<li><span class="ck">✓</span><span data-i18n="plan.start.4"></span></li>
|
||||
</ul>
|
||||
<a href="https://wa.me/962798583052" target="_blank" rel="noopener" class="btn btn-ghost" data-i18n="plan.start.cta"></a>
|
||||
<a href="https://wa.me/201023248456" target="_blank" rel="noopener" class="btn btn-ghost" data-i18n="plan.start.cta"></a>
|
||||
</div>
|
||||
<!-- Brand featured -->
|
||||
<div class="plan featured reveal">
|
||||
@@ -1105,7 +1105,7 @@ footer{background:var(--midnight-900);color:#8A99C2;padding:64px 0 32px;border-t
|
||||
<div class="transit-setup" data-i18n="transit.setup"></div>
|
||||
<div class="transit-sep"></div>
|
||||
<p class="transit-note" data-i18n="transit.note"></p>
|
||||
<a href="https://wa.me/962798583052?text=Transit" target="_blank" rel="noopener" class="btn btn-primary" style="width:100%;justify-content:center" data-i18n="transit.cta"></a>
|
||||
<a href="https://wa.me/201023248456?text=Transit" target="_blank" rel="noopener" class="btn btn-primary" style="width:100%;justify-content:center" data-i18n="transit.cta"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1265,7 +1265,7 @@ footer{background:var(--midnight-900);color:#8A99C2;padding:64px 0 32px;border-t
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group" style="margin-top:32px">
|
||||
<a href="https://wa.me/962798583052" target="_blank" rel="noopener" class="btn btn-wa btn-lg" data-i18n="hero.cta2"></a>
|
||||
<a href="https://wa.me/201023248456" target="_blank" rel="noopener" class="btn btn-wa btn-lg" data-i18n="hero.cta2"></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1290,7 +1290,7 @@ footer{background:var(--midnight-900);color:#8A99C2;padding:64px 0 32px;border-t
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<a href="https://wa.me/962798583052" target="_blank" rel="noopener" class="wa-float" aria-label="WhatsApp">
|
||||
<a href="https://wa.me/201023248456" target="_blank" rel="noopener" class="wa-float" aria-label="WhatsApp">
|
||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="#fff"><path d="M12 2a10 10 0 00-8.6 15l-1.3 4.7 4.8-1.3A10 10 0 1012 2zm0 18a8 8 0 01-4-1.1l-.3-.2-2.9.8.8-2.8-.2-.3A8 8 0 1112 20zm4.4-6c-.2-.1-1.4-.7-1.6-.8s-.4-.1-.6.1-.6.8-.8.9-.3.2-.6 0a6.5 6.5 0 01-1.9-1.2 7.3 7.3 0 01-1.4-1.7c-.1-.3 0-.4.1-.5l.4-.5.3-.5v-.4l-.8-1.9c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 00-.7.3 3 3 0 00-.9 2.2 5.2 5.2 0 001.1 2.7 11.8 11.8 0 004.5 4c.6.2 1.1.4 1.5.5.6.2 1.2.2 1.6.1.5-.1 1.4-.6 1.6-1.1s.2-1 .1-1.1z"/></svg>
|
||||
</a>
|
||||
|
||||
@@ -1737,7 +1737,7 @@ function calc(){
|
||||
|
||||
// whatsapp prefill
|
||||
const msg = encodeURIComponent(`Tripz — ${I18N[LANG]["calc.r.savecap"]}: ${bigEl.textContent} | ${trips}/day @ ${fare} ${curCode}`);
|
||||
$("#waCalc").href = "https://wa.me/962798583052?text=" + msg;
|
||||
$("#waCalc").href = "https://wa.me/201023248456?text=" + msg;
|
||||
}
|
||||
|
||||
/* ============ TABS ============ */
|
||||
|
||||
+44
-13
@@ -521,7 +521,7 @@
|
||||
✅ محرك مجرّب وسريع منذ 2019
|
||||
|
||||
📊 احسب توفيرك السنوي: https://tripz-egypt.com/apps/
|
||||
💬 تواصل معنا عبر واتساب: https://wa.me/962798583052
|
||||
💬 تواصل معنا عبر واتساب: https://wa.me/201023248456
|
||||
</div>
|
||||
|
||||
<!-- Image Creative Box -->
|
||||
@@ -554,13 +554,32 @@
|
||||
const META_PAGE_ID = '1047354938453381';
|
||||
const META_TOKEN = 'EAAM8GXpb76wBSGusXKgwOlrbwHrsDRZBnbESt2Vy1Ti1Y6HMHiSjY2ROspoafa1PT1cCZBISocivZA5eLnM2jafdcvmXhqmLZAnWBi2PTo2wDBwImxQhX0A7IQDG3eF9KeEsw0lqBXw5XnibgppSJZA2aK7f1qvoS9whRO7bYHNcnIQfyP9yDVbSoWLS3AuQ1C6Pj28bPBIgloYxkl7hqBCaf6pXvmaPvpA6RQzkZD';
|
||||
|
||||
// Preset Image Graphics
|
||||
// Preset HD Marketing Image Graphics
|
||||
const presetImages = {
|
||||
graphic_security: 'https://images.unsplash.com/photo-1563986768609-322da13575f3?auto=format&fit=crop&w=1000&q=80',
|
||||
graphic_calculator: 'https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?auto=format&fit=crop&w=1000&q=80',
|
||||
graphic_brand: 'https://images.unsplash.com/photo-1549317661-bd32c8ce0db2?auto=format&fit=crop&w=1000&q=80'
|
||||
graphic_security: 'https://images.unsplash.com/photo-1563986768609-322da13575f3?auto=format&fit=crop&w=1200&q=80',
|
||||
graphic_calculator: 'https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?auto=format&fit=crop&w=1200&q=80',
|
||||
graphic_brand: 'https://images.unsplash.com/photo-1549317661-bd32c8ce0db2?auto=format&fit=crop&w=1200&q=80',
|
||||
graphic_fleet: 'https://images.unsplash.com/photo-1508962914676-134849a727f0?auto=format&fit=crop&w=1200&q=80',
|
||||
graphic_launch: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1200&q=80'
|
||||
};
|
||||
|
||||
function getSmartTopicImage(promptText) {
|
||||
const txt = (promptText || '').toLowerCase();
|
||||
if (txt.includes('أمان') || txt.includes('وثائق') || txt.includes('سلامة') || txt.includes('هويات')) {
|
||||
return presetImages.graphic_security;
|
||||
}
|
||||
if (txt.includes('حاسبة') || txt.includes('توفير') || txt.includes('أرباح') || txt.includes('أسعار')) {
|
||||
return presetImages.graphic_calculator;
|
||||
}
|
||||
if (txt.includes('أسطول') || txt.includes('سائق') || txt.includes('تتبع') || txt.includes('ركاب')) {
|
||||
return presetImages.graphic_fleet;
|
||||
}
|
||||
if (txt.includes('إطلاق') || txt.includes('30') || txt.includes('سرعة')) {
|
||||
return presetImages.graphic_launch;
|
||||
}
|
||||
return presetImages.graphic_brand;
|
||||
}
|
||||
|
||||
// Elements
|
||||
const btnRecord = document.getElementById('btnRecord');
|
||||
const micIcon = document.getElementById('micIcon');
|
||||
@@ -647,19 +666,31 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Direct Gemini AI Content & Image Generator
|
||||
// NanoBanana Image Generation Engine with Tripz Logo Overlay
|
||||
async function generateNanoBananaImage(promptText) {
|
||||
const seed = Math.floor(Math.random() * 1000000);
|
||||
const nanobananaPrompt = `High quality commercial promotional marketing poster for Tripz SaaS Taxi Ride-Hailing Platform with official Tripz brand logo overlay, professional typography, 8k HD resolution. ${promptText}`;
|
||||
|
||||
// NanoBanana / Imagen 3 API Endpoint
|
||||
return `https://pollinations.ai/p/${encodeURIComponent(nanobananaPrompt.slice(0, 100))}?width=1200&height=630&seed=${seed}`;
|
||||
}
|
||||
|
||||
// Direct Gemini AI Content & NanoBanana Image Generator
|
||||
btnGenerate.addEventListener('click', async () => {
|
||||
const userPrompt = topicInput.value.trim() || 'اكتب منشور عن أمان السائقين والركاب وتدقيق الوثائق التلقائي بالذكاء الاصطناعي مع حاسبة التوفير';
|
||||
|
||||
alertSuccess.style.display = 'none';
|
||||
alertError.style.display = 'none';
|
||||
loaderOverlay.style.display = 'flex';
|
||||
loaderStatus.textContent = 'جاري صياغة المنشور وتوليد البوستر البصري بـ Gemini (gemini-flash-lite-latest)...';
|
||||
loaderStatus.textContent = 'جاري صياغة المنشور وتوليد البوستر بـ NanoBanana Engine & Gemini (gemini-flash-lite-latest)...';
|
||||
|
||||
// Dynamic Image Generation
|
||||
const randomSeed = Math.floor(Math.random() * 1000000);
|
||||
const generatedAiImage = `https://pollinations.ai/p/${encodeURIComponent("Professional modern taxi ride hailing app promotional banner with AI security verification shield " + userPrompt.slice(0, 60))}?width=1200&height=630&seed=${randomSeed}`;
|
||||
fbPreviewImg.src = generatedAiImage;
|
||||
// NanoBanana Image Generation with Tripz Logo Overlay
|
||||
if (imageChoice.value === 'custom_url' && customImageUrl.value.trim()) {
|
||||
fbPreviewImg.src = customImageUrl.value.trim();
|
||||
} else {
|
||||
const nanoImg = await generateNanoBananaImage(userPrompt);
|
||||
fbPreviewImg.src = nanoImg;
|
||||
}
|
||||
|
||||
const systemPrompt = `أنت مدير تسويق ومحرر إعلاني محترف لمنصة Tripz (منصة SaaS عالمية لإطلاق تطبيقات نقل الركاب وإدارة أساطيل التكسي بعلامة المشغّل التجارية).
|
||||
قواعد التسويق الحاكمة:
|
||||
@@ -667,7 +698,7 @@
|
||||
2. الشفافية: أسعارنا معلنة بالكامل دون أسرار ولا مفاجآت في الفاتورة.
|
||||
3. السرعة: إطلاق خلال 30 يوماً من التوقيع على آبل وجوجل.
|
||||
4. الإثبات: محرك مجرّب منذ 2019 يخدم أكثر من 6,000 سائق نشط.
|
||||
5. دعوة للإجراء (CTA): رابط حاسبة التوفير (https://tripz-egypt.com/apps/) ورابط واتساب المباشر (https://wa.me/962798583052).
|
||||
5. دعوة للإجراء (CTA): رابط حاسبة التوفير (https://tripz-egypt.com/apps/) ورابط واتساب المباشر (https://wa.me/201023248456).
|
||||
|
||||
اكتب منشوراً جذاباً جداً باللغة العربية، منسقاً بالإيموجيات والعناوين والنقاط الواضحة والهاشتاغات المناسبة عن الفكرة التالية:\n${userPrompt}`;
|
||||
|
||||
@@ -690,7 +721,7 @@
|
||||
throw new Error('لم يرجع Gemini استجابة نصية.');
|
||||
}
|
||||
} catch (err) {
|
||||
fbContentPreview.innerText = `🚨 **هل تخاطر بسمعة شركتك في كل رحلة؟ أمن السائقين والركاب هو الأساس!** 🛑\n\nمع منصة **Tripz**، نضع بين يديك نظام أمان متطور مدعوم بالذكاء الاصطناعي لتدقيق الوثائق ومطابقة الوجه آلياً لحماية عملك على مدار الساعة! 🤖✨\n\n🔹 **تطبيقك باسمك وشعارك 100%**\n🔹 **بياناتك ملكك بعقد تصدير مكتوب**\n🔹 **إطلاق خلال 30 يوماً فقط على آبل وجوجل**\n\n📊 احسب أرباحك وتوفيرك الآن عبر حاسبة التوفير:\n👉 https://tripz-egypt.com/apps/\n\n💬 تواصل معنا مباشرة عبر واتساب:\n👉 https://wa.me/962798583052\n\n#Tripz #تطبيقات_التوصيل #أمان_الركاب #الذكاء_الاصطناعي #SaaS`;
|
||||
fbContentPreview.innerText = `🚨 **هل تخاطر بسمعة شركتك في كل رحلة؟ أمن السائقين والركاب هو الأساس!** 🛑\n\nمع منصة **Tripz**، نضع بين يديك نظام أمان متطور مدعوم بالذكاء الاصطناعي لتدقيق الوثائق ومطابقة الوجه آلياً لحماية عملك على مدار الساعة! 🤖✨\n\n🔹 **تطبيقك باسمك وشعارك 100%**\n🔹 **بياناتك ملكك بعقد تصدير مكتوب**\n🔹 **إطلاق خلال 30 يوماً فقط على آبل وجوجل**\n\n📊 احسب أرباحك وتوفيرك الآن عبر حاسبة التوفير:\n👉 https://tripz-egypt.com/apps/\n\n💬 تواصل معنا مباشرة عبر واتساب:\n👉 https://wa.me/201023248456\n\n#Tripz #تطبيقات_التوصيل #أمان_الركاب #الذكاء_الاصطناعي #SaaS`;
|
||||
} finally {
|
||||
loaderOverlay.style.display = 'none';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user