File size: 4,131 Bytes
b25edb2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Webhook Image Generator</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gradient-to-br from-indigo-50 to-purple-100 min-h-screen">
    <div class="container mx-auto px-4 py-8">
        <header class="text-center mb-12">
            <h1 class="text-4xl md:text-5xl font-bold text-indigo-800 mb-4">Webhook Image Generator 🖼️</h1>
            <p class="text-lg text-indigo-600 max-w-2xl mx-auto">
                Send webhook data and get it visualized as a PNG image instantly
            </p>
        </header>

        <main class="max-w-4xl mx-auto">
            <div class="bg-white rounded-xl shadow-lg p-6 mb-8">
                <div class="flex items-center justify-between mb-6">
                    <h2 class="text-2xl font-semibold text-gray-800">Webhook Endpoint</h2>
                    <span class="px-3 py-1 bg-green-100 text-green-800 rounded-full text-sm font-medium">Active</span>
                </div>
                
                <div class="bg-gray-50 rounded-lg p-4 mb-6">
                    <div class="flex items-center justify-between">
                        <code class="text-indigo-700 font-mono break-all">https://webhook-image-generator.com/api/webhook/endpoint</code>
                        <button id="copyButton" class="ml-4 bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg flex items-center transition-colors">
                            <i data-feather="copy" class="mr-2"></i> Copy URL
                        </button>
                    </div>
                </div>
                
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <h3 class="text-lg font-medium text-gray-800 mb-3">How to use:</h3>
                        <ol class="list-decimal list-inside space-y-2 text-gray-600">
                            <li>Copy the webhook URL above</li>
                            <li>Send POST requests with JSON data</li>
                            <li>Get your data visualized as PNG</li>
                            <li>Share or download your image</li>
                        </ol>
                    </div>
                    <div>
                        <h3 class="text-lg font-medium text-gray-800 mb-3">Sample Request:</h3>
                        <pre class="bg-gray-800 text-green-400 p-4 rounded-lg text-sm overflow-x-auto">curl -X POST \
  https://webhook-image-generator.com/api/webhook/endpoint \
  -H 'Content-Type: application/json' \
  -d '{"message": "Hello World", "timestamp": "2023-05-15T10:30:00Z"}'</pre>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-xl shadow-lg p-6">
                <h2 class="text-2xl font-semibold text-gray-800 mb-6">Recent Webhook Images</h2>
                <div id="imageGallery" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
                    <!-- Images will be dynamically inserted here -->
                </div>
                <div id="noImagesMessage" class="text-center py-12 text-gray-500 hidden">
                    <i data-feather="image" class="w-16 h-16 mx-auto mb-4 text-gray-300"></i>
                    <p>No webhook images generated yet. Send some data to see visualizations here!</p>
                </div>
            </div>
        </main>

        <footer class="mt-16 text-center text-gray-600">
            <p>© 2023 Webhook Image Generator. All data is processed securely.</p>
        </footer>
    </div>

    <script src="script.js"></script>
    <script>feather.replace();</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>