File size: 3,801 Bytes
bdd7865
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Create Link | WhisperLink</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://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
</head>
<body class="bg-gradient-to-br from-indigo-900 to-purple-800 min-h-screen">
    <custom-navbar></custom-navbar>
    
    <main class="py-12 px-4 sm:px-6 lg:px-8">
        <div class="max-w-2xl mx-auto bg-white/10 backdrop-blur-md rounded-xl shadow-2xl overflow-hidden fade-in">
            <div class="p-8">
                <h2 class="text-2xl font-bold text-white mb-6 flex items-center gap-2">
                    <i data-feather="link"></i>
                    Create New Whisper Link
                </h2>
                
                <form id="createLinkForm" class="space-y-6">
                    <div>
                        <label for="linkName" class="block text-sm font-medium text-indigo-100 mb-1">Link Name</label>
                        <input type="text" id="linkName" name="linkName" 
                               class="w-full bg-white/20 border border-white/30 rounded-md px-4 py-2 text-white placeholder-indigo-200 focus:outline-none focus:ring-2 focus:ring-indigo-300">
                        <p class="mt-1 text-sm text-indigo-200">This will help you identify the link later</p>
                    </div>
                    
                    <div>
                        <label class="flex items-center space-x-3">
                            <input type="checkbox" name="isPublic" class="form-checkbox h-5 w-5 text-indigo-500 rounded">
                            <span class="text-indigo-100">Public Link (appear in directory)</span>
                        </label>
                    </div>
                    
                    <div>
                        <label for="customSlug" class="block text-sm font-medium text-indigo-100 mb-1">Custom URL (optional)</label>
                        <div class="flex">
                            <span class="inline-flex items-center px-3 rounded-l-md bg-indigo-700 text-white text-sm">
                                whisperlink.me/
                            </span>
                            <input type="text" id="customSlug" name="customSlug" 
                                   class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md bg-white/20 text-white placeholder-indigo-200 focus:outline-none focus:ring-2 focus:ring-indigo-300">
                        </div>
                    </div>
                    
                    <div class="pt-4">
                        <button type="submit" class="w-full bg-indigo-500 hover:bg-indigo-600 text-white font-medium py-2 px-4 rounded-md transition duration-300 flex items-center justify-center gap-2">
                            <i data-feather="plus"></i>
                            Create Link
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </main>

    <custom-footer></custom-footer>

    <script src="components/navbar.js"></script>
    <script src="components/footer.js"></script>
    <script src="script.js"></script>
    <script>
        feather.replace();
        
        document.getElementById('createLinkForm').addEventListener('submit', (e) => {
            e.preventDefault();
            // In a real app, this would make an API call
            alert('Link created successfully!');
        });
    </script>
</body>
</html>