hellooooooo000 commited on
Commit
25bb789
·
verified ·
1 Parent(s): 70adee4

retire les technologys preférés c'est juste gemini qui genere

Browse files
Files changed (3) hide show
  1. index.html +1 -11
  2. script.js +3 -12
  3. style.css +0 -15
index.html CHANGED
@@ -34,17 +34,7 @@
34
  <label for="app-description" class="block text-gray-700 mb-2">Describe your idea:</label>
35
  <textarea id="app-description" rows="6" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="I want an app that helps people track their daily water intake with reminders and progress charts..."></textarea>
36
  </div>
37
- <div class="mb-4">
38
- <label class="block text-gray-700 mb-2">Preferred technology:</label>
39
- <div class="flex flex-wrap gap-3">
40
- <button class="tech-choice active bg-indigo-100 text-indigo-700 px-4 py-2 rounded-lg">React</button>
41
- <button class="tech-choice bg-gray-100 text-gray-700 px-4 py-2 rounded-lg">Vue</button>
42
- <button class="tech-choice bg-gray-100 text-gray-700 px-4 py-2 rounded-lg">Angular</button>
43
- <button class="tech-choice bg-gray-100 text-gray-700 px-4 py-2 rounded-lg">Flutter</button>
44
- <button class="tech-choice bg-gray-100 text-gray-700 px-4 py-2 rounded-lg">Swift</button>
45
- </div>
46
- </div>
47
- <button id="generate-btn" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-3 rounded-lg font-medium flex items-center justify-center gap-2">
48
  <i data-feather="code"></i>
49
  Generate My App
50
  </button>
 
34
  <label for="app-description" class="block text-gray-700 mb-2">Describe your idea:</label>
35
  <textarea id="app-description" rows="6" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="I want an app that helps people track their daily water intake with reminders and progress charts..."></textarea>
36
  </div>
37
+ <button id="generate-btn" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-3 rounded-lg font-medium flex items-center justify-center gap-2">
 
 
 
 
 
 
 
 
 
 
38
  <i data-feather="code"></i>
39
  Generate My App
40
  </button>
script.js CHANGED
@@ -1,15 +1,7 @@
1
  // Main application functionality
2
  document.addEventListener('DOMContentLoaded', () => {
3
- // Tech selection
4
- const techChoices = document.querySelectorAll('.tech-choice');
5
- techChoices.forEach(choice => {
6
- choice.addEventListener('click', () => {
7
- techChoices.forEach(c => c.classList.remove('active'));
8
- choice.classList.add('active');
9
- });
10
- });
11
  // Code generation
12
- const generateBtn = document.getElementById('generate-btn');
13
  const appDescription = document.getElementById('app-description');
14
  const codeOutput = document.getElementById('code-output');
15
  const chatSection = document.getElementById('chat');
@@ -30,9 +22,8 @@ document.addEventListener('DOMContentLoaded', () => {
30
  feather.replace();
31
 
32
  try {
33
- const tech = document.querySelector('.tech-choice.active').textContent;
34
- const prompt = `Create a ${tech} app that ${appDescription.value}`;
35
- // Call Gemini API
36
  const response = await fetch('https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=YOUR_API_KEY', {
37
  method: 'POST',
38
  headers: {
 
1
  // Main application functionality
2
  document.addEventListener('DOMContentLoaded', () => {
 
 
 
 
 
 
 
 
3
  // Code generation
4
+ const generateBtn = document.getElementById('generate-btn');
5
  const appDescription = document.getElementById('app-description');
6
  const codeOutput = document.getElementById('code-output');
7
  const chatSection = document.getElementById('chat');
 
22
  feather.replace();
23
 
24
  try {
25
+ const prompt = `Crée une application qui ${appDescription.value}. Génère le code complet avec HTML, CSS et JavaScript.`;
26
+ // Call Gemini API
 
27
  const response = await fetch('https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=YOUR_API_KEY', {
28
  method: 'POST',
29
  headers: {
style.css CHANGED
@@ -35,21 +35,6 @@ body {
35
  ::-webkit-scrollbar-thumb:hover {
36
  background: #555;
37
  }
38
-
39
- /* Tech choice buttons */
40
- .tech-choice {
41
- transition: all 0.2s ease;
42
- cursor: pointer;
43
- }
44
-
45
- .tech-choice.active {
46
- background-color: #6366f1;
47
- color: white;
48
- }
49
- .tech-choice:hover:not(.active) {
50
- background-color: #e5e7eb;
51
- }
52
-
53
  /* Preview iframe styles */
54
  iframe {
55
  border: none;
 
35
  ::-webkit-scrollbar-thumb:hover {
36
  background: #555;
37
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  /* Preview iframe styles */
39
  iframe {
40
  border: none;