|
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | | - <title>Abdurhaman Mechatronics | SBM Expert</title> |
| 6 | + <title>Abdurhaman | SBM & Mechatronics Expert</title> |
7 | 7 | <style> |
8 | 8 | :root { --primary: #39FF14; --bg: #0d1117; --card-bg: #161b22; --text: #c9d1d9; } |
9 | | - body { background-color: var(--bg); color: var(--text); font-family: 'Segoe UI', sans-serif; padding: 15px; margin: 0; line-height: 1.6; } |
| 9 | + body { background-color: var(--bg); color: var(--text); font-family: 'Segoe UI', sans-serif; padding: 15px; margin: 0; } |
10 | 10 | .container { max-width: 800px; margin: auto; } |
11 | | - .card { background-color: var(--card-bg); padding: 20px; border: 1px solid #30363d; border-radius: 12px; margin-bottom: 20px; } |
| 11 | + .card { background-color: var(--card-bg); padding: 20px; border: 1px solid #30363d; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); } |
12 | 12 | h1, h2 { color: var(--primary); text-align: center; } |
13 | 13 | img { width: 100%; border-radius: 12px; border: 2px solid var(--primary); margin-bottom: 20px; } |
14 | | - table { width: 100%; border-collapse: collapse; margin-top: 15px; background: #0d1117; font-size: 14px; } |
15 | | - th, td { padding: 12px; text-align: left; border-bottom: 1px solid #30363d; } |
16 | | - th { color: var(--primary); } |
17 | 14 | input, textarea { width:100%; padding:12px; margin:8px 0; border-radius:8px; border:1px solid #30363d; background:#0d1117; color:white; box-sizing:border-box; } |
18 | 15 | .btn { display: block; width: 100%; padding: 15px; border-radius: 8px; font-weight: bold; text-align: center; cursor: pointer; border: none; font-size: 16px; margin-top: 10px; } |
19 | 16 | .btn-wa { background-color: #25D366; color: white; } |
|
27 | 24 | <div class="container"> |
28 | 25 | <header> |
29 | 26 | <h1>🛠 Abdurhaman Mechatronics</h1> |
30 | | - <p style="text-align:center;">Instrumentation, Control & SBM Machine Expert</p> |
| 27 | + <p style="text-align:center;">8+ Years Experience in SBM & Instrumentation</p> |
31 | 28 | </header> |
32 | 29 |
|
33 | 30 | <img src="Maashiniii.jpg" alt="SBM Machine" onerror="this.src='https://via.placeholder.com/800x400/161b22/39FF14?text=SBM+Machine+Expert'"> |
34 | 31 |
|
35 | 32 | <div class="card"> |
36 | | - <h2>🔍 Spare Parts Search</h2> |
37 | | - <input type="text" id="partSearch" onkeyup="searchParts()" placeholder="Search components (e.g. Motor, Sensor)..."> |
38 | | - <table id="partsTable"> |
39 | | - <thead> |
40 | | - <tr><th>Component</th><th>Task</th><th>Specialty</th></tr> |
41 | | - </thead> |
42 | | - <tbody> |
43 | | - <tr><td>Main Motor (75kW)</td><td>Star-Delta Wiring</td><td>Expert</td></tr> |
44 | | - <tr><td>Sensors & PLC</td><td>Instrumentation</td><td>Advanced</td></tr> |
45 | | - <tr><td>Hydraulic Pump</td><td>Pressure Control</td><td>Specialist</td></tr> |
46 | | - </tbody> |
47 | | - </table> |
| 33 | + <h2>🩺 Professional Tools</h2> |
| 34 | + <button onclick="checkMachineHealth()" class="btn btn-diag">Check Temperature Status</button> |
| 35 | + <button onclick="interpretFault()" class="btn btn-diag" style="background-color: #ff9800;">Interpret Fault Code</button> |
48 | 36 | </div> |
49 | 37 |
|
50 | 38 | <div class="card"> |
51 | | - <h2>🩺 Digital Diagnostics</h2> |
52 | | - <button onclick="checkMachineHealth()" class="btn btn-diag">Check Machine Temp</button> |
53 | | - <button onclick="interpretFault()" class="btn btn-diag" style="background-color: #ff9800; margin-top: 10px;">Interpret Fault Code</button> |
54 | | - </div> |
55 | | - |
56 | | - <div class="card"> |
57 | | - <h2>💳 Payment Details</h2> |
| 39 | + <h2>💳 Service Payment</h2> |
58 | 40 | <div class="payment-box"> |
59 | | - <p>Beneficiary: <strong>Abdurhaman Mohammed</strong></p> |
60 | 41 | <p>CBE: <span class="acc">1000347503707</span></p> |
61 | 42 | <p>Telebirr: <span class="acc">0988535068</span></p> |
| 43 | + <p><em>Payment for Spare Parts & Consultancy</em></p> |
62 | 44 | </div> |
63 | 45 | </div> |
64 | 46 |
|
65 | 47 | <div class="card"> |
66 | | - <h2>👨🔧 Request Service</h2> |
67 | | - <form id="sheetdb-form"> |
| 48 | + <h2>👨🔧 Contact Expert</h2> |
| 49 | + <form id="contactForm"> |
68 | 50 | <input type="text" id="userName" placeholder="Your Name" required> |
69 | | - <textarea id="userMsg" rows="4" placeholder="Describe the machine problem..." required></textarea> |
70 | | - <button type="submit" id="submitBtn" class="btn btn-wa">💬 Send to Excel & WhatsApp</button> |
| 51 | + <textarea id="userMsg" rows="4" placeholder="Describe your machine issue..." required></textarea> |
| 52 | + <button type="submit" class="btn btn-wa">💬 Send Message via WhatsApp</button> |
71 | 53 | </form> |
72 | 54 | </div> |
73 | 55 |
|
74 | | - <footer style="text-align: center; padding: 20px; font-size: 12px; color: #8b949e;"> |
75 | | - © 2026 Abdurhaman Mohammed | Dire Dawa, Ethiopia |
| 56 | + <footer style="text-align: center; color: #8b949e; font-size: 12px; padding: 20px;"> |
| 57 | + © 2026 Abdurhaman Mohammed | Designed by Mechatronics Logic |
76 | 58 | </footer> |
77 | 59 | </div> |
78 | 60 |
|
79 | 61 | <script> |
80 | | - const form = document.getElementById('sheetdb-form'); |
81 | | - form.addEventListener("submit", e => { |
| 62 | + WhatsApp Only Logic (Stable for Mobile) |
| 63 | + document.getElementById('contactForm').addEventListener("submit", e => { |
82 | 64 | e.preventDefault(); |
83 | | - const btn = document.getElementById('submitBtn'); |
84 | | - const nameVal = document.getElementById('userName').value; |
85 | | - const msgVal = document.getElementById('userMsg').value; |
86 | | - |
87 | | - btn.innerText = "Processing... ⏳"; |
88 | | - btn.disabled = true; |
89 | | - |
90 | | - const postData = { |
91 | | - "data": [{ "name": nameVal, "message": msgVal, "date": new Date().toLocaleString() }] |
92 | | - }; |
93 | | - |
94 | | - fetch('https://sheetdb.io/api/v1/49bhx2brvk9r3', { |
95 | | - method : 'POST', |
96 | | - headers: { 'Content-Type': 'application/json' }, |
97 | | - body: JSON.stringify(postData) |
98 | | - }) |
99 | | - .then(res => { |
100 | | - if(res.ok) { |
101 | | - alert("✅ Success! Your request has been saved."); |
102 | | - window.open(`https://wa.me/251904267186?text=Hello Abdurhaman, I am ${nameVal}. Issue: ${msgVal}`, '_blank'); |
103 | | - form.reset(); |
104 | | - } else { |
105 | | - alert("❌ Database Error. Check your SheetDB Row 1 names."); |
106 | | - } |
107 | | - }) |
108 | | - .catch(err => alert("❌ Network Error. Check internet connection.")) |
109 | | - .finally(() => { |
110 | | - btn.innerText = "💬 Send to Excel & WhatsApp"; |
111 | | - btn.disabled = false; |
112 | | - }); |
| 65 | + const name = document.getElementById('userName').value; |
| 66 | + const msg = document.getElementById('userMsg').value; |
| 67 | + const whatsappURL = `https://wa.me/251904267186?text=Hello Abdurhaman, I am ${name}. Issue: ${msg}`; |
| 68 | + window.open(whatsappURL, '_blank'); |
| 69 | + alert("Redirecting to WhatsApp..."); |
113 | 70 | }); |
114 | 71 |
|
115 | | - function searchParts() { |
116 | | - let input = document.getElementById("partSearch").value.toUpperCase(); |
117 | | - let tr = document.getElementById("partsTable").getElementsByTagName("tr"); |
118 | | - for (let i = 1; i < tr.length; i++) { |
119 | | - let td = tr[i].getElementsByTagName("td")[0]; |
120 | | - if (td) tr[i].style.display = td.innerText.toUpperCase().indexOf(input) > -1 ? "" : "none"; |
121 | | - } |
122 | | - } |
123 | | - |
124 | 72 | function checkMachineHealth() { |
125 | 73 | let temp = prompt("Enter Machine Temp (°C):"); |
126 | | - if (temp === null || temp === "") return; |
127 | | - if (parseFloat(temp) > 90) alert("⚠️ DANGER: Overheating! Stop the machine."); |
128 | | - else alert("✅ NORMAL: System is stable."); |
| 74 | + if (temp > 90) alert("⚠️ DANGER: Overheating! Stop the motor immediately."); |
| 75 | + else if (temp > 70) alert("⚡ CAUTION: Temperature rising."); |
| 76 | + else alert("✅ NORMAL: System is running smoothly."); |
129 | 77 | } |
130 | 78 |
|
131 | 79 | function interpretFault() { |
132 | 80 | const faults = {"E01": "Phase Failure", "E02": "High Temp", "E03": "Vibration Alert", "E04": "Oil Pressure Low"}; |
133 | | - let code = prompt("Enter Code (E01-E04):").trim().toUpperCase(); |
134 | | - if (faults[code]) alert("🔍 Diagnosis: " + faults[code]); |
135 | | - else alert("❓ Unknown Code."); |
| 81 | + let code = prompt("Enter Error Code (E01-E04):").trim().toUpperCase(); |
| 82 | + alert(faults[code] ? "🔍 Diagnosis: " + faults[code] : "❓ Code not found in SBM manual."); |
136 | 83 | } |
137 | 84 | </script> |
| 85 | +</body> |
| 86 | +</html> |
138 | 87 |
|
0 commit comments