diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..44d4ae0
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,68 @@
+body {
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ background-color: #F8F9FA;
+}
+
+.navbar-brand {
+ font-weight: 600;
+}
+
+.hero {
+ background: linear-gradient(135deg, #0D6EFD, #4D8BF2);
+ color: white;
+ padding: 4rem 0;
+ text-align: center;
+}
+
+.hero h1 {
+ font-weight: 700;
+ font-size: 3rem;
+}
+
+.translation-box {
+ background-color: #FFFFFF;
+ border-radius: 0.5rem;
+ padding: 2rem;
+ box-shadow: 0 4px 12px rgba(0,0,0,0.05);
+}
+
+.form-label {
+ font-weight: 500;
+}
+
+.btn-primary {
+ background-color: #0D6EFD;
+ border-color: #0D6EFD;
+ padding: 0.75rem 1.5rem;
+ font-weight: 500;
+}
+
+.btn-primary:hover {
+ background-color: #0b5ed7;
+ border-color: #0a58ca;
+}
+
+.custom-file-upload {
+ border: 2px dashed #0D6EFD;
+ border-radius: 0.375rem;
+ padding: 2rem;
+ text-align: center;
+ cursor: pointer;
+ background-color: #f8f9fa;
+ transition: background-color 0.2s;
+}
+
+.custom-file-upload:hover {
+ background-color: #e9ecef;
+}
+
+#file-upload-filename {
+ margin-top: 1rem;
+ font-style: italic;
+ color: #6c757d;
+}
+
+#processing-message {
+ display: none;
+ margin-top: 1.5rem;
+}
\ No newline at end of file
diff --git a/assets/js/main.js b/assets/js/main.js
new file mode 100644
index 0000000..029c066
--- /dev/null
+++ b/assets/js/main.js
@@ -0,0 +1,105 @@
+document.addEventListener('DOMContentLoaded', function () {
+ const fileUploadInput = document.getElementById('document-upload');
+ const fileUploadLabel = document.querySelector('.custom-file-upload');
+ const fileNameDisplay = document.getElementById('file-upload-filename');
+ const translateBtn = document.getElementById('translate-btn');
+ const processingMessage = document.getElementById('processing-message');
+
+ // Trigger file input click when the custom upload area is clicked
+ if(fileUploadLabel) {
+ fileUploadLabel.addEventListener('click', () => {
+ if(fileUploadInput) {
+ fileUploadInput.click();
+ }
+ });
+ }
+
+ // Update UI when a file is selected
+ if(fileUploadInput) {
+ fileUploadInput.addEventListener('change', () => {
+ if (fileUploadInput.files.length > 0) {
+ const fileName = fileUploadInput.files[0].name;
+ if(fileNameDisplay) {
+ fileNameDisplay.textContent = `Selected file: ${fileName}`;
+ }
+ if(translateBtn) {
+ translateBtn.disabled = false;
+ }
+ } else {
+ if(fileNameDisplay) {
+ fileNameDisplay.textContent = '';
+ }
+ if(translateBtn) {
+ translateBtn.disabled = true;
+ }
+ }
+ });
+ }
+
+ // Handle form submission
+ const translationForm = document.getElementById('translation-form');
+ if(translationForm) {
+ translationForm.addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ const formData = new FormData();
+ formData.append('document', fileUploadInput.files[0]);
+ formData.append('source-lang', document.getElementById('source-lang').value);
+ formData.append('target-lang', document.getElementById('target-lang').value);
+
+ const responseMessageDiv = document.getElementById('response-message');
+
+ if(processingMessage) {
+ processingMessage.style.display = 'block';
+ }
+ if(responseMessageDiv){
+ responseMessageDiv.innerHTML = '';
+ responseMessageDiv.style.display = 'none';
+ }
+
+ if(translateBtn) {
+ translateBtn.disabled = true;
+ translateBtn.innerHTML = ' Translating...';
+ }
+
+ fetch('upload.php', {
+ method: 'POST',
+ body: formData
+ })
+ .then(response => {
+ if (!response.ok) {
+ throw new Error(`HTTP error! status: ${response.status}`);
+ }
+ return response.json();
+ })
+ .then(data => {
+ if(processingMessage) {
+ processingMessage.style.display = 'none';
+ }
+ if(responseMessageDiv){
+ const alertClass = data.status === 'success' ? 'alert-success' : 'alert-danger';
+ responseMessageDiv.innerHTML = `
${data.message}
`;
+ responseMessageDiv.style.display = 'block';
+ }
+ if(translateBtn) {
+ translateBtn.disabled = false;
+ translateBtn.innerHTML = 'Translate';
+ }
+ })
+ .catch(error => {
+ if(processingMessage) {
+ processingMessage.style.display = 'none';
+ }
+ if(responseMessageDiv){
+ responseMessageDiv.innerHTML = `An error occurred during the upload. Please try again.
`;
+ responseMessageDiv.style.display = 'block';
+ }
+ if(translateBtn) {
+ translateBtn.disabled = false;
+ translateBtn.innerHTML = 'Translate';
+ }
+ console.error('Error:', error);
+ });
+ });
+ }
+});
\ No newline at end of file
diff --git a/index.php b/index.php
index 7205f3d..52d8f2c 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,109 @@
-
-
+
-
-
- New Style
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ easyenglishtranslator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Loading...
+
+
Processing your document... This may take a moment.
+
+
+
+
+
+
+
+
+
+
+
-
+