File size: 12,087 Bytes
f00ccb2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Specializer</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .gradient-text {
            background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .neon-text {
            text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #0073e6, 0 0 20px #0073e6;
        }
        
        .vintage-text {
            font-family: 'Times New Roman', serif;
            color: #5c4d3c;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
            letter-spacing: 0.05em;
        }
        
        .glitch-effect {
            position: relative;
        }
        
        .glitch-effect::before, .glitch-effect::after {
            content: attr(data-text);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        
        .glitch-effect::before {
            color: #0ff;
            z-index: -1;
            animation: glitch 3s infinite;
        }
        
        .glitch-effect::after {
            color: #f0f;
            z-index: -2;
            animation: glitch 2s infinite reverse;
        }
        
        @keyframes glitch {
            0% { transform: translate(0); }
            20% { transform: translate(-3px, 3px); }
            40% { transform: translate(-3px, -3px); }
            60% { transform: translate(3px, 3px); }
            80% { transform: translate(3px, -3px); }
            100% { transform: translate(0); }
        }
        
        .typewriter {
            overflow: hidden;
            border-right: .15em solid #333;
            white-space: nowrap;
            animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
        }
        
        @keyframes typing {
            from { width: 0 }
            to { width: 100% }
        }
        
        @keyframes blink-caret {
            from, to { border-color: transparent }
            50% { border-color: #333; }
        }
    </style>
</head>
<body class="bg-gray-100 min-h-screen">
    <div class="container mx-auto px-4 py-8">
        <header class="text-center mb-8">
            <h1 class="text-4xl font-bold gradient-text mb-2">Text Specializer</h1>
            <p class="text-gray-600">Transform your text into something extraordinary!</p>
        </header>
        
        <div class="bg-white rounded-xl shadow-lg overflow-hidden mb-8">
            <div class="p-6">
                <div class="mb-6">
                    <label for="inputText" class="block text-gray-700 font-medium mb-2">Enter your text:</label>
                    <textarea id="inputText" rows="4" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition duration-200" placeholder="Type something amazing..."></textarea>
                </div>
                
                <div class="mb-6">
                    <label class="block text-gray-700 font-medium mb-2">Choose a style:</label>
                    <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3">
                        <button onclick="transformText('gradient')" class="style-btn bg-gradient-to-r from-blue-500 to-purple-500 text-white">
                            <i class="fas fa-paint-brush mr-2"></i> Gradient
                        </button>
                        <button onclick="transformText('neon')" class="style-btn bg-gray-800 text-white">
                            <i class="fas fa-lightbulb mr-2"></i> Neon
                        </button>
                        <button onclick="transformText('vintage')" class="style-btn bg-amber-700 text-white">
                            <i class="fas fa-scroll mr-2"></i> Vintage
                        </button>
                        <button onclick="transformText('glitch')" class="style-btn bg-purple-900 text-white">
                            <i class="fas fa-bug mr-2"></i> Glitch
                        </button>
                        <button onclick="transformText('typewriter')" class="style-btn bg-gray-700 text-white">
                            <i class="fas fa-keyboard mr-2"></i> Typewriter
                        </button>
                        <button onclick="transformText('bold')" class="style-btn bg-gray-200 text-gray-800">
                            <i class="fas fa-bold mr-2"></i> Bold
                        </button>
                        <button onclick="transformText('italic')" class="style-btn bg-gray-200 text-gray-800">
                            <i class="fas fa-italic mr-2"></i> Italic
                        </button>
                        <button onclick="transformText('uppercase')" class="style-btn bg-gray-200 text-gray-800">
                            <i class="fas fa-text-height mr-2"></i> Uppercase
                        </button>
                    </div>
                </div>
                
                <div class="mb-4">
                    <label class="block text-gray-700 font-medium mb-2">Special characters:</label>
                    <div class="flex flex-wrap gap-2 mb-4">
                        <button onclick="addSymbol('β˜…')" class="symbol-btn">β˜…</button>
                        <button onclick="addSymbol('β˜†')" class="symbol-btn">β˜†</button>
                        <button onclick="addSymbol('✿')" class="symbol-btn">✿</button>
                        <button onclick="addSymbol('β™₯')" class="symbol-btn">β™₯</button>
                        <button onclick="addSymbol('β˜€')" class="symbol-btn">β˜€</button>
                        <button onclick="addSymbol('☁')" class="symbol-btn">☁</button>
                        <button onclick="addSymbol('⚑')" class="symbol-btn">⚑</button>
                        <button onclick="addSymbol('❄')" class="symbol-btn">❄</button>
                    </div>
                </div>
                
                <div class="flex justify-between items-center">
                    <div>
                        <button onclick="copyToClipboard()" class="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition duration-200">
                            <i class="fas fa-copy mr-2"></i> Copy
                        </button>
                        <button onclick="clearText()" class="ml-2 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition duration-200">
                            <i class="fas fa-trash-alt mr-2"></i> Clear
                        </button>
                    </div>
                    <div class="text-sm text-gray-500" id="charCount">0 characters</div>
                </div>
            </div>
        </div>
        
        <div class="bg-white rounded-xl shadow-lg overflow-hidden">
            <div class="p-6">
                <h2 class="text-xl font-semibold text-gray-800 mb-4">Your Specialized Text:</h2>
                <div id="outputText" class="min-h-32 p-4 border border-gray-200 rounded-lg bg-gray-50">
                    <p class="text-gray-400 italic">Your transformed text will appear here...</p>
                </div>
            </div>
        </div>
    </div>

    <footer class="text-center py-6 text-gray-500 text-sm">
        <p>Made with <i class="fas fa-heart text-red-500"></i> using HTML, CSS & JavaScript</p>
    </footer>

    <script>
        const inputText = document.getElementById('inputText');
        const outputText = document.getElementById('outputText');
        const charCount = document.getElementById('charCount');
        
        // Update character count
        inputText.addEventListener('input', function() {
            const count = this.value.length;
            charCount.textContent = `${count} character${count !== 1 ? 's' : ''}`;
        });
        
        // Text transformation functions
        function transformText(style) {
            const text = inputText.value.trim();
            if (!text) {
                alert('Please enter some text first!');
                return;
            }
            
            let transformedText = text;
            let className = '';
            
            switch(style) {
                case 'gradient':
                    className = 'gradient-text text-2xl font-bold';
                    break;
                case 'neon':
                    className = 'neon-text text-2xl font-bold text-blue-400';
                    break;
                case 'vintage':
                    className = 'vintage-text text-xl italic';
                    break;
                case 'glitch':
                    className = 'glitch-effect text-2xl font-bold relative';
                    transformedText = `<span data-text="${text}">${text}</span>`;
                    break;
                case 'typewriter':
                    className = 'typewriter text-xl font-mono';
                    break;
                case 'bold':
                    className = 'font-bold';
                    break;
                case 'italic':
                    className = 'italic';
                    break;
                case 'uppercase':
                    className = 'uppercase';
                    break;
            }
            
            outputText.innerHTML = `<p class="${className}">${transformedText}</p>`;
        }
        
        // Add special symbol
        function addSymbol(symbol) {
            const currentText = inputText.value;
            const cursorPos = inputText.selectionStart;
            const newText = currentText.substring(0, cursorPos) + symbol + currentText.substring(cursorPos);
            inputText.value = newText;
            inputText.focus();
            inputText.setSelectionRange(cursorPos + symbol.length, cursorPos + symbol.length);
        }
        
        // Copy to clipboard
        function copyToClipboard() {
            if (!outputText.textContent.trim() || outputText.textContent.includes('Your transformed text')) {
                alert('Nothing to copy! Transform some text first.');
                return;
            }
            
            const range = document.createRange();
            range.selectNode(outputText);
            window.getSelection().removeAllRanges();
            window.getSelection().addRange(range);
            document.execCommand('copy');
            window.getSelection().removeAllRanges();
            
            // Show feedback
            const originalText = outputText.innerHTML;
            outputText.innerHTML = '<p class="text-green-500 font-medium">Copied to clipboard!</p>';
            setTimeout(() => {
                outputText.innerHTML = originalText;
            }, 1500);
        }
        
        // Clear all text
        function clearText() {
            inputText.value = '';
            outputText.innerHTML = '<p class="text-gray-400 italic">Your transformed text will appear here...</p>';
            charCount.textContent = '0 characters';
        }
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=MarkTheArtist/text-visualiser" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>