Spaces:
Running
Running
Update index.html
Browse files- index.html +66 -45
index.html
CHANGED
@@ -9,88 +9,109 @@
|
|
9 |
.code-block {
|
10 |
font-family: 'Courier New', Courier, monospace;
|
11 |
white-space: pre-wrap;
|
12 |
-
background-color: #1e293b;
|
13 |
-
color: #e2e8f0;
|
14 |
padding: 1.5rem;
|
15 |
border-radius: 0.5rem;
|
16 |
-
height: calc(100vh -
|
17 |
overflow-y: auto;
|
18 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
|
19 |
}
|
20 |
-
.
|
21 |
-
.
|
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 |
-
.
|
|
|
|
|
|
|
37 |
</style>
|
38 |
</head>
|
39 |
-
<body class="bg-gray-100
|
40 |
-
<!--
|
41 |
-
<div class="
|
42 |
-
<
|
43 |
-
<div
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
57 |
-
|
58 |
-
|
59 |
-
|
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>
|
67 |
|
68 |
-
<!-- Code
|
69 |
-
<div id="code" class="
|
|
|
70 |
<div class="flex justify-between items-center mb-4">
|
71 |
-
<h2 class="text-2xl font-semibold text-gray-800">
|
72 |
-
<button onclick="copyCode()" class="btn bg-gray-700 p-2 rounded-lg hover:bg-gray-600
|
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>
|
|
|
|
|
|
|
77 |
</div>
|
78 |
|
79 |
-
<!-- How to Use
|
80 |
-
<div id="howto" class="
|
81 |
-
<
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
90 |
</div>
|
91 |
<div id="curlExamples" class="code-block"></div>
|
92 |
</div>
|
93 |
</div>
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
</body>
|
96 |
</html>
|
|
|
9 |
.code-block {
|
10 |
font-family: 'Courier New', Courier, monospace;
|
11 |
white-space: pre-wrap;
|
12 |
+
background-color: #1e293b;
|
13 |
+
color: #e2e8f0;
|
14 |
padding: 1.5rem;
|
15 |
border-radius: 0.5rem;
|
16 |
+
height: calc(100vh - 12rem);
|
17 |
overflow-y: auto;
|
18 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
|
19 |
}
|
20 |
+
.section { display: none; }
|
21 |
+
.section.active { display: block; }
|
|
|
|
|
22 |
.input-field {
|
23 |
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
24 |
+
background-color: #f1f5f9;
|
25 |
color: #1e293b;
|
26 |
}
|
27 |
.input-field:focus {
|
28 |
+
border-color: #3b82f6;
|
29 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
|
30 |
}
|
31 |
.btn { transition: background-color 0.2s ease, transform 0.1s ease; }
|
32 |
.btn:hover { transform: translateY(-1px); }
|
33 |
.btn:active { transform: translateY(0); }
|
34 |
+
.step-indicator.active {
|
35 |
+
background-color: #3b82f6;
|
36 |
+
color: white;
|
37 |
+
}
|
38 |
</style>
|
39 |
</head>
|
40 |
+
<body class="bg-gray-100 font-sans p-8">
|
41 |
+
<!-- Progress Steps -->
|
42 |
+
<div class="flex justify-center space-x-8 mb-8">
|
43 |
+
<div class="step-indicator flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 font-semibold">1</div>
|
44 |
+
<div class="step-indicator flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 font-semibold">2</div>
|
45 |
+
<div class="step-indicator flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 font-semibold">3</div>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
<!-- Main Content Sections -->
|
49 |
+
<div class="max-w-4xl mx-auto">
|
50 |
+
<!-- Set Columns Section -->
|
51 |
+
<div id="columns" class="section active">
|
52 |
+
<h1 class="text-3xl font-extrabold text-gray-900 mb-8 text-center">Set Columns</h1>
|
53 |
+
<div id="columnInputs" class="space-y-5">
|
54 |
<div class="flex space-x-3">
|
55 |
<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">
|
56 |
<button onclick="removeColumn(this)" class="btn bg-red-600 text-white px-3 py-2 rounded-lg hover:bg-red-700">X</button>
|
57 |
</div>
|
|
|
|
|
58 |
<div class="flex space-x-3">
|
59 |
<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">
|
60 |
<button onclick="removeColumn(this)" class="btn bg-red-600 text-white px-3 py-2 rounded-lg hover:bg-red-700">X</button>
|
61 |
</div>
|
62 |
</div>
|
63 |
+
<div class="flex justify-between mt-6">
|
64 |
+
<button onclick="addColumn()" class="btn bg-blue-600 text-white px-4 py-3 rounded-lg hover:bg-blue-700 text-lg font-medium">Add Column</button>
|
65 |
+
<button onclick="nextSection('code')" class="btn bg-green-600 text-white px-6 py-3 rounded-lg hover:bg-green-700 text-lg font-medium">Next</button>
|
66 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
67 |
</div>
|
68 |
|
69 |
+
<!-- Generated Code Section -->
|
70 |
+
<div id="code" class="section">
|
71 |
+
<h1 class="text-3xl font-extrabold text-gray-900 mb-8 text-center">Generated Code</h1>
|
72 |
<div class="flex justify-between items-center mb-4">
|
73 |
+
<h2 class="text-2xl font-semibold text-gray-800">Code Preview</h2>
|
74 |
+
<button onclick="copyCode()" class="btn bg-gray-700 p-2 rounded-lg hover:bg-gray-600" title="Copy to clipboard">
|
75 |
<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>
|
76 |
</button>
|
77 |
</div>
|
78 |
<div id="codePreview" class="code-block"></div>
|
79 |
+
<div class="flex justify-end mt-6">
|
80 |
+
<button onclick="nextSection('howto')" class="btn bg-green-600 text-white px-6 py-3 rounded-lg hover:bg-green-700 text-lg font-medium">Next</button>
|
81 |
+
</div>
|
82 |
</div>
|
83 |
|
84 |
+
<!-- How to Use Section -->
|
85 |
+
<div id="howto" class="section">
|
86 |
+
<h1 class="text-3xl font-extrabold text-gray-900 mb-8 text-center">How to Use</h1>
|
87 |
<div class="flex space-x-3 mb-6 overflow-x-auto pb-2">
|
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" onclick="showCurlExample('appendSingle')">Append Single</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" onclick="showCurlExample('appendMultiple')">Append Multiple</button>
|
90 |
+
<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" onclick="showCurlExample('fetchAll')">Fetch All</button>
|
91 |
+
<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" onclick="showCurlExample('fetchRange')">Fetch Range</button>
|
92 |
+
<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" onclick="showCurlExample('search')">Search</button>
|
93 |
+
<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" onclick="showCurlExample('update')">Update</button>
|
94 |
+
<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" onclick="showCurlExample('delete')">Delete</button>
|
95 |
</div>
|
96 |
<div id="curlExamples" class="code-block"></div>
|
97 |
</div>
|
98 |
</div>
|
99 |
+
|
100 |
+
<script>
|
101 |
+
function nextSection(sectionId) {
|
102 |
+
document.querySelectorAll('.section').forEach(section => section.classList.remove('active'));
|
103 |
+
document.getElementById(sectionId).classList.add('active');
|
104 |
+
|
105 |
+
// Update step indicators
|
106 |
+
const steps = ['columns', 'code', 'howto'];
|
107 |
+
const currentStep = steps.indexOf(sectionId);
|
108 |
+
document.querySelectorAll('.step-indicator').forEach((indicator, index) => {
|
109 |
+
indicator.classList.toggle('active', index === currentStep);
|
110 |
+
});
|
111 |
+
}
|
112 |
+
|
113 |
+
// Initial step indicator
|
114 |
+
document.querySelector('.step-indicator').classList.add('active');
|
115 |
+
</script>
|
116 |
</body>
|
117 |
</html>
|