Skip to content

Commit fcca773

Browse files
committed
Initial commit
1 parent 0fc5baf commit fcca773

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

Diff for: screenshot.png

1.73 KB
Loading

Diff for: templates/index.html

+28-8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@
88
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
99
<!-- Font Awesome CDN -->
1010
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
11+
<style>
12+
/* Additional CSS for floating copy button */
13+
.copy-button {
14+
position: absolute;
15+
top: 0.5rem;
16+
right: 0.5rem;
17+
background-color: #f3f4f6;
18+
color: #4b5563;
19+
border: none;
20+
border-radius: 0.25rem;
21+
padding: 0.25rem 0.5rem;
22+
font-size: 0.875rem;
23+
cursor: pointer;
24+
transition: background-color 0.3s ease;
25+
}
26+
27+
.copy-button:hover {
28+
background-color: #e5e7eb;
29+
}
30+
</style>
1131
</head>
1232
<body class="bg-gray-100 flex items-center justify-center min-h-screen">
1333

@@ -26,20 +46,20 @@ <h1 class="text-2xl font-bold text-center mb-6">Image to Text Converter</h1>
2646
<!-- Display Selected File -->
2747
<div id="fileDetails" class="mt-4 text-center text-gray-700"></div>
2848

29-
<!-- Convert and Reset Buttons -->
49+
<!-- Reset and Convert Buttons (swapped positions) -->
3050
<div class="flex space-x-4">
3151
<button type="button" onclick="resetForm()" class="flex-1 bg-gray-300 text-gray-700 py-2 rounded-lg font-semibold hover:bg-gray-400 transition duration-200"><i class="fas fa-redo"></i> Reset</button>
32-
<button type="submit" class="flex-1 bg-blue-500 text-white py-2 rounded-lg font-semibold hover:bg-blue-600 transition duration-200"><i class="fas fa-sync-alt"></i> Convert to Text</button>
52+
<button type="submit" class="flex-1 bg-blue-500 text-white py-2 rounded-lg font-semibold hover:bg-blue-600 transition duration-200"><i class="fas fa-sync-alt"></i> Convert to Text</button>
3353
</div>
3454
</form>
3555

36-
<!-- Text Area to Display Extracted Text -->
37-
<div class="mt-6">
56+
<!-- Text Area to Display Extracted Text with Floating Copy Button -->
57+
<div class="relative mt-6">
3858
<textarea id="text" rows="10" class="w-full p-3 border border-gray-300 rounded-lg bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500" readonly></textarea>
3959

40-
<!-- Copy Text Button -->
41-
<button onclick="copyText()" class="mt-3 w-full bg-green-500 text-white py-2 rounded-lg font-semibold hover:bg-green-600 transition duration-200">
42-
<i class="fas fa-copy"></i> Copy Text
60+
<!-- Floating Copy Button inside Textarea -->
61+
<button onclick="copyText()" class="copy-button">
62+
<i class="fas fa-copy"></i> Copy
4363
</button>
4464
</div>
4565
</div>
@@ -136,4 +156,4 @@ <h1 class="text-2xl font-bold text-center mb-6">Image to Text Converter</h1>
136156
</script>
137157

138158
</body>
139-
</html>
159+
</html>

0 commit comments

Comments
 (0)