Spaces:
Running

la9999 / index.html
lah89's picture
Add 3 files
d2ee7f1 verified
Raw History Blame Contribute Delete
46.1 kB
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>مولد الواجهات الذكي | أنشئ واجهات تطبيقات ومواقع بسهولة</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');
body {
font-family: 'Tajawal', sans-serif;
background-color: #f8fafc;
}
.gradient-bg {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}
.preview-window {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
border-radius: 12px;
overflow: hidden;
}
.preview-header {
height: 28px;
background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 100%);
display: flex;
align-items: center;
padding: 0 10px;
}
.preview-dot {
width: 12px;
height: 12px;
border-radius: 50%;
margin-left: 6px;
}
.animate-pulse-slow {
animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.floating {
animation: floating 6s ease-in-out infinite;
}
@keyframes floating {
0% { transform: translateY(0px); }
50% { transform: translateY(-15px); }
100% { transform: translateY(0px); }
}
/* تحسينات لعرض الكود */
.code-container {
background-color: #1e293b;
color: #f8fafc;
border-radius: 8px;
padding: 1rem;
overflow-x: auto;
font-family: 'Courier New', monospace;
direction: ltr;
text-align: left;
}
.code-tabs {
display: flex;
border-bottom: 1px solid #334155;
margin-bottom: 1rem;
}
.code-tab {
padding: 0.5rem 1rem;
cursor: pointer;
color: #94a3b8;
border-bottom: 2px solid transparent;
}
.code-tab.active {
color: #f8fafc;
border-bottom: 2px solid #6366f1;
}
.code-content {
display: none;
}
.code-content.active {
display: block;
}
/* تحسينات للواجهة المولدة */
.generated-ui {
transition: all 0.3s ease;
}
.ui-element {
border: 1px dashed #ccc;
padding: 8px;
margin-bottom: 10px;
border-radius: 4px;
position: relative;
}
.ui-element:hover {
border-color: #6366f1;
background-color: #f0f4ff;
}
.element-actions {
position: absolute;
top: -10px;
left: -10px;
display: none;
}
.ui-element:hover .element-actions {
display: flex;
}
/* تحسينات للتحرير المباشر */
.editable {
outline: none;
min-height: 20px;
}
.editable:focus {
background-color: #f0f4ff;
border-bottom: 1px solid #6366f1;
}
</style>
</head>
<body class="text-gray-800">
<!-- Header -->
<header class="gradient-bg text-white">
<div class="container mx-auto px-4 py-12">
<div class="flex flex-col md:flex-row items-center justify-between">
<div class="md:w-1/2 mb-8 md:mb-0">
<h1 class="text-4xl md:text-5xl font-bold mb-4">أنشئ واجهات تطبيقات ومواقع بكل سهولة</h1>
<p class="text-xl mb-6">صف ما تريده وسنقوم بإنشاء واجهة تطبيق أو موقع احترافية لك في دقائق</p>
<div class="flex flex-col sm:flex-row gap-3">
<a href="#generator" class="bg-white text-indigo-600 hover:bg-gray-100 px-6 py-3 rounded-lg font-bold text-center transition duration-300">جرب الآن</a>
<a href="#features" class="border-2 border-white hover:bg-white hover:bg-opacity-10 px-6 py-3 rounded-lg font-bold text-center transition duration-300">المميزات</a>
</div>
</div>
<div class="md:w-1/2 relative">
<div class="preview-window mx-auto max-w-md">
<div class="preview-header">
<div class="preview-dot bg-red-500"></div>
<div class="preview-dot bg-yellow-500"></div>
<div class="preview-dot bg-green-500"></div>
</div>
<div class="bg-white p-6 h-80 flex items-center justify-center">
<div class="text-center">
<i class="fas fa-magic text-5xl text-purple-500 mb-4 floating"></i>
<h3 class="text-xl font-bold mb-2">مولد الواجهات الذكي</h3>
<p class="text-gray-600">أدخل وصفك وسنقوم بإنشاء الواجهة لك</p>
</div>
</div>
</div>
<div class="absolute -bottom-6 -left-6 w-32 h-32 bg-purple-300 rounded-full opacity-20"></div>
<div class="absolute -top-6 -right-6 w-24 h-24 bg-indigo-300 rounded-full opacity-20"></div>
</div>
</div>
</div>
</header>
<!-- Features -->
<section id="features" class="py-16 bg-white">
<div class="container mx-auto px-4">
<div class="text-center mb-16">
<h2 class="text-3xl font-bold mb-4">كيف يعمل مولد الواجهات لدينا؟</h2>
<p class="text-gray-600 max-w-2xl mx-auto">نقدم لك أسهل طريقة لإنشاء واجهات تطبيقات ومواقع احترافية دون الحاجة إلى خبرة في البرمجة أو التصميم</p>
</div>
<div class="grid md:grid-cols-3 gap-8">
<div class="bg-gray-50 p-8 rounded-xl hover:shadow-lg transition duration-300">
<div class="w-16 h-16 gradient-bg rounded-lg flex items-center justify-center text-white text-2xl mb-6">
<i class="fas fa-edit"></i>
</div>
<h3 class="text-xl font-bold mb-3">أدخل وصفك</h3>
<p class="text-gray-600">صف لنا التطبيق أو الموقع الذي تريده بكلماتك الخاصة. كلما كانت التفاصيل أكثر، كانت النتيجة أفضل.</p>
</div>
<div class="bg-gray-50 p-8 rounded-xl hover:shadow-lg transition duration-300">
<div class="w-16 h-16 gradient-bg rounded-lg flex items-center justify-center text-white text-2xl mb-6">
<i class="fas fa-robot"></i>
</div>
<h3 class="text-xl font-bold mb-3">الذكاء الاصطناعي</h3>
<p class="text-gray-600">نستخدم أحدث تقنيات الذكاء الاصطناعي لتحليل وصفك وإنشاء واجهة تناسب احتياجاتك بدقة.</p>
</div>
<div class="bg-gray-50 p-8 rounded-xl hover:shadow-lg transition duration-300">
<div class="w-16 h-16 gradient-bg rounded-lg flex items-center justify-center text-white text-2xl mb-6">
<i class="fas fa-download"></i>
</div>
<h3 class="text-xl font-bold mb-3">احصل على النتيجة</h3>
<p class="text-gray-600">ستحصل على واجهة جاهزة للاستخدام مع كود HTML و CSS و JavaScript يمكنك تعديله أو تنزيله مباشرة.</p>
</div>
</div>
</div>
</section>
<!-- Generator -->
<section id="generator" class="py-16 bg-gray-50">
<div class="container mx-auto px-4">
<div class="text-center mb-12">
<h2 class="text-3xl font-bold mb-4">أنشئ واجهتك الآن</h2>
<p class="text-gray-600 max-w-2xl mx-auto">صف لنا التطبيق أو الموقع الذي تريده وسنقوم بإنشاء الواجهة لك</p>
</div>
<div class="max-w-6xl mx-auto bg-white rounded-xl shadow-md overflow-hidden">
<div class="md:flex">
<div class="md:w-1/2 p-8">
<div class="mb-6">
<label for="app-type" class="block text-sm font-medium text-gray-700 mb-2">نوع الواجهة</label>
<select id="app-type" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500">
<option value="website">موقع ويب</option>
<option value="mobile">تطبيق جوال</option>
<option value="dashboard">لوحة تحكم</option>
<option value="ecommerce">متجر إلكتروني</option>
<option value="landing">صفحة هبوط</option>
<option value="social">شبكة اجتماعية</option>
<option value="blog">مدونة</option>
</select>
</div>
<div class="mb-6">
<label for="app-style" class="block text-sm font-medium text-gray-700 mb-2">النمط التصميمي</label>
<select id="app-style" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500">
<option value="modern">حديث</option>
<option value="minimal">بسيط</option>
<option value="elegant">أنيق</option>
<option value="bold">جريء</option>
<option value="professional">احترافي</option>
<option value="creative">إبداعي</option>
</select>
</div>
<div class="mb-6">
<label for="color-scheme" class="block text-sm font-medium text-gray-700 mb-2">نظام الألوان</label>
<div class="flex flex-wrap gap-2">
<button class="w-8 h-8 rounded-full bg-indigo-500 border-2 border-white shadow-md color-btn" data-color="indigo"></button>
<button class="w-8 h-8 rounded-full bg-purple-500 border-2 border-white shadow-md color-btn" data-color="purple"></button>
<button class="w-8 h-8 rounded-full bg-blue-500 border-2 border-white shadow-md color-btn" data-color="blue"></button>
<button class="w-8 h-8 rounded-full bg-green-500 border-2 border-white shadow-md color-btn" data-color="green"></button>
<button class="w-8 h-8 rounded-full bg-red-500 border-2 border-white shadow-md color-btn" data-color="red"></button>
<button class="w-8 h-8 rounded-full bg-yellow-500 border-2 border-white shadow-md color-btn" data-color="yellow"></button>
<button class="w-8 h-8 rounded-full bg-pink-500 border-2 border-white shadow-md color-btn" data-color="pink"></button>
<button class="w-8 h-8 rounded-full bg-gray-500 border-2 border-white shadow-md color-btn" data-color="gray"></button>
</div>
</div>
<div class="mb-6">
<label for="app-description" class="block text-sm font-medium text-gray-700 mb-2">وصف الواجهة</label>
<textarea id="app-description" rows="8" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500" placeholder="صف لنا الواجهة التي تريدها بالتفصيل... مثال: أريد واجهة لمتجر إلكتروني للملابس مع شريط بحث في الأعلى، وعرض للمنتجات بطريقة شبكية، وعربة تسوق في الزاوية اليمنى، وصفحة تفاصيل المنتج تحتوي على صور متعددة وألوان متاحة..."></textarea>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">إضافات خاصة</label>
<div class="grid grid-cols-2 gap-3">
<label class="flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-purple-600 feature-checkbox" data-feature="dark-mode">
<span class="mr-2 text-gray-700">وضع الظلام</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-purple-600 feature-checkbox" data-feature="rtl">
<span class="mr-2 text-gray-700">دعم العربية</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-purple-600 feature-checkbox" data-feature="responsive">
<span class="mr-2 text-gray-700">متجاوب</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-purple-600 feature-checkbox" data-feature="animations">
<span class="mr-2 text-gray-700">حركات</span>
</label>
</div>
</div>
<button id="generate-btn" class="w-full gradient-bg text-white py-3 px-6 rounded-lg font-bold hover:opacity-90 transition duration-300 flex items-center justify-center">
<i class="fas fa-magic mr-2"></i> أنشئ الواجهة
</button>
</div>
<div class="md:w-1/2 bg-gray-100 p-8 flex flex-col">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold">معاينة الواجهة</h3>
<div class="flex space-x-2">
<button id="desktop-preview" class="px-3 py-1 bg-gray-200 rounded-md text-sm active"><i class="fas fa-desktop"></i></button>
<button id="tablet-preview" class="px-3 py-1 bg-gray-200 rounded-md text-sm"><i class="fas fa-tablet-alt"></i></button>
<button id="mobile-preview" class="px-3 py-1 bg-gray-200 rounded-md text-sm"><i class="fas fa-mobile-alt"></i></button>
</div>
</div>
<div id="preview-container" class="preview-window flex-1">
<div class="preview-header">
<div class="preview-dot bg-red-500"></div>
<div class="preview-dot bg-yellow-500"></div>
<div class="preview-dot bg-green-500"></div>
</div>
<div class="bg-white p-4 h-full overflow-auto">
<div id="preview-content" class="generated-ui min-h-full flex items-center justify-center">
<div class="text-center p-6">
<i class="fas fa-magic text-5xl text-purple-500 mb-4"></i>
<h3 class="text-xl font-bold mb-2">الواجهة ستظهر هنا</h3>
<p class="text-gray-600">أدخل وصفك واضغط على "أنشئ الواجهة"</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Generated UI Tools -->
<section id="ui-tools" class="py-8 bg-white border-t hidden">
<div class="container mx-auto px-4">
<div class="flex flex-wrap justify-center gap-4">
<button id="edit-mode-btn" class="bg-indigo-600 text-white px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-edit mr-2"></i> وضع التحرير
</button>
<button id="add-element-btn" class="bg-green-600 text-white px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-plus mr-2"></i> إضافة عنصر
</button>
<button id="change-color-btn" class="bg-purple-600 text-white px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-palette mr-2"></i> تغيير الألوان
</button>
<button id="export-code-btn" class="bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-code mr-2"></i> تصدير الكود
</button>
<button id="download-btn" class="bg-gray-800 text-white px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-download mr-2"></i> تنزيل المشروع
</button>
</div>
</div>
</section>
<!-- Code Preview Section -->
<section id="code-section" class="py-16 bg-gray-50 hidden">
<div class="container mx-auto px-4">
<div class="text-center mb-12">
<h2 class="text-3xl font-bold mb-4">الكود المولد</h2>
<p class="text-gray-600 max-w-2xl mx-auto">يمكنك نسخ الكود أو تعديله قبل التنزيل</p>
</div>
<div class="max-w-5xl mx-auto bg-white rounded-xl shadow-md overflow-hidden">
<div class="p-6">
<div class="code-tabs mb-4">
<div class="code-tab active" data-tab="html">HTML</div>
<div class="code-tab" data-tab="css">CSS</div>
<div class="code-tab" data-tab="js">JavaScript</div>
</div>
<div class="code-container">
<div class="code-content active" id="html-code">
<pre><code id="html-code-content">سيظهر كود HTML هنا بعد إنشاء الواجهة</code></pre>
</div>
<div class="code-content" id="css-code">
<pre><code id="css-code-content">سيظهر كود CSS هنا بعد إنشاء الواجهة</code></pre>
</div>
<div class="code-content" id="js-code">
<pre><code id="js-code-content">سيظهر كود JavaScript هنا بعد إنشاء الواجهة</code></pre>
</div>
</div>
<div class="mt-6 flex justify-center gap-4">
<button id="copy-html-btn" class="bg-indigo-600 text-white px-6 py-2 rounded-lg font-bold hover:bg-indigo-700 transition duration-300 flex items-center">
<i class="fas fa-copy mr-2"></i> نسخ HTML
</button>
<button id="copy-css-btn" class="bg-blue-600 text-white px-6 py-2 rounded-lg font-bold hover:bg-blue-700 transition duration-300 flex items-center">
<i class="fas fa-copy mr-2"></i> نسخ CSS
</button>
<button id="copy-js-btn" class="bg-purple-600 text-white px-6 py-2 rounded-lg font-bold hover:bg-purple-700 transition duration-300 flex items-center">
<i class="fas fa-copy mr-2"></i> نسخ JS
</button>
<button id="download-all-btn" class="bg-gray-800 text-white px-6 py-2 rounded-lg font-bold hover:bg-gray-900 transition duration-300 flex items-center">
<i class="fas fa-download mr-2"></i> تنزيل الكل
</button>
</div>
</div>
</div>
</div>
</section>
<!-- Examples -->
<section class="py-16 bg-white">
<div class="container mx-auto px-4">
<div class="text-center mb-12">
<h2 class="text-3xl font-bold mb-4">نماذج من الواجهات المنشأة</h2>
<p class="text-gray-600 max-w-2xl mx-auto">بعض الأمثلة على الواجهات التي يمكن إنشاؤها باستخدام أداتنا</p>
</div>
<div class="grid md:grid-cols-3 gap-6">
<div class="bg-gray-50 rounded-xl overflow-hidden shadow-md hover:shadow-lg transition duration-300">
<div class="h-48 bg-gradient-to-r from-blue-500 to-blue-400 flex items-center justify-center">
<i class="fas fa-shopping-bag text-white text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-2">متجر إلكتروني</h3>
<p class="text-gray-600 mb-4">واجهة متجر إلكتروني متكاملة مع عربة تسوق وعرض للمنتجات</p>
<span class="inline-block bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">موقع ويب</span>
</div>
</div>
<div class="bg-gray-50 rounded-xl overflow-hidden shadow-md hover:shadow-lg transition duration-300">
<div class="h-48 bg-gradient-to-r from-purple-500 to-purple-400 flex items-center justify-center">
<i class="fas fa-mobile-alt text-white text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-2">تطبيق جوال</h3>
<p class="text-gray-600 mb-4">واجهة تطبيق جوال حديثة مع شريط تنقل سفلي</p>
<span class="inline-block bg-purple-100 text-purple-800 px-3 py-1 rounded-full text-sm font-medium">تطبيق</span>
</div>
</div>
<div class="bg-gray-50 rounded-xl overflow-hidden shadow-md hover:shadow-lg transition duration-300">
<div class="h-48 bg-gradient-to-r from-green-500 to-green-400 flex items-center justify-center">
<i class="fas fa-chart-line text-white text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-2">لوحة تحكم</h3>
<p class="text-gray-600 mb-4">واجهة لوحة تحكم مع رسوم بيانية وإحصائيات</p>
<span class="inline-block bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm font-medium">لوحة تحكم</span>
</div>
</div>
</div>
</div>
</section>
<!-- CTA -->
<section class="gradient-bg text-white py-16">
<div class="container mx-auto px-4 text-center">
<h2 class="text-3xl font-bold mb-6">جاهز لإنشاء واجهتك الخاصة؟</h2>
<p class="text-xl mb-8 max-w-2xl mx-auto">لا تضيع وقتك في التصميم من الصفر. وفر ساعات من العمل وابدأ بواجهة احترافية جاهزة</p>
<a href="#generator" class="bg-white text-indigo-600 hover:bg-gray-100 px-8 py-4 rounded-lg font-bold text-lg inline-block transition duration-300">
<i class="fas fa-play mr-2"></i> ابدأ الآن
</a>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid md:grid-cols-4 gap-8 mb-8">
<div>
<h3 class="text-xl font-bold mb-4">مولد الواجهات الذكي</h3>
<p class="text-gray-400">أداة متقدمة لإنشاء واجهات تطبيقات ومواقع ويب بسهولة وسرعة.</p>
</div>
<div>
<h4 class="text-lg font-bold mb-4">روابط سريعة</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">الصفحة الرئيسية</a></li>
<li><a href="#features" class="text-gray-400 hover:text-white transition duration-300">المميزات</a></li>
<li><a href="#generator" class="text-gray-400 hover:text-white transition duration-300">أنشئ واجهة</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">الأسئلة الشائعة</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">الاتصال</h4>
<ul class="space-y-2">
<li class="flex items-center text-gray-400"><i class="fas fa-envelope mr-2"></i> info@uigenerator.com</li>
<li class="flex items-center text-gray-400"><i class="fas fa-phone mr-2"></i> +966 12 345 6789</li>
<li class="flex items-center text-gray-400"><i class="fas fa-map-marker-alt mr-2"></i> الرياض، السعودية</li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">تابعنا</h4>
<div class="flex space-x-4">
<a href="#" class="w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-indigo-600 transition duration-300">
<i class="fab fa-twitter"></i>
</a>
<a href="#" class="w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-blue-600 transition duration-300">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#" class="w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-pink-600 transition duration-300">
<i class="fab fa-instagram"></i>
</a>
<a href="#" class="w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-blue-500 transition duration-300">
<i class="fab fa-linkedin-in"></i>
</a>
</div>
</div>
</div>
<div class="pt-8 border-t border-gray-800 text-center text-gray-400">
<p>© 2023 مولد الواجهات الذكي. جميع الحقوق محفوظة.</p>
</div>
</div>
</footer>
<!-- UI Elements Modal -->
<div id="elements-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-lg w-full max-w-2xl max-h-[80vh] overflow-auto">
<div class="p-4 border-b flex justify-between items-center">
<h3 class="text-lg font-bold">إضافة عنصر جديد</h3>
<button id="close-modal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="navbar">
<i class="fas fa-bars text-2xl mb-2 text-indigo-600"></i>
<p>شريط تنقل</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="hero">
<i class="fas fa-star text-2xl mb-2 text-blue-600"></i>
<p>قسم رئيسي</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="card">
<i class="fas fa-square text-2xl mb-2 text-purple-600"></i>
<p>بطاقة</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="button">
<i class="fas fa-hand-pointer text-2xl mb-2 text-green-600"></i>
<p>زر</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="form">
<i class="fas fa-edit text-2xl mb-2 text-yellow-600"></i>
<p>نموذج</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="footer">
<i class="fas fa-window-minimize text-2xl mb-2 text-red-600"></i>
<p>تذييل</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="gallery">
<i class="fas fa-images text-2xl mb-2 text-pink-600"></i>
<p>معرض صور</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="testimonial">
<i class="fas fa-quote-right text-2xl mb-2 text-gray-600"></i>
<p>شهادة</p>
</div>
<div class="element-option border rounded-lg p-4 text-center cursor-pointer hover:bg-gray-50" data-element="pricing">
<i class="fas fa-tags text-2xl mb-2 text-blue-400"></i>
<p>جدول أسعار</p>
</div>
</div>
</div>
<div class="p-4 border-t flex justify-end">
<button id="add-selected-element" class="bg-indigo-600 text-white px-6 py-2 rounded-lg">إضافة</button>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Color selection
const colorButtons = document.querySelectorAll('.color-btn');
let selectedColor = 'purple';
// Select purple color by default
if (colorButtons.length > 1) {
colorButtons[1].classList.add('ring-2', 'ring-offset-2', 'ring-purple-500');
}
colorButtons.forEach(button => {
button.addEventListener('click', function() {
// Remove border from all buttons
colorButtons.forEach(btn => {
btn.classList.remove('ring-2', 'ring-offset-2', 'ring-purple-500');
});
// Add border to selected button
this.classList.add('ring-2', 'ring-offset-2', 'ring-purple-500');
selectedColor = this.getAttribute('data-color');
});
});
// Preview size buttons
const desktopPreview = document.getElementById('desktop-preview');
const tabletPreview = document.getElementById('tablet-preview');
const mobilePreview = document.getElementById('mobile-preview');
const previewContainer = document.getElementById('preview-container');
desktopPreview.addEventListener('click', function() {
previewContainer.classList.remove('max-w-md', 'max-w-xs');
previewContainer.classList.add('w-full');
desktopPreview.classList.add('bg-indigo-500', 'text-white');
tabletPreview.classList.remove('bg-indigo-500', 'text-white');
mobilePreview.classList.remove('bg-indigo-500', 'text-white');
});
tabletPreview.addEventListener('click', function() {
previewContainer.classList.remove('w-full', 'max-w-xs');
previewContainer.classList.add('max-w-md');
tabletPreview.classList.add('bg-indigo-500', 'text-white');
desktopPreview.classList.remove('bg-indigo-500', 'text-white');
mobilePreview.classList.remove('bg-indigo-500', 'text-white');
});
mobilePreview.addEventListener('click', function() {
previewContainer.classList.remove('w-full', 'max-w-md');
previewContainer.classList.add('max-w-xs');
mobilePreview.classList.add('bg-indigo-500', 'text-white');
desktopPreview.classList.remove('bg-indigo-500', 'text-white');
tabletPreview.classList.remove('bg-indigo-500', 'text-white');
});
// Generate button
const generateBtn = document.getElementById('generate-btn');
const previewContent = document.getElementById('preview-content');
const appDescription = document.getElementById('app-description');
const uiToolsSection = document.getElementById('ui-tools');
const codeSection = document.getElementById('code-section');
generateBtn.addEventListener('click', function() {
if (!appDescription.value.trim()) {
alert('الرجاء إدخال وصف للواجهة');
return;
}
// Show loading state
generateBtn.disabled = true;
generateBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> جاري الإنشاء...';
// Simulate generation process (in a real app, this would call an API)
setTimeout(() => {
// Get user selections
const appType = document.getElementById('app-type').value;
const appStyle = document.getElementById('app-style').value;
const description = appDescription.value;
// Generate UI based on user input
const generatedUI = generateUI(appType, appStyle, selectedColor, description);
// Update preview
previewContent.innerHTML = generatedUI.preview;
// Update code sections
document.getElementById('html-code-content').textContent = generatedUI.html;
document.getElementById('css-code-content').textContent = generatedUI.css;
document.getElementById('js-code-content').textContent = generatedUI.js;
// Show tools and code sections
uiToolsSection.classList.remove('hidden');
codeSection.classList.remove('hidden');
// Reset button
generateBtn.disabled = false;
generateBtn.innerHTML = '<i class="fas fa-magic mr-2"></i> أنشئ الواجهة';
// Scroll to preview
document.getElementById('preview-container').scrollIntoView({ behavior: 'smooth' });
// Initialize editable elements
initEditableElements();
}, 2000);
});
// Function to generate UI based on user input
function generateUI(type, style, color, description) {
// This is a simplified version. In a real app, this would be more sophisticated
// and might call an AI API to generate the UI based on the description.
let html = '';
let css = '';
let js = '';
let preview = '';
// Common HTML head
const htmlHead = `<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${type === 'ecommerce' ? 'متجر إلكتروني' : 'موقع ويب'}</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');
body {
font-family: 'Tajawal', sans-serif;
}`;
// Common CSS
const commonCss = `
.btn-primary {
background-color: ${getColorCode(color)};
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: ${getDarkerColor(color)};
}
.text-primary {
color: ${getColorCode(color)};
}
.bg-primary {
background-color: ${getColorCode(color)};
}
.border-primary {
border-color: ${getColorCode(color)};
}`;
// Common JS
const commonJs = `// كود JavaScript الأساسي
document.addEventListener('DOMContentLoaded', function() {
// يمكنك إضافة التفاعلات هنا
console.log('تم تحميل الصفحة');
});`;
// Generate based on type
if (type === 'ecommerce') {
html = `${htmlHead}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body class="bg-gray-50">
<!-- شريط التنقل -->
<nav class="bg-white shadow-md">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<a href="#" class="text-xl font-bold text-${color}-600">متجري</a>
<div class="flex space-x-4">
<a href="#" class="text-gray-700 hover:text-${color}-600">الرئيسية</a>
<a href="#" class="text-gray-700 hover:text-${color}-600">المنتجات</a>
<a href="#" class="text-gray-700 hover:text-${color}-600">عربة التسوق</a>
<a href="#" class="text-gray-700 hover:text-${color}-600">اتصل بنا</a>
</div>
<div class="flex items-center space-x-4">
<a href="#" class="text-gray-700 hover:text-${color}-600"><i class="fas fa-search"></i></a>
<a href="#" class="text-gray-700 hover:text-${color}-600"><i class="fas fa-shopping-cart"></i></a>
<a href="#" class="text-gray-700 hover:text-${color}-600"><i class="fas fa-user"></i></a>
</div>
</div>
</nav>
<!-- القسم الرئيسي -->
<section class="bg-gradient-to-r from-${color}-500 to-${color}-600 text-white py-16">
<div class="container mx-auto px-4 text-center">
<h1 class="text-4xl font-bold mb-4">مرحباً بكم في متجرنا</h1>
<p class="text-xl mb-8">اكتشف أحدث المنتجات بأسعار تنافسية</p>
<a href="#" class="bg-white text-${color}-600 hover:bg-gray-100 px-8 py-3 rounded-lg font-bold text-lg inline-block">تصفح المنتجات</a>
</div>
</section>
<!-- قسم المنتجات -->
<section class="container mx-auto px-4 py-12">
<h2 class="text-3xl font-bold mb-8 text-center">أحدث المنتجات</h2>
<div class="grid md:grid-cols-3 gap-8">
<!-- بطاقة المنتج -->
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
<div class="relative">
<img src="https://via.placeholder.com/400x300" alt="Product" class="w-full h-48 object-cover">
<span class="absolute top-2 right-2 bg-${color}-500 text-white px-2 py-1 rounded-full text-xs">جديد</span>
</div>
<div class="p-4">
<h3 class="text-xl font-semibold mb-2">اسم المنتج</h3>
<p class="text-gray-600 mb-3">وصف مختصر للمنتج يظهر هنا</p>
<div class="flex justify-between items-center">
<span class="text-lg font-bold text-${color}-600">99 ر.س</span>
<button class="bg-${color}-600 text-white px-4 py-2 rounded hover:bg-${color}-700">أضف للسلة</button>
</div>
</div>
</div>
<!-- يمكن إضافة المزيد من بطاقات المنتجات هنا -->
</div>
</section>
<!-- تذييل الصفحة -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="grid md:grid-cols-4 gap-8">
<div>
<h3 class="text-xl font-bold mb-4">متجري</h3>
<p class="text-gray-400">متجر إلكتروني لبيع المنتجات بجودة عالية وأسعار مناسبة.</p>
</div>
<div>
<h4 class="text-lg font-bold mb-4">روابط سريعة</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">الرئيسية</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">المنتجات</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">عربة التسوق</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">اتصل بنا</h4>
<ul class="space-y-2">
<li class="flex items-center text-gray-400"><i class="fas fa-phone mr-2"></i> +966 12 345 6789</li>
<li class="flex items-center text-gray-400"><i class="fas fa-envelope mr-2"></i> info@example.com</li>
</ul>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
<p>© 2023 متجري. جميع الحقوق محفوظة.</p>
</div>
</div>
</footer>
<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=lah89/la9999" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>