Spaces:
Running
Running
Update index.html
Browse files- index.html +78 -36
index.html
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
.code-block {
|
10 |
font-family: 'Courier New', Courier, monospace;
|
11 |
white-space: pre-wrap;
|
12 |
-
background: #000000;
|
13 |
color: #e2e8f0;
|
14 |
padding: 1.5rem;
|
15 |
border-radius: 0.5rem;
|
@@ -54,39 +54,85 @@
|
|
54 |
border: 1px solid rgba(255, 255, 255, 0.2);
|
55 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
56 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
@media (max-width: 640px) {
|
58 |
-
.code-block {
|
59 |
-
|
60 |
-
|
61 |
-
.
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
</style>
|
65 |
</head>
|
66 |
-
<body class="bg-gradient-to-br from-gray-200 via-gray-300 to-gray-400 min-h-screen font-sans
|
67 |
<!-- Progress Steps -->
|
68 |
-
<div class="flex justify-center space-x-4
|
69 |
-
<div class="step-indicator flex items-center justify-center w-10 h-10
|
70 |
-
<div class="step-indicator flex items-center justify-center w-10 h-10
|
71 |
-
<div class="step-indicator flex items-center justify-center w-10 h-10
|
72 |
</div>
|
73 |
|
74 |
<!-- Main Content Sections -->
|
75 |
-
<div class="max-w-4xl mx-auto glass-container rounded-xl p-4
|
76 |
<!-- Set Columns Section -->
|
77 |
<div id="columns" class="section active">
|
78 |
-
<h1 class="text-2xl
|
79 |
-
<div id="columnInputs" class="space-y-4
|
80 |
-
<div class="flex space-x-3
|
81 |
-
<input type="text" class="column-input input-field flex-1 px-3
|
82 |
<button onclick="removeColumn(this)" class="delete-btn btn bg-red-600 text-white p-2 rounded-lg">
|
83 |
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
84 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12
|
85 |
</svg>
|
86 |
</button>
|
87 |
</div>
|
88 |
-
<div class="flex space-x-3
|
89 |
-
<input type="text" class="column-input input-field flex-1 px-3
|
90 |
<button onclick="removeColumn(this)" class="delete-btn btn bg-red-600 text-white p-2 rounded-lg">
|
91 |
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
92 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
@@ -94,32 +140,32 @@
|
|
94 |
</button>
|
95 |
</div>
|
96 |
</div>
|
97 |
-
<div class="flex flex-col sm:flex-row justify-between mt-6 space-y-3 sm:space-
|
98 |
-
<button onclick="addColumn()" class="btn bg-blue-600 text-white px-4 py-3 rounded-lg hover:bg-blue-700 text-base
|
99 |
-
<button onclick="nextSection('code')" class="btn bg-green-600 text-white px-6 py-3 rounded-lg hover:bg-green-700 text-base
|
100 |
</div>
|
101 |
</div>
|
102 |
|
103 |
<!-- Generated Code Section -->
|
104 |
<div id="code" class="section">
|
105 |
-
<h1 class="text-2xl
|
106 |
-
<div class="flex flex-col sm:flex-row justify-between items-center mb-4 space-y-3
|
107 |
-
<h2 class="text-xl
|
108 |
<button onclick="copyCode()" class="btn bg-gray-700 p-2 rounded-lg hover:bg-gray-600" title="Copy to clipboard">
|
109 |
<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>
|
110 |
</button>
|
111 |
</div>
|
112 |
<div id="codePreview" class="code-block"></div>
|
113 |
-
<div class="flex flex-col sm:flex-row justify-between mt-6 space-y-3 sm:space-
|
114 |
-
<button onclick="nextSection('columns')" class="btn bg-gray-600 text-white px-6 py-3 rounded-lg hover:bg-gray-700 text-base
|
115 |
-
<button onclick="nextSection('howto')" class="btn bg-green-600 text-white px-6 py-3 rounded-lg hover:bg-green-700 text-base
|
116 |
</div>
|
117 |
</div>
|
118 |
|
119 |
<!-- How to Use Section -->
|
120 |
<div id="howto" class="section">
|
121 |
-
<h1 class="text-2xl
|
122 |
-
<div class="flex flex-wrap gap-2
|
123 |
<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>
|
124 |
<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>
|
125 |
<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>
|
@@ -130,7 +176,7 @@
|
|
130 |
</div>
|
131 |
<div id="curlExamples" class="code-block"></div>
|
132 |
<div class="flex justify-start mt-6">
|
133 |
-
<button onclick="nextSection('code')" class="btn bg-gray-600 text-white px-6 py-3 rounded-lg hover:bg-gray-700 text-base
|
134 |
</div>
|
135 |
</div>
|
136 |
</div>
|
@@ -140,18 +186,14 @@
|
|
140 |
document.querySelectorAll('.section').forEach(section => section.classList.remove('active'));
|
141 |
document.getElementById(sectionId).classList.add('active');
|
142 |
|
143 |
-
// Update step indicators
|
144 |
const steps = ['columns', 'code', 'howto'];
|
145 |
const currentStep = steps.indexOf(sectionId);
|
146 |
document.querySelectorAll('.step-indicator').forEach((indicator, index) => {
|
147 |
indicator.classList.toggle('active', index === currentStep);
|
148 |
});
|
149 |
}
|
150 |
-
|
151 |
-
// Initial step indicator
|
152 |
document.querySelector('.step-indicator').classList.add('active');
|
153 |
</script>
|
154 |
-
<script src="script.js"></script>
|
155 |
-
|
156 |
</body>
|
157 |
</html>
|
|
|
9 |
.code-block {
|
10 |
font-family: 'Courier New', Courier, monospace;
|
11 |
white-space: pre-wrap;
|
12 |
+
background: #000000;
|
13 |
color: #e2e8f0;
|
14 |
padding: 1.5rem;
|
15 |
border-radius: 0.5rem;
|
|
|
54 |
border: 1px solid rgba(255, 255, 255, 0.2);
|
55 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
56 |
}
|
57 |
+
body {
|
58 |
+
padding: 1rem;
|
59 |
+
}
|
60 |
+
.max-w-4xl {
|
61 |
+
width: 100%;
|
62 |
+
max-width: 100%;
|
63 |
+
margin-left: auto;
|
64 |
+
margin-right: auto;
|
65 |
+
}
|
66 |
@media (max-width: 640px) {
|
67 |
+
.code-block {
|
68 |
+
height: calc(100vh - 16rem);
|
69 |
+
}
|
70 |
+
.flex.space-x-3 {
|
71 |
+
flex-direction: column;
|
72 |
+
gap: 0.5rem;
|
73 |
+
}
|
74 |
+
.btn {
|
75 |
+
width: 100%;
|
76 |
+
margin-bottom: 0.5rem;
|
77 |
+
}
|
78 |
+
.step-indicator {
|
79 |
+
width: 2.5rem;
|
80 |
+
height: 2.5rem;
|
81 |
+
}
|
82 |
+
.glass-container {
|
83 |
+
padding: 1rem;
|
84 |
+
}
|
85 |
+
.flex.sm\:flex-row {
|
86 |
+
flex-direction: column;
|
87 |
+
}
|
88 |
+
.space-x-4 > * + * {
|
89 |
+
margin-top: 0.75rem;
|
90 |
+
margin-left: 0;
|
91 |
+
}
|
92 |
+
.column-input {
|
93 |
+
width: 100%;
|
94 |
+
}
|
95 |
+
.flex.justify-center.space-x-4 {
|
96 |
+
flex-direction: row;
|
97 |
+
gap: 0.5rem;
|
98 |
+
flex-wrap: wrap;
|
99 |
+
justify-content: center;
|
100 |
+
}
|
101 |
+
.flex.flex-col.sm\:flex-row {
|
102 |
+
gap: 0.75rem;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
@media (min-width: 641px) {
|
106 |
+
body {
|
107 |
+
padding: 2rem;
|
108 |
+
}
|
109 |
}
|
110 |
</style>
|
111 |
</head>
|
112 |
+
<body class="bg-gradient-to-br from-gray-200 via-gray-300 to-gray-400 min-h-screen font-sans">
|
113 |
<!-- Progress Steps -->
|
114 |
+
<div class="flex justify-center space-x-4 mb-6">
|
115 |
+
<div class="step-indicator flex items-center justify-center w-10 h-10 rounded-full text-gray-700 font-semibold">1</div>
|
116 |
+
<div class="step-indicator flex items-center justify-center w-10 h-10 rounded-full text-gray-700 font-semibold">2</div>
|
117 |
+
<div class="step-indicator flex items-center justify-center w-10 h-10 rounded-full text-gray-700 font-semibold">3</div>
|
118 |
</div>
|
119 |
|
120 |
<!-- Main Content Sections -->
|
121 |
+
<div class="max-w-4xl mx-auto glass-container rounded-xl p-4">
|
122 |
<!-- Set Columns Section -->
|
123 |
<div id="columns" class="section active">
|
124 |
+
<h1 class="text-2xl font-extrabold text-gray-900 mb-6 text-center">Set Columns</h1>
|
125 |
+
<div id="columnInputs" class="space-y-4">
|
126 |
+
<div class="flex space-x-3">
|
127 |
+
<input type="text" class="column-input input-field flex-1 px-3 py-2 rounded-lg" placeholder="Column name (e.g., Status)" value="word">
|
128 |
<button onclick="removeColumn(this)" class="delete-btn btn bg-red-600 text-white p-2 rounded-lg">
|
129 |
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
130 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.植物A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
131 |
</svg>
|
132 |
</button>
|
133 |
</div>
|
134 |
+
<div class="flex space-x-3">
|
135 |
+
<input type="text" class="column-input input-field flex-1 px-3 py-2 rounded-lg" placeholder="Column name (e.g., Category)" value="meaning">
|
136 |
<button onclick="removeColumn(this)" class="delete-btn btn bg-red-600 text-white p-2 rounded-lg">
|
137 |
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
138 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
|
|
140 |
</button>
|
141 |
</div>
|
142 |
</div>
|
143 |
+
<div class="flex flex-col sm:flex-row justify-between mt-6 space-y-3 sm:space-x-4">
|
144 |
+
<button onclick="addColumn()" class="btn bg-blue-600 text-white px-4 py-3 rounded-lg hover:bg-blue-700 text-base font-medium">Add Column</button>
|
145 |
+
<button onclick="nextSection('code')" class="btn bg-green-600 text-white px-6 py-3 rounded-lg hover:bg-green-700 text-base font-medium">Next</button>
|
146 |
</div>
|
147 |
</div>
|
148 |
|
149 |
<!-- Generated Code Section -->
|
150 |
<div id="code" class="section">
|
151 |
+
<h1 class="text-2xl font-extrabold text-gray-900 mb-6 text-center">Generated Code</h1>
|
152 |
+
<div class="flex flex-col sm:flex-row justify-between items-center mb-4 space-y-3">
|
153 |
+
<h2 class="text-xl font-semibold text-gray-800">Code Preview</h2>
|
154 |
<button onclick="copyCode()" class="btn bg-gray-700 p-2 rounded-lg hover:bg-gray-600" title="Copy to clipboard">
|
155 |
<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>
|
156 |
</button>
|
157 |
</div>
|
158 |
<div id="codePreview" class="code-block"></div>
|
159 |
+
<div class="flex flex-col sm:flex-row justify-between mt-6 space-y-3 sm:space-x-4">
|
160 |
+
<button onclick="nextSection('columns')" class="btn bg-gray-600 text-white px-6 py-3 rounded-lg hover:bg-gray-700 text-base font-medium">Back</button>
|
161 |
+
<button onclick="nextSection('howto')" class="btn bg-green-600 text-white px-6 py-3 rounded-lg hover:bg-green-700 text-base font-medium">Next</button>
|
162 |
</div>
|
163 |
</div>
|
164 |
|
165 |
<!-- How to Use Section -->
|
166 |
<div id="howto" class="section">
|
167 |
+
<h1 class="text-2xl font-extrabold text-gray-900 mb-6 text-center">How to Use</h1>
|
168 |
+
<div class="flex flex-wrap gap-2 mb-6 overflow-x-auto pb-2">
|
169 |
<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>
|
170 |
<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>
|
171 |
<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>
|
|
|
176 |
</div>
|
177 |
<div id="curlExamples" class="code-block"></div>
|
178 |
<div class="flex justify-start mt-6">
|
179 |
+
<button onclick="nextSection('code')" class="btn bg-gray-600 text-white px-6 py-3 rounded-lg hover:bg-gray-700 text-base font-medium">Back</button>
|
180 |
</div>
|
181 |
</div>
|
182 |
</div>
|
|
|
186 |
document.querySelectorAll('.section').forEach(section => section.classList.remove('active'));
|
187 |
document.getElementById(sectionId).classList.add('active');
|
188 |
|
|
|
189 |
const steps = ['columns', 'code', 'howto'];
|
190 |
const currentStep = steps.indexOf(sectionId);
|
191 |
document.querySelectorAll('.step-indicator').forEach((indicator, index) => {
|
192 |
indicator.classList.toggle('active', index === currentStep);
|
193 |
});
|
194 |
}
|
|
|
|
|
195 |
document.querySelector('.step-indicator').classList.add('active');
|
196 |
</script>
|
197 |
+
<script src="script.js"></script>
|
|
|
198 |
</body>
|
199 |
</html>
|