WebashalarForML commited on
Commit
a96861e
1 Parent(s): 3f165b2

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +57 -26
templates/index.html CHANGED
@@ -11,6 +11,7 @@
11
  background-color: #1c1c1e;
12
  font-family: "Poppins", sans-serif;
13
  color: #f5f5f7;
 
14
  }
15
 
16
  h1 {
@@ -20,7 +21,7 @@
20
  }
21
 
22
  .container {
23
- margin-top: 50px;
24
  }
25
 
26
  .file-upload-section {
@@ -67,7 +68,7 @@
67
 
68
  .alert {
69
  text-align: center;
70
- position: absolute;
71
  top: 0;
72
  right: 15%;
73
  }
@@ -94,44 +95,76 @@
94
  }
95
  }
96
 
97
- /* Tabs styles */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  .tab {
99
- position: absolute;
100
- top: 10px;
101
- left: 10px;
102
  }
103
 
104
  .tab button {
105
- background-color: #ee4410;
106
  border: none;
107
- padding: 10px;
108
- margin: 0 5px;
109
- color: #f5f5f7;
110
  cursor: pointer;
111
- border-radius: 5px;
112
- transition: background-color 0.3s ease;
 
 
113
  }
114
 
115
  .tab button:hover {
116
- background-color: #444;
117
  }
118
 
119
- .tab button:active,
120
  .tab button.active {
121
  background-color: #444;
122
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  </style>
124
  </head>
125
 
126
  <body>
127
- <div class="container">
128
- <h1>Visiting Card Data Extractor</h1>
129
-
 
130
  <div class="tab">
131
- <button class="tablinks active" onclick="openLink('https://webashalarforml-imagedataextractor2.hf.space/')">Visiting Card Data Extractor</button>
132
- <button class="tablinks" onclick="openLink('https://webashalarforml-resumeextractor2.hf.space/')">Resume Data Extractor</button>
133
- </div>
134
-
 
 
135
  <div class="file-upload-section">
136
  <form id="fileUploadForm" action="{{ url_for('upload_file') }}" method="POST" enctype="multipart/form-data">
137
  <input type="file" name="files" multiple class="form-control" required />
@@ -182,14 +215,12 @@
182
  }
183
  }, 3000);
184
 
185
- // Function to open links
186
- function openLink(url, element) {
187
- window.open(url); // Opens the link in a new tab
188
-
189
  // Remove "active" class from all buttons
190
  const buttons = document.querySelectorAll('.tab button');
191
  buttons.forEach(button => button.classList.remove('active'));
192
-
193
  // Add "active" class to the clicked button
194
  element.classList.add('active');
195
  }
 
11
  background-color: #1c1c1e;
12
  font-family: "Poppins", sans-serif;
13
  color: #f5f5f7;
14
+ margin: 0;
15
  }
16
 
17
  h1 {
 
21
  }
22
 
23
  .container {
24
+ margin-top: 70px;
25
  }
26
 
27
  .file-upload-section {
 
68
 
69
  .alert {
70
  text-align: center;
71
+ position: sticky;
72
  top: 0;
73
  right: 15%;
74
  }
 
95
  }
96
  }
97
 
98
+ /* Top bar styles */
99
+ .top-bar {
100
+ background-color: #333;
101
+ position: fixed;
102
+ top: 0;
103
+ width: 100%;
104
+ z-index: 1000;
105
+ padding: 10px 20px;
106
+ display: flex;
107
+ justify-content: space-between;
108
+ align-items: center;
109
+ }
110
+
111
+ .top-bar h2 {
112
+ color: white;
113
+ }
114
+
115
+ /* Navigation tab styles */
116
  .tab {
117
+ display: flex;
118
+ gap: 10px;
 
119
  }
120
 
121
  .tab button {
122
+ background-color: inherit;
123
  border: none;
124
+ outline: none;
 
 
125
  cursor: pointer;
126
+ padding: 10px 16px;
127
+ transition: 0.3s;
128
+ font-size: 17px;
129
+ color: white;
130
  }
131
 
132
  .tab button:hover {
133
+ background-color: #575757;
134
  }
135
 
 
136
  .tab button.active {
137
  background-color: #444;
138
  }
139
+
140
+ /* Tab content styles */
141
+ .tabcontent {
142
+ display: none;
143
+ padding: 20px;
144
+ margin-top: 70px;
145
+ }
146
+
147
+ /* Responsive design */
148
+ @media (max-width: 768px) {
149
+ .tab {
150
+ flex-direction: column;
151
+ }
152
+ }
153
  </style>
154
  </head>
155
 
156
  <body>
157
+ <!-- Locked Top Bar with Tabs -->
158
+ <div class="top-bar">
159
+ <h2>Capture AI</h2>
160
+ <!-- Navigation Tabs -->
161
  <div class="tab">
162
+ <button class="tablink" onclick="openPage('ImageExtractor', this, '#ff4d00')" id="defaultOpen">Visiting Card Data Extractor</button>
163
+ <button class="tablink" onclick="openPage('ResumeParserExtractor', this, '#ff4d00')">Resume Data Extractor</button>
164
+ </div>
165
+ </div>
166
+ <div class="container">
167
+ <h1>Visiting Card Data Extractor</h1>
168
  <div class="file-upload-section">
169
  <form id="fileUploadForm" action="{{ url_for('upload_file') }}" method="POST" enctype="multipart/form-data">
170
  <input type="file" name="files" multiple class="form-control" required />
 
215
  }
216
  }, 3000);
217
 
218
+ // Function to open links in the same tab
219
+ function openLink(url) {
220
+ window.location.href = url; // Redirects to the specified URL in the same tab
 
221
  // Remove "active" class from all buttons
222
  const buttons = document.querySelectorAll('.tab button');
223
  buttons.forEach(button => button.classList.remove('active'));
 
224
  // Add "active" class to the clicked button
225
  element.classList.add('active');
226
  }