Spaces:
Running
Running
Update index.html
Browse files- index.html +26 -17
index.html
CHANGED
@@ -9,25 +9,34 @@
|
|
9 |
.code-block {
|
10 |
font-family: 'Courier New', Courier, monospace;
|
11 |
white-space: pre-wrap;
|
12 |
-
background-color: #
|
|
|
13 |
padding: 1.5rem;
|
14 |
border-radius: 0.5rem;
|
15 |
height: calc(100vh - 8rem);
|
16 |
overflow-y: auto;
|
17 |
-
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.
|
18 |
}
|
19 |
.tab-content { display: none; }
|
20 |
.tab-content.active { display: block; }
|
21 |
.curl-button.active { background-color: #1d4ed8; color: white; }
|
22 |
.sidebar { transition: all 0.3s ease; }
|
23 |
-
.input-field {
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
.btn { transition: background-color 0.2s ease, transform 0.1s ease; }
|
26 |
.btn:hover { transform: translateY(-1px); }
|
27 |
.btn:active { transform: translateY(0); }
|
|
|
28 |
</style>
|
29 |
</head>
|
30 |
-
<body class="bg-gray-
|
31 |
<!-- Sidebar -->
|
32 |
<div class="w-1/4 bg-white p-6 shadow-xl h-screen overflow-y-auto sidebar">
|
33 |
<h1 class="text-3xl font-extrabold text-gray-900 mb-8">GS Generator</h1>
|
@@ -35,13 +44,13 @@
|
|
35 |
<div>
|
36 |
<label class="block text-sm font-medium text-gray-700 mb-2">Columns</label>
|
37 |
<div class="flex space-x-3">
|
38 |
-
<input type="text" class="column-input input-field flex-1 px-4 py-2 border border-gray-300 rounded-lg
|
39 |
<button onclick="removeColumn(this)" class="btn bg-red-600 text-white px-3 py-2 rounded-lg hover:bg-red-700">X</button>
|
40 |
</div>
|
41 |
</div>
|
42 |
<div>
|
43 |
<div class="flex space-x-3">
|
44 |
-
<input type="text" class="column-input input-field flex-1 px-4 py-2 border border-gray-300 rounded-lg
|
45 |
<button onclick="removeColumn(this)" class="btn bg-red-600 text-white px-3 py-2 rounded-lg hover:bg-red-700">X</button>
|
46 |
</div>
|
47 |
</div>
|
@@ -51,7 +60,7 @@
|
|
51 |
|
52 |
<!-- Main Content -->
|
53 |
<div class="w-3/4 p-8">
|
54 |
-
<div class="flex border-b-2 border-gray-
|
55 |
<button class="tab-button px-6 py-3 font-semibold text-gray-700 border-b-2 border-transparent hover:border-blue-600 hover:text-blue-600 transition-colors duration-200" onclick="showTab('code')">Code Preview</button>
|
56 |
<button class="tab-button px-6 py-3 font-semibold text-gray-700 border-b-2 border-transparent hover:border-blue-600 hover:text-blue-600 transition-colors duration-200" onclick="showTab('howto')">How to Use</button>
|
57 |
</div>
|
@@ -60,8 +69,8 @@
|
|
60 |
<div id="code" class="tab-content active">
|
61 |
<div class="flex justify-between items-center mb-4">
|
62 |
<h2 class="text-2xl font-semibold text-gray-800">Generated Code</h2>
|
63 |
-
<button onclick="copyCode()" class="btn bg-gray-
|
64 |
-
<svg class="w-6 h-6 text-gray-
|
65 |
</button>
|
66 |
</div>
|
67 |
<div id="codePreview" class="code-block"></div>
|
@@ -71,13 +80,13 @@
|
|
71 |
<div id="howto" class="tab-content">
|
72 |
<h2 class="text-2xl font-semibold text-gray-800 mb-4">How to Use (cURL Examples)</h2>
|
73 |
<div class="flex space-x-3 mb-6 overflow-x-auto pb-2">
|
74 |
-
<button class="curl-button btn px-4 py-2 bg-gray-
|
75 |
-
<button class="curl-button btn px-4 py-2 bg-gray-
|
76 |
-
<button class="curl-button btn px-4 py-2 bg-gray-
|
77 |
-
<button class="curl-button btn px-4 py-2 bg-gray-
|
78 |
-
<button class="curl-button btn px-4 py-2 bg-gray-
|
79 |
-
<button class="curl-button btn px-4 py-2 bg-gray-
|
80 |
-
<button class="curl-button btn px-4 py-2 bg-gray-
|
81 |
</div>
|
82 |
<div id="curlExamples" class="code-block"></div>
|
83 |
</div>
|
|
|
9 |
.code-block {
|
10 |
font-family: 'Courier New', Courier, monospace;
|
11 |
white-space: pre-wrap;
|
12 |
+
background-color: #1e293b; /* Dark slate background */
|
13 |
+
color: #e2e8f0; /* Light gray text */
|
14 |
padding: 1.5rem;
|
15 |
border-radius: 0.5rem;
|
16 |
height: calc(100vh - 8rem);
|
17 |
overflow-y: auto;
|
18 |
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
|
19 |
}
|
20 |
.tab-content { display: none; }
|
21 |
.tab-content.active { display: block; }
|
22 |
.curl-button.active { background-color: #1d4ed8; color: white; }
|
23 |
.sidebar { transition: all 0.3s ease; }
|
24 |
+
.input-field {
|
25 |
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
26 |
+
background-color: #f1f5f9;
|
27 |
+
color: #1e293b;
|
28 |
+
}
|
29 |
+
.input-field:focus {
|
30 |
+
border-color: #3b82f6;
|
31 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
|
32 |
+
}
|
33 |
.btn { transition: background-color 0.2s ease, transform 0.1s ease; }
|
34 |
.btn:hover { transform: translateY(-1px); }
|
35 |
.btn:active { transform: translateY(0); }
|
36 |
+
.tab-button.active { border-color: #3b82f6; color: #3b82f6; }
|
37 |
</style>
|
38 |
</head>
|
39 |
+
<body class="bg-gray-100 flex font-sans">
|
40 |
<!-- Sidebar -->
|
41 |
<div class="w-1/4 bg-white p-6 shadow-xl h-screen overflow-y-auto sidebar">
|
42 |
<h1 class="text-3xl font-extrabold text-gray-900 mb-8">GS Generator</h1>
|
|
|
44 |
<div>
|
45 |
<label class="block text-sm font-medium text-gray-700 mb-2">Columns</label>
|
46 |
<div class="flex space-x-3">
|
47 |
+
<input type="text" class="column-input input-field flex-1 px-4 py-2 border border-gray-300 rounded-lg" placeholder="Column name (e.g., Status)" value="word">
|
48 |
<button onclick="removeColumn(this)" class="btn bg-red-600 text-white px-3 py-2 rounded-lg hover:bg-red-700">X</button>
|
49 |
</div>
|
50 |
</div>
|
51 |
<div>
|
52 |
<div class="flex space-x-3">
|
53 |
+
<input type="text" class="column-input input-field flex-1 px-4 py-2 border border-gray-300 rounded-lg" placeholder="Column name (e.g., Category)" value="meaning">
|
54 |
<button onclick="removeColumn(this)" class="btn bg-red-600 text-white px-3 py-2 rounded-lg hover:bg-red-700">X</button>
|
55 |
</div>
|
56 |
</div>
|
|
|
60 |
|
61 |
<!-- Main Content -->
|
62 |
<div class="w-3/4 p-8">
|
63 |
+
<div class="flex border-b-2 border-gray-300 mb-6">
|
64 |
<button class="tab-button px-6 py-3 font-semibold text-gray-700 border-b-2 border-transparent hover:border-blue-600 hover:text-blue-600 transition-colors duration-200" onclick="showTab('code')">Code Preview</button>
|
65 |
<button class="tab-button px-6 py-3 font-semibold text-gray-700 border-b-2 border-transparent hover:border-blue-600 hover:text-blue-600 transition-colors duration-200" onclick="showTab('howto')">How to Use</button>
|
66 |
</div>
|
|
|
69 |
<div id="code" class="tab-content active">
|
70 |
<div class="flex justify-between items-center mb-4">
|
71 |
<h2 class="text-2xl font-semibold text-gray-800">Generated Code</h2>
|
72 |
+
<button onclick="copyCode()" class="btn bg-gray-700 p-2 rounded-lg hover:bg-gray-600 transition-colors duration-200" title="Copy to clipboard">
|
73 |
+
<svg class="w-6 h-6 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V7a2 2 0 00-2-2h-2M8 5a2 2 0 002 2h4a2 2 0 002-2M8 5a2 2 0 012-2h4a2 2 0 012 2"></path></svg>
|
74 |
</button>
|
75 |
</div>
|
76 |
<div id="codePreview" class="code-block"></div>
|
|
|
80 |
<div id="howto" class="tab-content">
|
81 |
<h2 class="text-2xl font-semibold text-gray-800 mb-4">How to Use (cURL Examples)</h2>
|
82 |
<div class="flex space-x-3 mb-6 overflow-x-auto pb-2">
|
83 |
+
<button class="curl-button btn px-4 py-2 bg-gray-200 rounded-lg hover:bg-blue-600 hover:text-white text-sm font-medium transition-colors duration-200" onclick="showCurlExample('appendSingle')">Append Single</button>
|
84 |
+
<button class="curl-button btn px-4 py-2 bg-gray-200 rounded-lg hover:bg-blue-600 hover:text-white text-sm font-medium transition-colors duration-200" onclick="showCurlExample('appendMultiple')">Append Multiple</button>
|
85 |
+
<button class="curl-button btn px-4 py-2 bg-gray-200 rounded-lg hover:bg-blue-600 hover:text-white text-sm font-medium transition-colors duration-200" onclick="showCurlExample('fetchAll')">Fetch All</button>
|
86 |
+
<button class="curl-button btn px-4 py-2 bg-gray-200 rounded-lg hover:bg-blue-600 hover:text-white text-sm font-medium transition-colors duration-200" onclick="showCurlExample('fetchRange')">Fetch Range</button>
|
87 |
+
<button class="curl-button btn px-4 py-2 bg-gray-200 rounded-lg hover:bg-blue-600 hover:text-white text-sm font-medium transition-colors duration-200" onclick="showCurlExample('search')">Search</button>
|
88 |
+
<button class="curl-button btn px-4 py-2 bg-gray-200 rounded-lg hover:bg-blue-600 hover:text-white text-sm font-medium transition-colors duration-200" onclick="showCurlExample('update')">Update</button>
|
89 |
+
<button class="curl-button btn px-4 py-2 bg-gray-200 rounded-lg hover:bg-blue-600 hover:text-white text-sm font-medium transition-colors duration-200" onclick="showCurlExample('delete')">Delete</button>
|
90 |
</div>
|
91 |
<div id="curlExamples" class="code-block"></div>
|
92 |
</div>
|