Spaces:
Running
عندما احدد كلمة او جمله تظهر خانة فيها تكبير وتصغير وتغيير شكل النص لا انني اريد فقط ان تظهر في الخانه التي تظهر عندما احدد الكلمه او الجمله زرين التكبير والتصغر فقط والباقي المستخدم يعمل كل حاجه من خلال الازرار التي موجوده من الاساس في الشريطه الجانبيه ويمكن ان احذف الجمله كلها لا تغير اي شئ في الموقع الا الاشياء التي قلتها لك واصلح الاخطاء التي غي الموقع<!DOCTYPE html>
Browse files<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>سؤال - منصة تعليمية للمعلمين</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #f59e0b;
--success-color: #10b981;
--danger-color: #ef4444;
--warning-color: #f59e0b;
--info-color: #3b82f6;
--light-bg: #f8fafc;
--white: #ffffff;
--gray-100: #f1f5f9;
--gray-200: #e2e8f0;
--gray-300: #cbd5e1;
--gray-400: #94a3b8;
--gray-500: #64748b;
--gray-600: #475569;
--gray-700: #334155;
--gray-800: #1e293b;
--gray-900: #0f172a;
--border-radius: 12px;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
body {
font-family: 'Noto Sans Arabic', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
direction: rtl;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Custom Scrollbar Styles */
.sidebar::-webkit-scrollbar,
.document-editor::-webkit-scrollbar {
width: 8px;
}
.sidebar::-webkit-scrollbar-track,
.document-editor::-webkit-scrollbar-track {
background: rgba(241, 245, 249, 0.5);
border-radius: 10px;
margin: 5px;
}
.sidebar::-webkit-scrollbar-thumb,
.document-editor::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 10px;
border: 2px solid rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
}
.sidebar::-webkit-scrollbar-thumb:hover,
.document-editor::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
border: 2px solid rgba(255, 255, 255, 0.3);
transform: scale(1.1);
}
.sidebar::-webkit-scrollbar-thumb:active,
.document-editor::-webkit-scrollbar-thumb:active {
background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
}
.sidebar::-webkit-scrollbar-corner,
.document-editor::-webkit-scrollbar-corner {
background: transparent;
}
/* Firefox Scrollbar */
.sidebar,
.document-editor {
scrollbar-width: thin;
scrollbar-color: #667eea rgba(241, 245, 249, 0.5);
}
/* Enhanced Scrollbar Animation */
.sidebar:hover::-webkit-scrollbar-thumb,
.document-editor:hover::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
/* Scrollbar for different sections */
.control-textarea::-webkit-scrollbar {
width: 6px;
}
.control-textarea::-webkit-scrollbar-track {
background: rgba(241, 245, 249, 0.3);
border-radius: 8px;
}
.control-textarea::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.2);
}
.control-textarea::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
box-shadow: 0 1px 4px rgba(102, 126, 234, 0.2);
}
/* Header Styles */
.header {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
padding: 1rem 0;
box-shadow: var(--shadow);
position: sticky;
top: 0;
z-index: 1000;
}
.nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 2rem;
font-weight: 700;
color: var(--primary-color);
text-decoration: none;
}
.nav-buttons {
display: flex;
gap: 1rem;
}
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: var(--border-radius);
font-weight: 500;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.btn-primary {
background: var(--primary-color);
color: white;
}
.btn-primary:hover {
background: var(--secondary-color);
transform: translateY(-2px);
}
.btn-secondary {
background: transparent;
color: var(--primary-color);
border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
background: var(--primary-color);
color: white;
}
.btn-success {
background: var(--success-color);
color: white;
}
.btn-danger {
background: var(--danger-color);
color: white;
}
/* Auth Forms */
.auth-container {
display: none;
justify-content: center;
align-items: center;
min-height: 100vh;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 2000;
}
.auth-form {
background: white;
padding: 3rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow-lg);
width: 100%;
max-width: 400px;
text-align: center;
}
.form-title {
font-size: 2rem;
font-weight: 600;
color: var(--gray-800);
margin-bottom: 2rem;
}
.form-group {
margin-bottom: 1.5rem;
text-align: right;
}
.form-label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: var(--gray-700);
}
.form-input {
width: 100%;
padding: 0.75rem;
border: 2px solid var(--gray-200);
border-radius: var(--border-radius);
font-size: 1rem;
transition: border-color 0.3s ease;
}
.form-input:focus {
outline: none;
border-color: var(--primary-color);
}
.close-btn {
position: absolute;
top: 1rem;
left: 1rem;
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--gray-500);
}
/* Main Content */
.main-content {
padding: 2rem 0;
min-height: calc(100vh - 80px);
}
.welcome-section {
text-align: center;
padding: 4rem 0;
color: white;
margin-bottom: 3rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.welcome-title {
font-size: 3.5rem;
font-weight: 700;
margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.welcome-subtitle {
font-size: 1.5rem;
margin-bottom: 2rem;
opacity: 0.9;
}
/* Dashboard */
.dashboard {
display: none;
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
overflow: hidden;
}
.dashboard-header {
background: var(--primary-color);
color: white;
padding: 2rem;
text-align: center;
}
.dashboard-content {
display: flex;
min-height: 600px;
}
.sidebar {
width: 300px;
background: var(--gray-100);
padding: 2rem;
border-left: 1px solid var(--gray-200);
overflow-y: auto;
max-height: 600px;
}
.sidebar-section {
margin-bottom: 2rem;
}
.sidebar-title {
font-size: 1.25rem;
font-weight: 600;
color: var(--gray-800);
margin-bottom: 1rem;
}
.control-group {
margin-bottom: 1rem;
}
.control-label {
display: block;
- README.md +9 -5
- index.html +169 -18
|
@@ -1,10 +1,14 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: undefined
|
| 3 |
+
colorFrom: red
|
| 4 |
+
colorTo: purple
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
| 14 |
+
|
|
@@ -1,19 +1,170 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
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+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Text Zoom Controls</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 9 |
+
<style>
|
| 10 |
+
.text-selection-toolbar {
|
| 11 |
+
position: absolute;
|
| 12 |
+
background: rgba(0,0,0,0.9);
|
| 13 |
+
border-radius: 8px;
|
| 14 |
+
padding: 6px;
|
| 15 |
+
display: flex;
|
| 16 |
+
gap: 4px;
|
| 17 |
+
z-index: 1000;
|
| 18 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
| 19 |
+
transform: translateY(-100%) translateY(-8px);
|
| 20 |
+
opacity: 0;
|
| 21 |
+
transition: opacity 0.2s ease;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
.text-selection-toolbar.visible {
|
| 25 |
+
opacity: 1;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.text-selection-toolbar button {
|
| 29 |
+
background: #3b82f6;
|
| 30 |
+
color: white;
|
| 31 |
+
border: none;
|
| 32 |
+
border-radius: 4px;
|
| 33 |
+
width: 32px;
|
| 34 |
+
height: 32px;
|
| 35 |
+
display: flex;
|
| 36 |
+
align-items: center;
|
| 37 |
+
justify-content: center;
|
| 38 |
+
cursor: pointer;
|
| 39 |
+
transition: background 0.2s ease;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.text-selection-toolbar button:hover {
|
| 43 |
+
background: #2563eb;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.text-selection-toolbar button i {
|
| 47 |
+
width: 16px;
|
| 48 |
+
height: 16px;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.highlighted-text {
|
| 52 |
+
background: rgba(59, 130, 246, 0.2);
|
| 53 |
+
border-radius: 2px;
|
| 54 |
+
position: relative;
|
| 55 |
+
}
|
| 56 |
+
</style>
|
| 57 |
+
</head>
|
| 58 |
+
<body class="bg-gray-50 min-h-screen p-8">
|
| 59 |
+
<div class="max-w-4xl mx-auto bg-white rounded-xl shadow-md p-6">
|
| 60 |
+
<h1 class="text-3xl font-bold text-gray-800 mb-6">Text Selection Demo</h1>
|
| 61 |
+
|
| 62 |
+
<div class="prose max-w-none" id="content">
|
| 63 |
+
<p class="text-gray-700 mb-4">Select any text in this paragraph to see the zoom controls appear. These controls will allow you to increase or decrease the font size of the selected text. The toolbar is minimal and only shows the essential zoom functions.</p>
|
| 64 |
+
|
| 65 |
+
<p class="text-gray-700 mb-4">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor.</p>
|
| 66 |
+
|
| 67 |
+
<p class="text-gray-700">Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Curabitur aliquet quam id dui posuere blandit. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus.</p>
|
| 68 |
+
</div>
|
| 69 |
+
</div>
|
| 70 |
+
|
| 71 |
+
<div class="text-selection-toolbar" id="textToolbar">
|
| 72 |
+
<button id="increaseFontSize" title="Increase font size">
|
| 73 |
+
<i data-feather="plus"></i>
|
| 74 |
+
</button>
|
| 75 |
+
<button id="decreaseFontSize" title="Decrease font size">
|
| 76 |
+
<i data-feather="minus"></i>
|
| 77 |
+
</button>
|
| 78 |
+
</div>
|
| 79 |
+
|
| 80 |
+
<script>
|
| 81 |
+
feather.replace();
|
| 82 |
+
|
| 83 |
+
let currentSelection = null;
|
| 84 |
+
let highlightedElement = null;
|
| 85 |
+
|
| 86 |
+
document.addEventListener('mouseup', function(e) {
|
| 87 |
+
const selection = window.getSelection();
|
| 88 |
+
|
| 89 |
+
if (selection.toString().trim().length > 0) {
|
| 90 |
+
showToolbar(selection);
|
| 91 |
+
} else {
|
| 92 |
+
hideToolbar();
|
| 93 |
+
removeHighlights();
|
| 94 |
+
}
|
| 95 |
+
});
|
| 96 |
+
|
| 97 |
+
document.addEventListener('mousedown', function(e) {
|
| 98 |
+
if (!e.target.closest('#textToolbar')) {
|
| 99 |
+
hideToolbar();
|
| 100 |
+
removeHighlights();
|
| 101 |
+
}
|
| 102 |
+
});
|
| 103 |
+
|
| 104 |
+
function showToolbar(selection) {
|
| 105 |
+
const range = selection.getRangeAt(0);
|
| 106 |
+
const rect = range.getBoundingClientRect();
|
| 107 |
+
const toolbar = document.getElementById('textToolbar');
|
| 108 |
+
|
| 109 |
+
// Highlight the selected text
|
| 110 |
+
highlightSelection(range);
|
| 111 |
+
|
| 112 |
+
// Position the toolbar above the selection
|
| 113 |
+
toolbar.style.left = `${rect.left + window.scrollX + (rect.width / 2) - (toolbar.offsetWidth / 2)}px`;
|
| 114 |
+
toolbar.style.top = `${rect.top + window.scrollY}px`;
|
| 115 |
+
|
| 116 |
+
toolbar.classList.add('visible');
|
| 117 |
+
currentSelection = selection;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
function hideToolbar() {
|
| 121 |
+
const toolbar = document.getElementById('textToolbar');
|
| 122 |
+
toolbar.classList.remove('visible');
|
| 123 |
+
currentSelection = null;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
function highlightSelection(range) {
|
| 127 |
+
// Remove previous highlight
|
| 128 |
+
removeHighlights();
|
| 129 |
+
|
| 130 |
+
// Create a span to highlight the selected text
|
| 131 |
+
const span = document.createElement('span');
|
| 132 |
+
span.className = 'highlighted-text';
|
| 133 |
+
|
| 134 |
+
// Surround the selected text with the span
|
| 135 |
+
range.surroundContents(span);
|
| 136 |
+
|
| 137 |
+
// Store reference to the highlighted element
|
| 138 |
+
highlightedElement = span;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
function removeHighlights() {
|
| 142 |
+
if (highlightedElement) {
|
| 143 |
+
// Replace the highlight span with its contents
|
| 144 |
+
const parent = highlightedElement.parentNode;
|
| 145 |
+
while (highlightedElement.firstChild) {
|
| 146 |
+
parent.insertBefore(highlightedElement.firstChild, highlightedElement);
|
| 147 |
+
}
|
| 148 |
+
parent.removeChild(highlightedElement);
|
| 149 |
+
highlightedElement = null;
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
document.getElementById('increaseFontSize').addEventListener('click', function() {
|
| 154 |
+
if (highlightedElement) {
|
| 155 |
+
const currentSize = parseInt(window.getComputedStyle(highlightedElement).fontSize) || 16;
|
| 156 |
+
highlightedElement.style.fontSize = `${currentSize + 2}px`;
|
| 157 |
+
}
|
| 158 |
+
hideToolbar();
|
| 159 |
+
});
|
| 160 |
+
|
| 161 |
+
document.getElementById('decreaseFontSize').addEventListener('click', function() {
|
| 162 |
+
if (highlightedElement) {
|
| 163 |
+
const currentSize = parseInt(window.getComputedStyle(highlightedElement).fontSize) || 16;
|
| 164 |
+
highlightedElement.style.fontSize = `${Math.max(currentSize - 2, 8)}px`;
|
| 165 |
+
}
|
| 166 |
+
hideToolbar();
|
| 167 |
+
});
|
| 168 |
+
</script>
|
| 169 |
+
</body>
|
| 170 |
</html>
|