Wikipedia para siempre
ShareCode
Permalink: http://www.treeweb.es/u/974/ 01/02/2011

ShareCode

1 <!DOCTYPE html>2 <html lang="en">3 <head>4  <meta charset="UTF-8">5  <meta name="viewport" content="width=device-width, initial-scale=1.0">6  <title>Flowtest Editor</title>7  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">8 </head>9 <body class="bg-gray-100">10  <div class="container mx-auto p-4">11  <form class="space-y-6">12  <!-- Modal de bienvenida -->13  <div id="welcome-modal" class="fixed inset-0 bg-gray-600 bg-opacity-50 flex items-center justify-center hidden">14  <div class="bg-white p-6 rounded-lg shadow-md max-w-lg">15  <h2 class="text-xl font-semibold mb-4">Bienvenido a Flowtest Editor</h2>16  <p class="mb-4">Aquí puedes agregar y editar variables, requests y asserts directamente en la lista. Usa los botones "+" para añadir nuevos elementos.</p>17  <button type="button" onclick="closeWelcomeModal()" class="bg-blue-500 text-white px-4 py-2 rounded">Entendido</button>18  </div>19  </div>20 21  <!-- Lista de Elementos -->22  <div id="elements-list" class="space-y-4">23  <!-- Ejemplo de variable -->24  <div class="element bg-white p-4 rounded-lg shadow-md flex items-center space-x-4">25  <span class="text-gray-700">Variable</span>26  <input type="text" placeholder="Nombre" class="flex-1 p-2 border border-gray-300 rounded" />27  <input type="text" placeholder="Valor" class="flex-1 p-2 border border-gray-300 rounded" />28  <button type="button" onclick="removeElement(this)" class="text-red-500">x</button>29  </div>30 31  <!-- Ejemplo de request -->32  <div class="element bg-white p-4 rounded-lg shadow-md flex items-center space-x-4">33  <span class="text-gray-700">Request</span>34  <select class="flex-1 p-2 border border-gray-300 rounded">35  <option>GET</option>36  <option>POST</option>37  <option>PUT</option>38  <option>DELETE</option>39  </select>40  <input type="text" placeholder="URL" class="flex-1 p-2 border border-gray-300 rounded" />41  <textarea placeholder="Headers" class="flex-1 p-2 border border-gray-300 rounded"></textarea>42  <textarea placeholder="Body" class="flex-1 p-2 border border-gray-300 rounded"></textarea>43  <button type="button" onclick="removeElement(this)" class="text-red-500">x</button>44  </div>45 46  <!-- Ejemplo de assert -->47  <div class="element bg-white p-4 rounded-lg shadow-md flex items-center space-x-4">48  <span class="text-gray-700">Assert</span>49  <input type="text" placeholder="Expresión" class="flex-1 p-2 border border-gray-300 rounded" />50  <button type="button" onclick="removeElement(this)" class="text-red-500">x</button>51  </div>52  </div>53 54  <!-- Botones para Añadir Elemento -->55  <div class="flex justify-between">56  <button type="button" onclick="addVariable()" class="bg-blue-500 text-white px-4 py-2 rounded">+ Variable</button>57  <button type="button" onclick="addRequest()" class="bg-blue-500 text-white px-4 py-2 rounded">+ Request</button>58  <button type="button" onclick="addAssert()" class="bg-blue-500 text-white px-4 py-2 rounded">+ Assert</button>59  </div>60 61  <!-- Save Button -->62  <div class="flex justify-end mt-4">63  <button type="button" onclick="saveTest()" class="bg-green-500 text-white px-4 py-2 rounded">Save Test</button>64  </div>65  </form>66  </div>67 68  <script src="script.js"></script>69 </body>70 </html>71 
Enlace
El enlace para compartir es: