-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndex.html
More file actions
1305 lines (1115 loc) · 55.3 KB
/
Index.html
File metadata and controls
1305 lines (1115 loc) · 55.3 KB
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jash Tool - All-in-One Web Tools</title>
<style>
:root {
--primary-color: #4a6bff;
--secondary-color: #6c757d;
--dark-color: #343a40;
--light-color: #f8f9fa;
--success-color: #28a745;
--danger-color: #dc3545;
--warning-color: #fd7e14;
--info-color: #17a2b8;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f7fa;
color: #333;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 30px;
padding: 20px 0;
background: linear-gradient(135deg, var(--primary-color), #6a11cb);
color: white;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
header p {
font-size: 1.1rem;
opacity: 0.9;
}
.tools-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
margin-bottom: 40px;
}
.tool-card {
background: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;
cursor: pointer;
}
.tool-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.tool-icon {
height: 120px;
background: linear-gradient(135deg, #f5f7fa, #e4e8eb);
display: flex;
align-items: center;
justify-content: center;
font-size: 2.5rem;
color: var(--primary-color);
}
.tool-info {
padding: 20px;
}
.tool-info h3 {
margin-bottom: 10px;
color: var(--dark-color);
}
.tool-info p {
color: var(--secondary-color);
font-size: 0.9rem;
margin-bottom: 15px;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 5px;
text-decoration: none;
font-weight: 500;
transition: all 0.3s ease;
}
.btn:hover {
background-color: #3a56d4;
color: white;
transform: translateY(-2px);
}
.btn-block {
display: block;
width: 100%;
text-align: center;
}
.tool-container {
display: none;
background: white;
border-radius: 10px;
padding: 30px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
margin-bottom: 30px;
}
.back-btn {
display: inline-block;
margin-bottom: 20px;
padding: 8px 16px;
background-color: var(--secondary-color);
color: white;
border-radius: 5px;
text-decoration: none;
transition: all 0.3s ease;
}
.back-btn:hover {
background-color: #5a6268;
color: white;
}
.tool-header {
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid #eee;
}
.tool-header h2 {
color: var(--dark-color);
margin-bottom: 10px;
}
.tool-header p {
color: var(--secondary-color);
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: var(--dark-color);
}
.form-control {
width: 100%;
padding: 12px 15px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
transition: border 0.3s ease;
}
.form-control:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}
.result-container {
margin-top: 30px;
padding: 20px;
background-color: #f8f9fa;
border-radius: 5px;
border-left: 4px solid var(--primary-color);
display: none;
}
.result-title {
margin-bottom: 10px;
color: var(--dark-color);
}
footer {
text-align: center;
padding: 30px 0;
margin-top: 50px;
color: var(--secondary-color);
font-size: 0.9rem;
border-top: 1px solid #eee;
}
@media (max-width: 768px) {
.tools-grid {
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Jash Tool</h1>
<p>Your all-in-one web tools collection for developers and marketers</p>
</header>
<div class="tools-grid" id="mainMenu">
<!-- Image Resizer -->
<div class="tool-card" onclick="showTool('image-resizer')">
<div class="tool-icon">
<i>🖼️</i>
</div>
<div class="tool-info">
<h3>Image Resizer</h3>
<p>Resize your JPG, PNG images with high quality options. Adjust height and width as needed.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Website Speed Checker -->
<div class="tool-card" onclick="showTool('speed-checker')">
<div class="tool-icon">
<i>⚡</i>
</div>
<div class="tool-info">
<h3>Website Speed Checker</h3>
<p>Check your website or page loading speed and get recommendations for improvement.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Hashtag Generator -->
<div class="tool-card" onclick="showTool('hashtag-generator')">
<div class="tool-icon">
<i>#️⃣</i>
</div>
<div class="tool-info">
<h3>Hashtag Generator</h3>
<p>Generate trending hashtags for all social media platforms to boost your engagement.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Text to PDF -->
<div class="tool-card" onclick="showTool('text-to-pdf')">
<div class="tool-icon">
<i>📄</i>
</div>
<div class="tool-info">
<h3>Text to PDF Compressor</h3>
<p>Convert your text documents to PDF format with compression options to reduce file size.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Age Calculator -->
<div class="tool-card" onclick="showTool('age-calculator')">
<div class="tool-icon">
<i>🎂</i>
</div>
<div class="tool-info">
<h3>Age Calculator</h3>
<p>Calculate exact age in years, months, and days from birth date to current date.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Text Case Converter -->
<div class="tool-card" onclick="showTool('case-converter')">
<div class="tool-icon">
<i>🔠</i>
</div>
<div class="tool-info">
<h3>Text Case Converter</h3>
<p>Convert text between different cases like uppercase, lowercase, sentence case, etc.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Meta Tag Generator -->
<div class="tool-card" onclick="showTool('meta-tag-generator')">
<div class="tool-icon">
<i>🏷️</i>
</div>
<div class="tool-info">
<h3>Meta Tag Generator</h3>
<p>Generate SEO-friendly meta tags for your website to improve search engine visibility.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Robots.txt Generator -->
<div class="tool-card" onclick="showTool('robots-generator')">
<div class="tool-icon">
<i>🤖</i>
</div>
<div class="tool-info">
<h3>Robots.txt Generator</h3>
<p>Create a custom robots.txt file to control search engine crawlers on your website.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- XML Sitemap Generator -->
<div class="tool-card" onclick="showTool('sitemap-generator')">
<div class="tool-icon">
<i>🗺️</i>
</div>
<div class="tool-info">
<h3>XML Sitemap Generator</h3>
<p>Generate XML sitemaps for your website to help search engines index your pages.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
<!-- Google Index Checker -->
<div class="tool-card" onclick="showTool('index-checker')">
<div class="tool-icon">
<i>🔍</i>
</div>
<div class="tool-info">
<h3>Google Index Checker</h3>
<p>Check if your website or specific pages are indexed by Google search engine.</p>
<a class="btn btn-block">Open Tool</a>
</div>
</div>
</div>
<!-- Image Resizer Tool -->
<div class="tool-container" id="image-resizer">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Image Resizer</h2>
<p>Resize your JPG, PNG, or other image files while maintaining high quality. Adjust the dimensions to fit your needs.</p>
</div>
<div class="form-group">
<label for="image-upload">Upload Image</label>
<input type="file" id="image-upload" class="form-control" accept="image/*">
</div>
<div class="form-group">
<label for="image-width">Width (pixels)</label>
<input type="number" id="image-width" class="form-control" placeholder="Enter width in pixels">
</div>
<div class="form-group">
<label for="image-height">Height (pixels)</label>
<input type="number" id="image-height" class="form-control" placeholder="Enter height in pixels">
</div>
<div class="form-group">
<label for="image-quality">Quality (1-100)</label>
<input type="range" id="image-quality" class="form-control" min="1" max="100" value="90">
<span id="quality-value">90%</span>
</div>
<div class="form-group">
<label for="image-format">Output Format</label>
<select id="image-format" class="form-control">
<option value="jpg">JPG</option>
<option value="png">PNG</option>
<option value="webp">WebP</option>
</select>
</div>
<button class="btn" onclick="resizeImage()">Resize Image</button>
<div class="result-container" id="image-resizer-result">
<h4 class="result-title">Resized Image</h4>
<div id="resized-image-container"></div>
<a id="download-link" class="btn" style="margin-top: 15px;">Download Image</a>
</div>
</div>
<!-- Website Speed Checker Tool -->
<div class="tool-container" id="speed-checker">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Website Speed Checker</h2>
<p>Check the loading speed of any website and get detailed analysis with improvement suggestions.</p>
</div>
<div class="form-group">
<label for="website-url">Website URL</label>
<input type="url" id="website-url" class="form-control" placeholder="https://example.com">
</div>
<button class="btn" onclick="checkWebsiteSpeed()">Check Speed</button>
<div class="result-container" id="speed-checker-result">
<h4 class="result-title">Speed Test Results</h4>
<div id="speed-test-results"></div>
</div>
</div>
<!-- Hashtag Generator Tool -->
<div class="tool-container" id="hashtag-generator">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Social Media Hashtag Generator</h2>
<p>Generate trending and relevant hashtags for Instagram, Twitter, Facebook, and other platforms.</p>
</div>
<div class="form-group">
<label for="hashtag-keyword">Keyword/Topic</label>
<input type="text" id="hashtag-keyword" class="form-control" placeholder="Enter your keyword or topic">
</div>
<div class="form-group">
<label for="hashtag-platform">Social Platform</label>
<select id="hashtag-platform" class="form-control">
<option value="instagram">Instagram</option>
<option value="twitter">Twitter</option>
<option value="facebook">Facebook</option>
<option value="tiktok">TikTok</option>
<option value="linkedin">LinkedIn</option>
<option value="all">All Platforms</option>
</select>
</div>
<div class="form-group">
<label for="hashtag-count">Number of Hashtags (5-30)</label>
<input type="number" id="hashtag-count" class="form-control" min="5" max="30" value="15">
</div>
<button class="btn" onclick="generateHashtags()">Generate Hashtags</button>
<div class="result-container" id="hashtag-generator-result">
<h4 class="result-title">Generated Hashtags</h4>
<div id="generated-hashtags"></div>
<button class="btn" onclick="copyHashtags()" style="margin-top: 15px;">Copy Hashtags</button>
</div>
</div>
<!-- Text to PDF Tool -->
<div class="tool-container" id="text-to-pdf">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Text to PDF Compressor</h2>
<p>Convert your text content to PDF format with options to compress the file size.</p>
</div>
<div class="form-group">
<label for="pdf-text">Enter Your Text</label>
<textarea id="pdf-text" class="form-control" rows="10" placeholder="Paste your text here..."></textarea>
</div>
<div class="form-group">
<label for="pdf-title">Document Title (optional)</label>
<input type="text" id="pdf-title" class="form-control" placeholder="My Document">
</div>
<div class="form-group">
<label for="pdf-compression">Compression Level</label>
<select id="pdf-compression" class="form-control">
<option value="low">Low (Best Quality)</option>
<option value="medium" selected>Medium (Balanced)</option>
<option value="high">High (Smallest Size)</option>
</select>
</div>
<button class="btn" onclick="generatePDF()">Generate PDF</button>
<div class="result-container" id="pdf-generator-result">
<h4 class="result-title">PDF Generated</h4>
<div id="pdf-download-info"></div>
<a id="pdf-download-link" class="btn" style="margin-top: 15px;">Download PDF</a>
</div>
</div>
<!-- Age Calculator Tool -->
<div class="tool-container" id="age-calculator">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Age Calculator</h2>
<p>Calculate your exact age in years, months, and days from your birth date to the current date.</p>
</div>
<div class="form-group">
<label for="birth-date">Birth Date</label>
<input type="date" id="birth-date" class="form-control">
</div>
<div class="form-group">
<label for="current-date">Current Date (or select another date)</label>
<input type="date" id="current-date" class="form-control">
</div>
<button class="btn" onclick="calculateAge()">Calculate Age</button>
<div class="result-container" id="age-calculator-result">
<h4 class="result-title">Age Calculation Results</h4>
<div id="age-result"></div>
</div>
</div>
<!-- Text Case Converter Tool -->
<div class="tool-container" id="case-converter">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Text Case Converter</h2>
<p>Convert your text between different cases like uppercase, lowercase, sentence case, and more.</p>
</div>
<div class="form-group">
<label for="case-text">Enter Your Text</label>
<textarea id="case-text" class="form-control" rows="6" placeholder="Enter text to convert..."></textarea>
</div>
<div class="form-group">
<label for="case-type">Conversion Type</label>
<select id="case-type" class="form-control">
<option value="upper">UPPERCASE</option>
<option value="lower">lowercase</option>
<option value="sentence">Sentence case</option>
<option value="title">Title Case</option>
<option value="camel">camelCase</option>
<option value="pascal">PascalCase</option>
<option value="snake">snake_case</option>
<option value="kebab">kebab-case</option>
<option value="alternating">aLtErNaTiNg cAsE</option>
<option value="inverse">iNVERSE cASE</option>
</select>
</div>
<button class="btn" onclick="convertTextCase()">Convert Text</button>
<div class="result-container" id="case-converter-result">
<h4 class="result-title">Converted Text</h4>
<div id="converted-text" style="padding: 15px; background: white; border-radius: 5px; border: 1px solid #eee;"></div>
<button class="btn" onclick="copyConvertedText()" style="margin-top: 15px;">Copy Text</button>
</div>
</div>
<!-- Meta Tag Generator Tool -->
<div class="tool-container" id="meta-tag-generator">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Meta Tag Generator</h2>
<p>Generate SEO-friendly meta tags for your website to improve search engine visibility.</p>
</div>
<div class="form-group">
<label for="meta-title">Page Title</label>
<input type="text" id="meta-title" class="form-control" placeholder="My Awesome Web Page">
</div>
<div class="form-group">
<label for="meta-description">Meta Description</label>
<textarea id="meta-description" class="form-control" rows="3" placeholder="Brief description of your page content (150-160 characters)"></textarea>
</div>
<div class="form-group">
<label for="meta-keywords">Keywords (comma separated)</label>
<input type="text" id="meta-keywords" class="form-control" placeholder="web, tools, seo, generator">
</div>
<div class="form-group">
<label for="meta-author">Author (optional)</label>
<input type="text" id="meta-author" class="form-control" placeholder="Your Name">
</div>
<div class="form-group">
<label for="meta-viewport">Viewport Settings</label>
<select id="meta-viewport" class="form-control">
<option value="responsive">Responsive (Recommended)</option>
<option value="desktop">Desktop Fixed Width</option>
<option value="mobile">Mobile Optimized</option>
<option value="custom">Custom</option>
</select>
</div>
<div class="form-group" id="custom-viewport-group" style="display: none;">
<label for="custom-viewport">Custom Viewport</label>
<input type="text" id="custom-viewport" class="form-control" placeholder="width=device-width, initial-scale=1.0">
</div>
<button class="btn" onclick="generateMetaTags()">Generate Meta Tags</button>
<div class="result-container" id="meta-tag-generator-result">
<h4 class="result-title">Generated Meta Tags</h4>
<pre id="generated-meta-tags" style="background: #2d2d2d; color: #f8f8f2; padding: 15px; border-radius: 5px; overflow-x: auto;"></pre>
<button class="btn" onclick="copyMetaTags()" style="margin-top: 15px;">Copy Meta Tags</button>
</div>
</div>
<!-- Robots.txt Generator Tool -->
<div class="tool-container" id="robots-generator">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Robots.txt Generator</h2>
<p>Create a custom robots.txt file to control search engine crawlers on your website.</p>
</div>
<div class="form-group">
<label for="robots-sitemap">Sitemap URL (optional)</label>
<input type="url" id="robots-sitemap" class="form-control" placeholder="https://example.com/sitemap.xml">
</div>
<div class="form-group">
<label>User-agent Rules</label>
<div id="robots-rules-container">
<div class="robots-rule">
<select class="form-control robots-user-agent" style="margin-bottom: 10px;">
<option value="*">All User-agents (*)</option>
<option value="Googlebot">Googlebot</option>
<option value="Bingbot">Bingbot</option>
<option value="Slurp">Yahoo Slurp</option>
<option value="DuckDuckBot">DuckDuckBot</option>
<option value="Baiduspider">Baiduspider</option>
<option value="YandexBot">YandexBot</option>
</select>
<div class="form-check" style="margin-bottom: 10px;">
<input class="form-check-input" type="radio" name="rule-type-0" value="allow" checked>
<label class="form-check-label">Allow</label>
</div>
<div class="form-check" style="margin-bottom: 10px;">
<input class="form-check-input" type="radio" name="rule-type-0" value="disallow">
<label class="form-check-label">Disallow</label>
</div>
<input type="text" class="form-control robots-path" placeholder="/path/">
<button class="btn btn-sm" onclick="removeRobotsRule(this)" style="margin-top: 5px; background-color: var(--danger-color);">Remove Rule</button>
</div>
</div>
<button class="btn" onclick="addRobotsRule()" style="margin-top: 10px; background-color: var(--success-color);">Add Another Rule</button>
</div>
<div class="form-group">
<label for="robots-crawl-delay">Crawl-delay (seconds, optional)</label>
<input type="number" id="robots-crawl-delay" class="form-control" placeholder="10">
</div>
<button class="btn" onclick="generateRobotsTxt()">Generate robots.txt</button>
<div class="result-container" id="robots-generator-result">
<h4 class="result-title">Generated robots.txt</h4>
<pre id="generated-robots-txt" style="background: #2d2d2d; color: #f8f8f2; padding: 15px; border-radius: 5px; overflow-x: auto;"></pre>
<button class="btn" onclick="copyRobotsTxt()" style="margin-top: 15px;">Copy robots.txt</button>
<a id="robots-download-link" class="btn" style="margin-top: 15px; background-color: var(--info-color);">Download robots.txt</a>
</div>
</div>
<!-- XML Sitemap Generator Tool -->
<div class="tool-container" id="sitemap-generator">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>XML Sitemap Generator</h2>
<p>Generate XML sitemaps for your website to help search engines index your pages.</p>
</div>
<div class="form-group">
<label for="sitemap-urls">Enter URLs (one per line)</label>
<textarea id="sitemap-urls" class="form-control" rows="10" placeholder="https://example.com/page1
https://example.com/page2
https://example.com/page3"></textarea>
</div>
<div class="form-group">
<label for="sitemap-priority">Default Priority (0.1-1.0)</label>
<input type="number" id="sitemap-priority" class="form-control" min="0.1" max="1.0" step="0.1" value="0.5">
</div>
<div class="form-group">
<label for="sitemap-change-freq">Default Change Frequency</label>
<select id="sitemap-change-freq" class="form-control">
<option value="always">always</option>
<option value="hourly">hourly</option>
<option value="daily">daily</option>
<option value="weekly" selected>weekly</option>
<option value="monthly">monthly</option>
<option value="yearly">yearly</option>
<option value="never">never</option>
</select>
</div>
<button class="btn" onclick="generateSitemap()">Generate Sitemap</button>
<div class="result-container" id="sitemap-generator-result">
<h4 class="result-title">Generated XML Sitemap</h4>
<pre id="generated-sitemap" style="background: #2d2d2d; color: #f8f8f2; padding: 15px; border-radius: 5px; overflow-x: auto;"></pre>
<button class="btn" onclick="copySitemap()" style="margin-top: 15px;">Copy Sitemap</button>
<a id="sitemap-download-link" class="btn" style="margin-top: 15px; background-color: var(--info-color);">Download Sitemap</a>
</div>
</div>
<!-- Google Index Checker Tool -->
<div class="tool-container" id="index-checker">
<a class="back-btn" onclick="showMainMenu()">← Back to All Tools</a>
<div class="tool-header">
<h2>Google Index Checker</h2>
<p>Check if your website or specific pages are indexed by Google search engine.</p>
</div>
<div class="form-group">
<label for="index-url">URL to Check</label>
<input type="url" id="index-url" class="form-control" placeholder="https://example.com/page">
</div>
<button class="btn" onclick="checkGoogleIndex()">Check Index Status</button>
<div class="result-container" id="index-checker-result">
<h4 class="result-title">Index Check Results</h4>
<div id="index-check-results"></div>
</div>
</div>
<footer>
<p>© 2023 Jash Tool - All-in-One Web Tools Collection. All rights reserved.</p>
</footer>
</div>
<script>
// Show main menu and hide all tools
function showMainMenu() {
document.getElementById('mainMenu').style.display = 'grid';
const tools = document.querySelectorAll('.tool-container');
tools.forEach(tool => {
tool.style.display = 'none';
});
}
// Show specific tool and hide main menu
function showTool(toolId) {
document.getElementById('mainMenu').style.display = 'none';
const tools = document.querySelectorAll('.tool-container');
tools.forEach(tool => {
tool.style.display = 'none';
});
document.getElementById(toolId).style.display = 'block';
// Scroll to top of the tool
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}
// Image Resizer functionality
function resizeImage() {
const fileInput = document.getElementById('image-upload');
const width = document.getElementById('image-width').value;
const height = document.getElementById('image-height').value;
const quality = document.getElementById('image-quality').value;
const format = document.getElementById('image-format').value;
if (!fileInput.files[0]) {
alert('Please upload an image first');
return;
}
if (!width && !height) {
alert('Please enter either width or height');
return;
}
// In a real implementation, you would use a library like canvas to resize the image
// This is just a placeholder for the demo
const file = fileInput.files[0];
const reader = new FileReader();
reader.onload = function(e) {
const img = document.createElement('img');
img.src = e.target.result;
img.onload = function() {
const resizedImageContainer = document.getElementById('resized-image-container');
resizedImageContainer.innerHTML = '';
resizedImageContainer.appendChild(img);
// Show download button (in real implementation, this would be the actual resized image)
const downloadLink = document.getElementById('download-link');
downloadLink.href = e.target.result;
downloadLink.download = `resized-image.${format}`;
// Show result container
document.getElementById('image-resizer-result').style.display = 'block';
};
};
reader.readAsDataURL(file);
}
// Update quality value display
document.getElementById('image-quality').addEventListener('input', function() {
document.getElementById('quality-value').textContent = this.value + '%';
});
// Website Speed Checker functionality
function checkWebsiteSpeed() {
const url = document.getElementById('website-url').value;
if (!url) {
alert('Please enter a website URL');
return;
}
// In a real implementation, you would call an API to check website speed
// This is just a placeholder for the demo
document.getElementById('speed-test-results').innerHTML = `
<p>Testing speed for: ${url}</p>
<div style="margin-top: 15px;">
<p><strong>Load Time:</strong> 1.8 seconds</p>
<p><strong>Page Size:</strong> 1.2 MB</p>
<p><strong>Requests:</strong> 42</p>
<p><strong>Performance Grade:</strong> B (85/100)</p>
</div>
<div style="margin-top: 20px; background: #f0f0f0; padding: 15px; border-radius: 5px;">
<h5 style="margin-bottom: 10px;">Recommendations:</h5>
<ul>
<li>Compress images to reduce size by ~400KB</li>
<li>Enable browser caching</li>
<li>Minify CSS and JavaScript files</li>
<li>Use a CDN for static assets</li>
</ul>
</div>
`;
document.getElementById('speed-checker-result').style.display = 'block';
}
// Hashtag Generator functionality
function generateHashtags() {
const keyword = document.getElementById('hashtag-keyword').value;
const platform = document.getElementById('hashtag-platform').value;
const count = document.getElementById('hashtag-count').value;
if (!keyword) {
alert('Please enter a keyword or topic');
return;
}
// In a real implementation, you would have a database of hashtags
// This is just a placeholder for the demo
const hashtags = [];
const cleanedKeyword = keyword.trim().toLowerCase().replace(/\s+/g, '');
// Generate some sample hashtags based on the keyword
for (let i = 0; i < count; i++) {
if (i < 5) {
hashtags.push(`#${cleanedKeyword}`);
} else if (i < 10) {
hashtags.push(`#${cleanedKeyword}${Math.floor(Math.random() * 100)}`);
} else {
const suffixes = ['love', 'life', 'art', 'photo', 'insta', 'pic', 'time', 'day', 'world', 'style'];
hashtags.push(`#${cleanedKeyword}${suffixes[Math.floor(Math.random() * suffixes.length)]}`);
}
}
// Shuffle and limit to requested count
const shuffledHashtags = hashtags.sort(() => 0.5 - Math.random()).slice(0, count);
document.getElementById('generated-hashtags').innerHTML = `
<p style="margin-bottom: 10px;">Copy these hashtags for your ${platform} post:</p>
<div style="background: white; padding: 15px; border-radius: 5px; border: 1px solid #eee; word-wrap: break-word;">
${shuffledHashtags.join(' ')}
</div>
`;
document.getElementById('hashtag-generator-result').style.display = 'block';
}
function copyHashtags() {
const hashtagsText = document.getElementById('generated-hashtags').textContent;
navigator.clipboard.writeText(hashtagsText.trim()).then(() => {
alert('Hashtags copied to clipboard!');
});
}
// Text to PDF functionality
function generatePDF() {
const text = document.getElementById('pdf-text').value;
const title = document.getElementById('pdf-title').value || 'Document';
const compression = document.getElementById('pdf-compression').value;
if (!text) {
alert('Please enter some text to convert');
return;
}
// In a real implementation, you would use a PDF generation library
// This is just a placeholder for the demo
const sizeEstimates = {
low: Math.round(text.length * 0.002) + ' KB',
medium: Math.round(text.length * 0.0015) + ' KB',
high: Math.round(text.length * 0.001) + ' KB'
};
document.getElementById('pdf-download-info').innerHTML = `
<p><strong>Title:</strong> ${title}</p>
<p><strong>Compression:</strong> ${compression} (Estimated size: ${sizeEstimates[compression]})</p>
<p><strong>Pages:</strong> ${Math.ceil(text.length / 2000)}</p>
`;
// Create a dummy download link
const blob = new Blob([text], { type: 'application/pdf' });
const url = URL.createObjectURL(blob);
const downloadLink = document.getElementById('pdf-download-link');
downloadLink.href = url;
downloadLink.download = `${title.replace(/\s+/g, '-')}.pdf`;
document.getElementById('pdf-generator-result').style.display = 'block';
}
// Age Calculator functionality
function calculateAge() {
const birthDate = new Date(document.getElementById('birth-date').value);
const currentDate = new Date(document.getElementById('current-date').value || new Date());
if (!birthDate.getTime()) {
alert('Please enter your birth date');
return;
}
if (birthDate > currentDate) {
alert('Birth date cannot be in the future');
return;
}
let years = currentDate.getFullYear() - birthDate.getFullYear();
let months = currentDate.getMonth() - birthDate.getMonth();
let days = currentDate.getDate() - birthDate.getDate();
if (days < 0) {
months--;
// Get the last day of the previous month
const prevMonthLastDay = new Date(
currentDate.getFullYear(),
currentDate.getMonth(),
0
).getDate();
days += prevMonthLastDay;
}
if (months < 0) {
years--;
months += 12;
}
// Calculate total days
const diffTime = Math.abs(currentDate - birthDate);
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
document.getElementById('age-result').innerHTML = `
<p><strong>Age:</strong> ${years} years, ${months} months, ${days} days</p>
<p><strong>Total Days:</strong> ${diffDays} days</p>
<p><strong>Birth Date:</strong> ${birthDate.toDateString()}</p>
<p><strong>Current Date:</strong> ${currentDate.toDateString()}</p>
`;
document.getElementById('age-calculator-result').style.display = 'block';
}
// Text Case Converter functionality
function convertTextCase() {
const text = document.getElementById('case-text').value;
const caseType = document.getElementById('case-type').value;
if (!text) {
alert('Please enter some text to convert');
return;
}
let convertedText = '';
switch (caseType) {
case 'upper':
convertedText = text.toUpperCase();
break;
case 'lower':
convertedText = text.toLowerCase();
break;