sameernotes commited on
Commit
47206c2
·
verified ·
1 Parent(s): 305f98d

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +350 -0
index.html ADDED
@@ -0,0 +1,350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class=""> <!-- Start without 'dark' initially -->
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Home - AI Text Tools</title>
7
+ <!-- Tailwind CSS via CDN -->
8
+ <script src="https://cdn.tailwindcss.com/3.4.1"></script>
9
+ <script>
10
+ // Tailwind config
11
+ tailwind.config = {
12
+ darkMode: 'class',
13
+ theme: {
14
+ extend: {
15
+ colors: { primary: '#1a73e8', secondary: '#e8f0fe' },
16
+ borderRadius: { 'none': '0px', 'sm': '4px', DEFAULT: '8px', 'md': '12px', 'lg': '16px', 'xl': '20px', '2xl': '24px', '3xl': '32px', 'full': '9999px', 'button': '8px' }
17
+ }
18
+ }
19
+ }
20
+ </script>
21
+ <!-- Fonts -->
22
+ <link rel="preconnect" href="https://fonts.googleapis.com">
23
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
24
+ <link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
25
+ <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
26
+ <!-- Icons -->
27
+ <link href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css" rel="stylesheet">
28
+ <!-- Custom Styles -->
29
+ <style>
30
+ body { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
31
+ .hindi-font { font-family: 'Noto Sans Devanagari', sans-serif; }
32
+ .custom-switch { position: relative; display: inline-block; width: 50px; height: 24px; }
33
+ .custom-switch-input { opacity: 0; width: 0; height: 0; }
34
+ .custom-switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
35
+ .custom-switch-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
36
+ .custom-switch-input:checked + .custom-switch-slider { background-color: #1a73e8; }
37
+ .custom-switch-input:checked + .custom-switch-slider:before { transform: translateX(26px); }
38
+ *:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3); }
39
+ /* Base Dark Mode */
40
+ html.dark body { background-color: #1a202c; color: #e2e8f0; }
41
+ html.dark header, html.dark footer { background-color: #2d3748; color: #e2e8f0; }
42
+ html.dark .card { background-color: #2d3748; border-color: #4a5568; }
43
+ html.dark h1, html.dark h2, html.dark h3, html.dark p, html.dark span, html.dark li, html.dark label, html.dark small, html.dark strong, html.dark button:not(.bg-red-500):not(.bg-green-600), html.dark a { color: #e2e8f0; }
44
+ html.dark a.text-primary { color: #60a5fa; }
45
+ html.dark .text-gray-600, html.dark .text-gray-700, html.dark .text-gray-800, html.dark .text-gray-900 { color: #a0aec0; }
46
+ html.dark .text-gray-500, html.dark .text-gray-400 { color: #718096; }
47
+ html.dark .bg-white { background-color: #2d3748 !important; }
48
+ html.dark .bg-gray-50 { background-color: #1a202c !important; }
49
+ html.dark .bg-gray-100 { background-color: #374151 !important; }
50
+ html.dark .border-gray-100, html.dark .border-gray-200 { border-color: #4a5568 !important; }
51
+ /* Dark mode Forms/Inputs */
52
+ html.dark input, html.dark textarea { background-color: #1f2937; border-color: #4b5563; color: #e5e7eb; }
53
+ html.dark input::placeholder, html.dark textarea::placeholder { color: #6b7280; }
54
+ /* Style for step list items */
55
+ .step-item { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
56
+ .step-icon { flex-shrink: 0; width: 1.75rem; height: 1.75rem; display: inline-flex; align-items: center; justify-content: center; background-color: #e8f0fe; color: #1a73e8; border-radius: 50%; font-weight: 600; font-size: 0.875rem; }
57
+ html.dark .step-icon { background-color: #374151; color: #60a5fa;}
58
+ .step-content { margin-top: 0.1rem; }
59
+ /* Video Styling */
60
+ .video-container video {
61
+ display: block; /* Remove extra space below video */
62
+ width: 100%; /* Ensure video scales down */
63
+ height: auto; /* Maintain aspect ratio */
64
+ border-radius: 8px; /* Match card rounding */
65
+ border: 1px solid #e5e7eb; /* Subtle border */
66
+ background-color: #000; /* Black background for letterboxing or loading */
67
+ }
68
+ html.dark .video-container video {
69
+ border-color: #4b5563; /* Dark mode border */
70
+ }
71
+ /* Ensure nav link styling is consistent */
72
+ .nav-link { transition: color 0.2s ease-in-out; }
73
+
74
+ /* Make the tutorial section responsive */
75
+ @media (max-width: 767px) {
76
+ .tutorial-container {
77
+ flex-direction: column;
78
+ }
79
+ }
80
+ </style>
81
+ </head>
82
+ <body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-200">
83
+
84
+ <!-- Header -->
85
+ <header class="bg-white dark:bg-gray-800 shadow-sm sticky top-0 z-50">
86
+ <div class="container mx-auto px-4 py-3 flex items-center justify-between">
87
+ <div class="flex items-center">
88
+ <a href="index.html" class="text-2xl font-['Pacifico'] text-primary dark:text-blue-400 mr-8" data-lang-en="AI Text Tools" data-lang-hi="एआई टेक्स्ट उपकरण">AI Text Tools</a>
89
+ <!-- Navigation Bar -->
90
+ <nav id="mainNav" class="hidden md:flex space-x-6">
91
+ <a href="index.html" class="nav-link text-primary dark:text-blue-400 font-medium" data-lang-en="Home" data-lang-hi="होम">Home</a>
92
+ <a href="recognizer.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Recognize" data-lang-hi="पहचानें">Recognize</a>
93
+ <a href="examples.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Examples" data-lang-hi="उदाहरण">Examples</a>
94
+ <a href="technology.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Technology" data-lang-hi="तकनीक">Technology</a>
95
+ <a href="about.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="About" data-lang-hi="बारे में">About</a>
96
+ <a href="contact.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Contact" data-lang-hi="संपर्क">Contact</a>
97
+ <a href="feedback.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Feedback" data-lang-hi="प्रतिक्रिया">Feedback</a>
98
+ </nav>
99
+ </div>
100
+ <!-- Right side header items -->
101
+ <div class="flex items-center space-x-4">
102
+ <div class="items-center space-x-2 hidden md:flex"> <span class="text-sm text-gray-600 dark:text-gray-400">EN</span> <label class="custom-switch"><input type="checkbox" id="languageToggle" class="custom-switch-input"><span class="custom-switch-slider"></span></label> <span class="text-sm text-gray-600 dark:text-gray-400 hindi-font">हिंदी</span> </div>
103
+ <div class="items-center space-x-2 hidden md:flex"> <span class="text-sm text-gray-600 dark:text-gray-400"><i class="ri-sun-line"></i></span> <label class="custom-switch"><input type="checkbox" id="themeToggle" class="custom-switch-input"><span class="custom-switch-slider"></span></label> <span class="text-sm text-gray-600 dark:text-gray-400"><i class="ri-moon-line"></i></span> </div>
104
+ <button class="md:hidden w-10 h-10 flex items-center justify-center" aria-label="Toggle Menu"><i class="ri-menu-line text-gray-600 dark:text-gray-300 text-xl"></i></button>
105
+ </div>
106
+ </div>
107
+ </header>
108
+
109
+ <!-- ===== Main Content Area ===== -->
110
+ <main class="flex-grow container mx-auto px-4 py-12">
111
+
112
+ <!-- Hero Section -->
113
+ <section class="text-center mb-16">
114
+ <h1 class="text-4xl md:text-5xl font-bold text-gray-800 dark:text-white mb-4 leading-tight" data-lang-en="Unlock Text Insights with AI" data-lang-hi="एआई के साथ टेक्स्ट अंतर्दृष्टि अनलॉक करें">
115
+ Unlock Text Insights with AI
116
+ </h1>
117
+ <p class="text-lg text-gray-600 dark:text-gray-400 max-w-3xl mx-auto mb-8" data-lang-en="Easily recognize Hindi text from images, translate languages, and predict gender from names using our powerful AI tools." data-lang-hi="हमारे शक्तिशाली एआई उपकरणों का उपयोग करके आसानी से छवियों से हिंदी पाठ पहचानें, भाषाओं का अनुवाद करें, और नामों से लिंग की भविष्यवाणी करें।">
118
+ Easily recognize Hindi text from images, translate languages, and predict gender from names using our powerful AI tools.
119
+ </p>
120
+ <a href="recognizer.html" class="inline-flex items-center justify-center gap-2 px-8 py-3 border border-transparent text-base font-medium rounded-button text-white bg-primary hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary dark:focus:ring-offset-gray-800 transition">
121
+ <i class="ri-camera-lens-line"></i>
122
+ <span data-lang-en="Get Started with OCR" data-lang-hi="ओसीआर के साथ आरंभ करें">Get Started with OCR</span>
123
+ </a>
124
+ </section>
125
+
126
+ <!-- Video & Tutorial Section - Side by Side Layout -->
127
+ <section class="mb-16">
128
+ <div class="max-w-6xl mx-auto">
129
+ <h2 class="text-2xl font-semibold text-center text-gray-800 dark:text-white mb-6" data-lang-en="How to Recognize Hindi Text" data-lang-hi="हिंदी पाठ कैसे पहचानें">
130
+ How to Recognize Hindi Text
131
+ </h2>
132
+
133
+ <!-- Two-column layout for desktop, stacked for mobile -->
134
+ <div class="tutorial-container flex flex-col md:flex-row gap-8">
135
+ <!-- LEFT SIDE: Video Container -->
136
+ <div class="w-full md:w-1/2 bg-white dark:bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-100 dark:border-gray-700 card">
137
+ <h3 class="text-xl font-semibold text-center text-gray-800 dark:text-white mb-4" data-lang-en="Watch the Tutorial" data-lang-hi="ट्यूटोरियल देखें">
138
+ Watch the Tutorial
139
+ </h3>
140
+ <p class="text-center text-gray-600 dark:text-gray-400 mb-6" data-lang-en="See the AI Text Tools in action with this step-by-step video guide." data-lang-hi="इस चरण-दर-चरण वीडियो गाइड के साथ एआई टेक्स्ट टूल को क्रियान्वित देखें।">
141
+ See the AI Text Tools in action with this step-by-step video guide.
142
+ </p>
143
+ <div class="video-container">
144
+ <video class="w-full" controls>
145
+ <source src="/samples/turotial.mp4" type="video/mp4">
146
+ <span data-lang-en="Your browser does not support the video tag. Please update your browser or use a different one to watch the tutorial." data-lang-hi="आपका ब्राउज़र वीडियो टैग का समर्थन नहीं करता है। कृपया ट्यूटोरियल देखने के लिए अपना ब्राउज़र अपडेट करें या किसी भिन्न ब्राउज़र का उपयोग करें।">
147
+ Your browser does not support the video tag. Please update your browser or use a different one to watch the tutorial.
148
+ </span>
149
+ </video>
150
+ </div>
151
+ </div>
152
+
153
+ <!-- RIGHT SIDE: Tutorial Steps -->
154
+ <div class="w-full md:w-1/2 bg-white dark:bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-100 dark:border-gray-700 card">
155
+ <h3 class="text-xl font-semibold text-center text-gray-800 dark:text-white mb-4" data-lang-en="Step-by-Step Guide" data-lang-hi="चरण-दर-चरण मार्गदर्शिका">
156
+ Step-by-Step Guide
157
+ </h3>
158
+ <ol class="space-y-4">
159
+ <li class="step-item">
160
+ <span class="step-icon">1</span>
161
+ <div class="step-content">
162
+ <strong data-lang-en="Login/Sign Up:" data-lang-hi="लॉग इन / साइन अप करें:">Login/Sign Up:</strong>
163
+ <span data-lang-en=" Access the application by logging in or creating a new account." data-lang-hi=" लॉग इन करके या नया खाता बनाकर एप्लिकेशन तक पहुंचें।"> Access the application by logging in or creating a new account.</span>
164
+ </div>
165
+ </li>
166
+ <li class="step-item">
167
+ <span class="step-icon">2</span>
168
+ <div class="step-content">
169
+ <strong data-lang-en="Go to Recognize:" data-lang-hi="पहचानें पर जाएं:">Go to Recognize:</strong>
170
+ <span data-lang-en=" Navigate to the 'Recognize' or 'Hindi OCR' tab/page." data-lang-hi=" 'पहचानें' या 'हिंदी ओसीआर' टैब/पेज पर नेविगेट करें।"> Navigate to the 'Recognize' or 'Hindi OCR' tab/page.</span>
171
+ </div>
172
+ </li>
173
+ <li class="step-item">
174
+ <span class="step-icon">3</span>
175
+ <div class="step-content">
176
+ <strong data-lang-en="Upload or Select:" data-lang-hi="अपलोड करें या चुनें:">Upload or Select:</strong>
177
+ <span data-lang-en=" Choose 'Choose File' to upload your Hindi word image (PNG, JPG) or click on one of the provided examples." data-lang-hi=" अपनी हिंदी शब्द छवि (PNG, JPG) अपलोड करने के लिए 'फ़ा���ल चुनें' चुनें या दिए गए उदाहरणों में से किसी एक पर क्लिक करें।"> Choose 'Choose File' to upload your Hindi word image (PNG, JPG) or click on one of the provided examples.</span>
178
+ </div>
179
+ </li>
180
+ <li class="step-item">
181
+ <span class="step-icon">4</span>
182
+ <div class="step-content">
183
+ <strong data-lang-en="Recognize Image:" data-lang-hi="छवि पहचानें:">Recognize Image:</strong>
184
+ <span data-lang-en=" Click the 'Recognize' button to start the analysis." data-lang-hi=" विश्लेषण शुरू करने के लिए 'पहचानें' बटन पर क्लिक करें।"> Click the 'Recognize' button to start the analysis.</span>
185
+ </div>
186
+ </li>
187
+ <li class="step-item">
188
+ <span class="step-icon">5</span>
189
+ <div class="step-content">
190
+ <strong data-lang-en="View Results:" data-lang-hi="परिणाम देखें:">View Results:</strong>
191
+ <span data-lang-en=" The recognized Hindi text and word detection preview will appear in the results area." data-lang-hi=" पहचाना गया हिंदी पाठ और शब्द पहचान पूर्वावलोकन परिणाम क्षेत्र में दिखाई देगा।"> The recognized Hindi text and word detection preview will appear in the results area.</span>
192
+ </div>
193
+ </li>
194
+ </ol>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </section>
199
+
200
+ <!-- Other Features Section -->
201
+ <section class="mb-16">
202
+ <h2 class="text-3xl font-bold text-center text-gray-800 dark:text-white mb-10" data-lang-en="Explore More Tools" data-lang-hi="और उपकरण एक्सप्लोर करें">
203
+ Explore More Tools
204
+ </h2>
205
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-4xl mx-auto">
206
+ <!-- Translation Feature Card -->
207
+ <div class="bg-white dark:bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-100 dark:border-gray-700 card text-center md:text-left">
208
+ <div class="flex justify-center md:justify-start mb-4">
209
+ <i class="ri-translate-2 text-4xl text-primary dark:text-blue-400"></i>
210
+ </div>
211
+ <h3 class="text-xl font-semibold mb-2" data-lang-en="Text Translation" data-lang-hi="पाठ अनुवाद">Text Translation</h3>
212
+ <p class="text-gray-600 dark:text-gray-400 mb-4" data-lang-en="Translate text between various languages. Supports auto-detection of source language." data-lang-hi="विभिन्न भाषाओं के बीच पाठ का अनुवाद करें। स्रोत भाषा का स्वतः पता लगाने का समर्थन करता है।">
213
+ Translate text between various languages. Supports auto-detection of source language.
214
+ </p>
215
+ <a href="recognizer.html#translationContent" class="text-primary dark:text-blue-400 hover:underline font-medium inline-flex items-center gap-1" data-lang-en="Go to Translator" data-lang-hi="अनुवादक पर जाएँ">
216
+ Go to Translator <i class="ri-arrow-right-line"></i>
217
+ </a>
218
+ </div>
219
+ <!-- Gender Prediction Feature Card -->
220
+ <div class="bg-white dark:bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-100 dark:border-gray-700 card text-center md:text-left">
221
+ <div class="flex justify-center md:justify-start mb-4">
222
+ <i class="ri-men-line text-4xl text-primary dark:text-blue-400"></i><i class="ri-women-line text-4xl text-primary dark:text-blue-400 -ml-2"></i>
223
+ </div>
224
+ <h3 class="text-xl font-semibold mb-2" data-lang-en="Gender Prediction" data-lang-hi="लिंग भविष्यवाणी">Gender Prediction</h3>
225
+ <p class="text-gray-600 dark:text-gray-400 mb-4" data-lang-en="Predict the likely gender associated with one or more names." data-lang-hi="एक या अधिक नामों से जुड़े संभावित लिंग की भविष्यवाणी करें।">
226
+ Predict the likely gender associated with one or more names.
227
+ </p>
228
+ <a href="recognizer.html#genderContent" class="text-primary dark:text-blue-400 hover:underline font-medium inline-flex items-center gap-1" data-lang-en="Go to Predictor" data-lang-hi="भविष��यवक्ता पर जाएँ">
229
+ Go to Predictor <i class="ri-arrow-right-line"></i>
230
+ </a>
231
+ </div>
232
+ </div>
233
+ </section>
234
+ </main>
235
+
236
+ <!-- Footer -->
237
+ <footer class="bg-gray-900 text-gray-400 py-12 mt-16">
238
+ <div class="container mx-auto px-4">
239
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
240
+ <div>
241
+ <a href="index.html" class="text-2xl font-['Pacifico'] text-white mb-4 inline-block" data-lang-en="AI Text Tools" data-lang-hi="एआई टेक्स्ट उपकरण">AI Text Tools</a>
242
+ <p class="mb-4 text-sm" data-lang-en="AI-powered tools for text analysis and processing." data-lang-hi="पाठ विश्लेषण और प्रसंस्करण के लिए एआई-संचालित उपकरण।">AI-powered tools for text analysis.</p>
243
+ <div class="flex space-x-4">
244
+ <a href="#" class="hover:text-white" title="GitHub (Placeholder)"><i class="ri-github-fill"></i></a>
245
+ <a href="#" class="hover:text-white" title="LinkedIn (Placeholder)"><i class="ri-linkedin-box-fill"></i></a>
246
+ </div>
247
+ </div>
248
+ <div>
249
+ <h3 class="text-lg font-medium text-white mb-4" data-lang-en="Quick Links" data-lang-hi="त्वरित लिंक्स">Quick Links</h3>
250
+ <ul class="space-y-2 text-sm">
251
+ <li><a href="home.html" class="hover:text-white" data-lang-en="Home" data-lang-hi="होम">Home</a></li>
252
+ <li><a href="index.html" class="hover:text-white" data-lang-en="Tools" data-lang-hi="उपकरण">Tools</a></li>
253
+ <li><a href="about.html" class="hover:text-white" data-lang-en="About" data-lang-hi="बारे में">About</a></li>
254
+ <li><a href="contact.html" class="hover:text-white" data-lang-en="Contact" data-lang-hi="संपर्क">Contact</a></li>
255
+ <li><a href="feedback.html" class="hover:text-white" data-lang-en="Feedback" data-lang-hi="प्रतिक्रिया">Feedback</a></li>
256
+ </ul>
257
+ </div>
258
+ <div>
259
+ <h3 class="text-lg font-medium text-white mb-4" data-lang-en="Resources" data-lang-hi="संसाधन">Resources</h3>
260
+ <ul class="space-y-2 text-sm">
261
+ <li><a href="#" class="hover:text-white" data-lang-en="API Docs (TBD)" data-lang-hi="एपीआई डॉक्स (TBD)">API Docs (TBD)</a></li>
262
+ <li><a href="#" class="hover:text-white" data-lang-en="GitHub Repo" data-lang-hi="गिटहब रेपो">GitHub Repo</a></li>
263
+ </ul>
264
+ </div>
265
+ <div>
266
+ <h3 class="text-lg font-medium text-white mb-4" data-lang-en="Contact" data-lang-hi="संपर्क">Contact</h3>
267
+ <ul class="space-y-2 text-sm">
268
+ <li class="flex items-start"><i class="ri-mail-line mt-1 mr-2"></i><span>your-email@example.com</span></li>
269
+ </ul>
270
+ </div>
271
+ </div>
272
+ <div class="border-t border-gray-700 mt-8 pt-8 text-center">
273
+ <p class="text-sm">© 2024 Your Name/Org | AI Text Tools Project</p>
274
+ </div>
275
+ </div>
276
+ </footer>
277
+
278
+ <!-- Base Theme/Language Script -->
279
+ <script>
280
+ const themeToggle = document.getElementById('themeToggle');
281
+ const htmlElement = document.documentElement;
282
+ function applyTheme(isDark) { if (isDark) { htmlElement.classList.add('dark'); if(themeToggle) themeToggle.checked = true; } else { htmlElement.classList.remove('dark'); if(themeToggle) themeToggle.checked = false; } }
283
+ const languageToggle = document.getElementById('languageToggle');
284
+ const langElements = document.querySelectorAll('[data-lang-en]');
285
+ const placeholderElements = document.querySelectorAll('[data-lang-en-placeholder]');
286
+
287
+ function applyLanguage(lang) {
288
+ htmlElement.setAttribute('lang', lang);
289
+ langElements.forEach(el => {
290
+ const text = el.getAttribute(`data-lang-${lang}`);
291
+ if (text !== null) { // Check if attribute exists
292
+ const icon = el.querySelector('i');
293
+ if (icon && el.childNodes.length > 1) {
294
+ let updated = false;
295
+ el.childNodes.forEach(node => {
296
+ if (node.nodeType === Node.TEXT_NODE && node.textContent.trim() !== '') {
297
+ node.textContent = ` ${text} `;
298
+ updated = true;
299
+ }
300
+ });
301
+ if (!updated) {
302
+ const currentText = el.getAttribute(`data-lang-${lang === 'en' ? 'hi' : 'en'}`);
303
+ if (currentText) el.innerHTML = el.innerHTML.replace(currentText.trim(), text);
304
+ }
305
+ } else {
306
+ el.textContent = text;
307
+ }
308
+ }
309
+ });
310
+ placeholderElements.forEach(el => {
311
+ const placeholderText = el.getAttribute(`data-lang-${lang}-placeholder`);
312
+ if (placeholderText !== null) {
313
+ el.placeholder = placeholderText;
314
+ }
315
+ });
316
+ if (languageToggle) languageToggle.checked = (lang === 'hi');
317
+ localStorage.setItem('language', lang);
318
+ }
319
+
320
+ function initializeSettings() {
321
+ const savedLang = localStorage.getItem('language') || 'en';
322
+ const prefersDark = localStorage.getItem('theme') === 'dark' || (localStorage.getItem('theme') === null && window.matchMedia('(prefers-color-scheme: dark)').matches);
323
+ applyTheme(prefersDark);
324
+ applyLanguage(savedLang);
325
+
326
+ if (languageToggle) {
327
+ languageToggle.addEventListener('change', (event) => {
328
+ const newLang = event.target.checked ? 'hi' : 'en';
329
+ applyLanguage(newLang);
330
+ });
331
+ } else { console.warn("Language toggle button not found."); }
332
+
333
+ if (themeToggle) {
334
+ themeToggle.addEventListener('change', (event) => {
335
+ const isDark = event.target.checked;
336
+ applyTheme(isDark);
337
+ localStorage.setItem('theme', isDark ? 'dark' : 'light');
338
+ });
339
+ } else { console.warn("Theme toggle button not found."); }
340
+ }
341
+
342
+ // Initialize theme and language settings when the DOM is fully loaded
343
+ document.addEventListener('DOMContentLoaded', () => {
344
+ initializeSettings();
345
+ console.log("Home page DOM Loaded and Initialized.");
346
+ });
347
+ </script>
348
+
349
+ </body>
350
+ </html>