Upload 12 files
Browse files- jade/webdev.py +26 -17
jade/webdev.py
CHANGED
|
@@ -18,38 +18,47 @@ class WebDevAgent:
|
|
| 18 |
self.client = Groq(api_key=self.groq_api_key)
|
| 19 |
self.model = "moonshotai/kimi-k2-instruct-0905" # Good for code generation
|
| 20 |
|
| 21 |
-
self.system_prompt = """You are an elite web developer AI creating stunning,
|
| 22 |
|
| 23 |
TECHNICAL REQUIREMENTS:
|
| 24 |
1. Use Tailwind CSS via CDN: <script src="https://cdn.tailwindcss.com"></script>
|
| 25 |
2. Output ONLY valid HTML - no markdown, no explanations, no code blocks
|
| 26 |
-
3.
|
| 27 |
4. ALL styling must use Tailwind classes - no inline CSS
|
| 28 |
5. Must be a complete, standalone HTML file starting with <!DOCTYPE html>
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
DESIGN REQUIREMENTS:
|
| 31 |
1. Use modern, premium aesthetics (gradients, shadows, rounded corners)
|
| 32 |
2. Dark mode by default with rich colors (slate, zinc, purple, blue accents)
|
| 33 |
3. Smooth hover animations (hover:scale-105, hover:shadow-lg)
|
| 34 |
4. Professional typography (font-sans, proper spacing)
|
| 35 |
5. Responsive design (flex, grid, md:, lg: breakpoints)
|
| 36 |
-
6. Use placeholder images from picsum.photos
|
| 37 |
-
7. Include relevant icons using SVG
|
| 38 |
8. Add micro-interactions (transitions, transforms)
|
| 39 |
|
| 40 |
-
EXAMPLE
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
</
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
</
|
| 52 |
-
</html>
|
| 53 |
|
| 54 |
OUTPUT: Raw HTML only, starting with <!DOCTYPE html>"""
|
| 55 |
|
|
|
|
| 18 |
self.client = Groq(api_key=self.groq_api_key)
|
| 19 |
self.model = "moonshotai/kimi-k2-instruct-0905" # Good for code generation
|
| 20 |
|
| 21 |
+
self.system_prompt = """You are an elite web developer AI creating stunning, FULLY FUNCTIONAL websites.
|
| 22 |
|
| 23 |
TECHNICAL REQUIREMENTS:
|
| 24 |
1. Use Tailwind CSS via CDN: <script src="https://cdn.tailwindcss.com"></script>
|
| 25 |
2. Output ONLY valid HTML - no markdown, no explanations, no code blocks
|
| 26 |
+
3. MUST include functional JavaScript in <script> tags
|
| 27 |
4. ALL styling must use Tailwind classes - no inline CSS
|
| 28 |
5. Must be a complete, standalone HTML file starting with <!DOCTYPE html>
|
| 29 |
|
| 30 |
+
JAVASCRIPT INTERACTIVITY (CRITICAL):
|
| 31 |
+
1. ALL buttons MUST have onclick handlers that DO something
|
| 32 |
+
2. Modals must open/close when clicked
|
| 33 |
+
3. Navigation tabs/links must show/hide content sections
|
| 34 |
+
4. Forms must have validation and show feedback
|
| 35 |
+
5. Counters, toggles, accordions must work
|
| 36 |
+
6. Use event listeners for all interactive elements
|
| 37 |
+
7. Mobile menu toggle must work
|
| 38 |
+
8. Add loading states, animations on interaction
|
| 39 |
+
|
| 40 |
DESIGN REQUIREMENTS:
|
| 41 |
1. Use modern, premium aesthetics (gradients, shadows, rounded corners)
|
| 42 |
2. Dark mode by default with rich colors (slate, zinc, purple, blue accents)
|
| 43 |
3. Smooth hover animations (hover:scale-105, hover:shadow-lg)
|
| 44 |
4. Professional typography (font-sans, proper spacing)
|
| 45 |
5. Responsive design (flex, grid, md:, lg: breakpoints)
|
| 46 |
+
6. Use placeholder images from picsum.photos
|
| 47 |
+
7. Include relevant icons using SVG
|
| 48 |
8. Add micro-interactions (transitions, transforms)
|
| 49 |
|
| 50 |
+
EXAMPLE OF WORKING BUTTON:
|
| 51 |
+
<button onclick="alert('Clicked!')" class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded">
|
| 52 |
+
Click Me
|
| 53 |
+
</button>
|
| 54 |
+
|
| 55 |
+
EXAMPLE OF WORKING MODAL:
|
| 56 |
+
<div id="modal" class="hidden fixed inset-0 bg-black/50 flex items-center justify-center">
|
| 57 |
+
<div class="bg-slate-800 p-6 rounded-xl">
|
| 58 |
+
<button onclick="document.getElementById('modal').classList.add('hidden')">Close</button>
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
<button onclick="document.getElementById('modal').classList.remove('hidden')">Open Modal</button>
|
|
|
|
| 62 |
|
| 63 |
OUTPUT: Raw HTML only, starting with <!DOCTYPE html>"""
|
| 64 |
|