abdulwaheed1 commited on
Commit
d317d06
1 Parent(s): 8e68eeb

Delete index.html

Browse files
Files changed (1) hide show
  1. index.html +0 -163
index.html DELETED
@@ -1,163 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Translation App</title>
8
- <!-- Bootstrap v5.3 CSS -->
9
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/css/bootstrap.min.css">
10
- <!-- Font Awesome for icons -->
11
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
12
- <!-- Google Font -->
13
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap">
14
- <style>
15
- body {
16
- background: linear-gradient(45deg, #4b6cb7, #182848);
17
- color: #fff;
18
- font-family: 'Roboto', sans-serif;
19
- margin: 0;
20
- padding: 0;
21
- }
22
-
23
- nav {
24
- /* background-color: #343a40; */
25
- }
26
-
27
- nav a.navbar-brand,
28
- nav a.nav-link {
29
- text-decoration: none !important;
30
- }
31
-
32
- .container {
33
- max-width: 800px;
34
- margin: 50px auto;
35
- background-color: rgba(255, 255, 255, 0.95);
36
- padding: 30px;
37
- border-radius: 15px;
38
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
39
- }
40
-
41
- h1 {
42
- color: #007bff;
43
- text-align: center;
44
- }
45
-
46
- .form-group {
47
- margin-bottom: 20px;
48
- }
49
-
50
- label {
51
- font-weight: bold;
52
- color: #333;
53
- }
54
-
55
- textarea {
56
- width: 100%;
57
- resize: none;
58
- }
59
-
60
- button {
61
- width: 100%;
62
- cursor: pointer;
63
- transition: background-color 0.3s ease, box-shadow 0.3s ease;
64
- padding: 12px;
65
- font-size: 18px;
66
- border-radius: 8px;
67
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
68
- }
69
-
70
- #text,
71
- #translation-result {
72
- margin-top: 10px;
73
- border: 1px solid #ced4da;
74
- padding: 10px;
75
- width: 100%;
76
- color: #333;
77
- }
78
-
79
- #translate-button {
80
- background: linear-gradient(to right, #007bff, #00bcd4);
81
- border: none;
82
- color: #fff;
83
- }
84
-
85
- .icon {
86
- font-size: 24px;
87
- margin-right: 10px;
88
- }
89
-
90
- #translate-button:hover {
91
- background: linear-gradient(to right, #0056b3, #0074cc);
92
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
93
- }
94
-
95
- footer {
96
- text-align: center;
97
- margin-top: 30px;
98
- color: #fff;
99
- }
100
- </style>
101
- </head>
102
-
103
- <body>
104
- <div class="container">
105
- <nav class="navbar navbar-expand-lg bg-body-tertiary">
106
- <div class="container-fluid">
107
- <a class="navbar-brand" href="#">Translator App</a>
108
- </div>
109
-
110
- </nav>
111
- </div>
112
- <div class="container">
113
- <h1 class="mb-4"><i class="icon fas fa-language"></i> English to Urdu Translation</h1>
114
-
115
- <div class="form-group">
116
- <label for="text" class="text-white">Enter English Text:</label>
117
- <textarea class="form-control" id="text" rows="4"></textarea>
118
- </div>
119
-
120
- <button type="button" id="translate-button" class="btn btn-primary">Translate <i
121
- class="icon fas fa-chevron-right"></i></button>
122
-
123
- <div class="form-group mt-3">
124
- <label for="translation-result" class="text-white">Translation:</label>
125
- <textarea class="form-control" id="translation-result" rows="4" readonly></textarea>
126
- </div>
127
- </div>
128
-
129
- <footer>
130
- <p>© 2023 Translation App. All rights reserved.</p>
131
- </footer>
132
-
133
- <!-- Bootstrap and Popper.js scripts -->
134
- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
135
- <script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
136
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/js/bootstrap.min.js"></script>
137
-
138
- <script>
139
- document.addEventListener('DOMContentLoaded', function () {
140
- function translate() {
141
- var text = document.getElementById('text').value;
142
- fetch('/translate', {
143
- method: 'POST',
144
- headers: {
145
- 'Content-Type': 'application/json',
146
- },
147
- body: JSON.stringify({ 'text': text }),
148
- })
149
- .then(response => response.json())
150
- .then(data => {
151
- document.getElementById('translation-result').value = data.translation;
152
- })
153
- .catch(error => {
154
- console.error('Error:', error);
155
- });
156
- }
157
-
158
- document.getElementById('translate-button').addEventListener('click', translate);
159
- });
160
- </script>
161
- </body>
162
-
163
- </html>