Text Fancy
Text Fancy
DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><مزخرف النصوص العربية/title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?
family=Tajawal:wght@400;500;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Tajawal', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.copy-animation {
animation: pulse 1s;
}
@keyframes pulse {
0% { background-color: #4338ca; }
50% { background-color: #6366f1; }
100% { background-color: #4338ca; }
}
.output-box {
background: rgba(255, 255, 255, 0.9);
border-radius: 12px;
padding: 12px;
margin-bottom: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
position: relative;
transition: all 0.3s ease;
border: 1px solid rgba(79, 70, 229, 0.2);
}
.output-box:hover {
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
border-color: rgba(79, 70, 229, 0.5);
}
.copy-btn {
position: absolute;
right: 8px;
top: 8px;
background: rgba(79, 70, 229, 0.1);
border-radius: 50%;
width: 30px;
height: 30px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
transition: all 0.2s ease;
}
.copy-btn:hover {
background: rgba(79, 70, 229, 0.2);
}
.copy-btn:active {
transform: scale(0.95);
}
.style-label {
position: absolute;
left: 8px;
top: 8px;
background: linear-gradient(135deg, #4f46e5, #6366f1);
color: white;
border-radius: 10px;
padding: 2px 8px;
font-size: 0.7rem;
font-weight: 600;
}
.emoji-btn {
transition: all 0.3s ease;
border-radius: 12px;
overflow: hidden;
position: relative;
user-select: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
}
.emoji-btn::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%,
rgba(255,255,255,0) 100%);
opacity: 0;
transition: opacity 0.3s ease;
}
.emoji-btn:hover::before {
opacity: 1;
}
.emoji-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.emoji-btn:active {
transform: scale(0.95);
}
.emoji-btn.copied {
animation: copied-animation 0.5s ease;
}
@keyframes copied-animation {
0% { background-color: rgba(79, 70, 229, 0.2); }
50% { background-color: rgba(79, 70, 229, 0.4); }
100% { background-color: rgba(79, 70, 229, 0.2); }
}
.main-container {
background: rgba(255, 255, 255, 0.9);
border-radius: 24px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.5);
}
.header {
background: linear-gradient(135deg, #4f46e5, #6366f1);
padding: 20px;
text-align: center;
position: relative;
}
.header h1 {
font-size: 2rem;
font-weight: 700;
color: white;
margin-bottom: 5px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header p {
color: rgba(255, 255, 255, 0.9);
font-size: 1rem;
}
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-5px); }
100% { transform: translateY(0px); }
}
.floating {
animation: float 3s ease-in-out infinite;
}
.input-field {
background: rgba(255, 255, 255, 0.9);
border: 2px solid rgba(79, 70, 229, 0.3);
border-radius: 12px;
padding: 12px;
font-size: 1.2rem;
transition: all 0.3s ease;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.input-field:focus {
border-color: rgba(79, 70, 229, 0.7);
box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
outline: none;
}
.clear-btn {
background: linear-gradient(135deg, #f43f5e, #e11d48);
color: white;
border-radius: 10px;
padding: 10px 16px;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.clear-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}
.clear-btn:active {
transform: translateY(1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.emoji-section {
background: rgba(255, 255, 255, 0.5);
border-radius: 16px;
padding: 15px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
margin-bottom: 20px;
display: none;
max-height: 400px;
overflow-y: auto;
}
.emoji-section.active {
display: block;
}
.emoji-section h3 {
font-size: 1.1rem;
font-weight: 600;
color: #4f46e5;
margin-bottom: 10px;
text-align: center;
}
.emoji-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
}
.emoji-category {
margin-bottom: 15px;
border-bottom: 1px solid rgba(79, 70, 229, 0.2);
padding-bottom: 10px;
}
.emoji-category:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.tooltip {
position: absolute;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.7rem;
bottom: -25px;
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
}
.emoji-btn:hover .tooltip {
opacity: 1;
}
.emoji-toggle-btn {
background: linear-gradient(135deg, #4f46e5, #6366f1);
color: white;
border-radius: 10px;
padding: 10px 16px;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.emoji-toggle-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}
.emoji-toggle-btn:active {
transform: translateY(1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body class="p-4 md:p-8">
<div class="max-w-4xl mx-auto main-container">
<div class="header">
<h1 class="floating"><مزخرف النصوص العربية/h1>
<p><اكتب نصك واحصل على تنسيقات مزخرفة متعددة/p>
</div>
<div class="p-6">
<!-- Control Buttons -->
<div class="flex justify-between mb-4">
<button id="emojiToggleBtn" class="emoji-toggle-btn">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5"
fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0
11-18 0 9 9 0 0118 0z" />
</svg>
عرض الرموز
</button>
<button id="clearAllBtn" class="clear-btn flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 ml-1"
fill="none" viewBox="0 0 24 24" stroke="currentColor">
<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" />
</svg>
مسح الكل
</button>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const inputField = document.getElementById('input');
const clearAllBtn = document.getElementById('clearAllBtn');
const emojiButtons = document.querySelectorAll('.emoji-btn');
const copyButtons = document.querySelectorAll('.copy-btn');
const emojiToggleBtn = document.getElementById('emojiToggleBtn');
const emojiSection = document.getElementById('emojiSection');
// Output fields
const output1 = document.getElementById('output-1');
const output2 = document.getElementById('output-2');
const output3 = document.getElementById('output-3');
const output4 = document.getElementById('output-4');
const output5 = document.getElementById('output-5');
const output6 = document.getElementById('output-6');
return result;
}
// Visual feedback
this.classList.add('bg-indigo-100');
setTimeout(() => {
this.classList.remove('bg-indigo-100');
}, 200);
});
btn.addEventListener('mousedown', function() {
const emoji = this.getAttribute('data-emoji');
pressTimer = window.setTimeout(() => {
copyToClipboard(emoji);
btn.addEventListener('mouseup', function() {
clearTimeout(pressTimer);
});
btn.addEventListener('mouseleave', function() {
clearTimeout(pressTimer);
});
btn.addEventListener('touchend', function() {
clearTimeout(pressTimer);
});
btn.addEventListener('touchmove', function() {
clearTimeout(pressTimer);
});
});
document.body.appendChild(toast);
// Copy buttons
copyButtons.forEach(btn => {
btn.addEventListener('click', function() {
const index = parseInt(this.dataset.index);
let textToCopy = '';
switch(index) {
case 0: textToCopy = output1.textContent; break;
case 1: textToCopy = output2.textContent; break;
case 2: textToCopy = output3.textContent; break;
case 3: textToCopy = output4.textContent; break;
case 4: textToCopy = output5.textContent; break;
case 5: textToCopy = output6.textContent; break;
}
// Copy to clipboard
copyToClipboard(textToCopy);
// Visual feedback
this.innerHTML = `
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4"
fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
`;
setTimeout(() => {
this.innerHTML = `
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4"
fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-
linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0
002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0
012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
</svg>
`;
}, 2000);
});
});
// Visual feedback
this.classList.add('bg-red-700');
setTimeout(() => {
this.classList.remove('bg-red-700');
}, 200);
});