commit a3c88cc0236da174715fd0337dd2b8b53116d0c3 Author: Sanju-15 Date: Sun Jan 12 13:35:38 2025 +0545 app completed diff --git a/README.md b/README.md new file mode 100644 index 0000000..a01a3d2 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +## Running application +1. Clone App +``` +git clone https://hackethon.ai/hack/Sanju-15/aquaguardian.git +cd aquaguardian +``` + +2. Run the live server. + +## Github Setup +### Setup account +git config --global user.name "your_username" + +git config --global user.email johndoe@example.com + + +# first time +``` +git init + +git checkout -b main + +git add README.md + +git commit -m "first commit" + +git remote add origin https://hackethon.ai/hack/Sanju-15/aquaguardian.git + +git push -u origin main +``` + +# already existing repo + +1. clone it. +``` +git add . +git commit -m "msg" +git push +``` \ No newline at end of file diff --git a/final.png b/final.png new file mode 100644 index 0000000..d30acb2 Binary files /dev/null and b/final.png differ diff --git a/finalfr.png b/finalfr.png new file mode 100644 index 0000000..475a8a8 Binary files /dev/null and b/finalfr.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..f4fb0df --- /dev/null +++ b/index.html @@ -0,0 +1,111 @@ + + + + + + AquaGuardians + + + + + + +
+
+

Water Conservation Survey

+ Top Left Image +
+
+ +
+ + +
+ + +
+ + +
+ + +
+ 1. General Awareness + + Yes
+ No
+ Not sure
+ + + Yes
+ No
+ Not sure
+ + + Less than 5 liters
+ 5–10 liters
+ 10–20 liters
+ More than 20 liters
+ + + Frequently
+ Occassionaly
+ Rarely
+ Never
+
+ + +
+ 2. Personal Habits + + + Always
+ Sometimes
+ Never
+ + + + Yes
+ No
+ + + Always
+ Sometimes
+ Never
+ + + Low-flow faucets
+ Dual-flush toilets
+ Water-efficient washing machines
+ None
+
+ + +
+ 3. Feedback and Suggestions + + + + + + + + +
+ + + +
+ + +
+

Tips for Water Conservation

+

+
+
+ + + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..f182e6d --- /dev/null +++ b/script.js @@ -0,0 +1,57 @@ +document.getElementById('surveyForm').addEventListener('submit', function(event) { + event.preventDefault(); + + // Collect form data + const formData = new FormData(event.target); + const tips = []; + + // Analyze responses and provide tips + if (formData.get('lackwater') === 'Yes') { + tips.push('Consider monitoring your water usage to identify areas of excess consumption.'); + } + + // Analyze responses and provide tips + if (formData.get('dailyWaterUsage') === 'Less than 50 liters') { + tips.push('You are using less water why bro.'); + } + if (formData.get('householdWater') === 'No') { + tips.push('Start tracking your household water usage with a meter or app.'); + } + + if (formData.get('householdWater') === 'Not Sure') { + tips.push('Start tracking your household water usage with a meter or app.'); + } + if (formData.get('drippingTap') === 'More than 20 liters') { + tips.push('Fix dripping taps promptly to save water.'); + } + if (formData.get('waterwastages') === 'Frequently') { + tips.push('.'); + } + if (formData.get('tapWhileBrushing') === 'Never') { + tips.push('Turn off the tap while brushing to save up to 10 liters of water per day.'); + } + if (formData.get('fixLeaks') === 'No') { + tips.push('Regularly inspect and fix leaks to prevent water wastage.'); + } + if (formData.get('reuseWater') === 'Never') { + tips.push('Reuse greywater from washing vegetables or clothes for gardening.'); + } + if (formData.get('reuseWater') === 'Sometimes') { + tips.push('Try to reuse greywater more frequently.'); + } + if (formData.get('waterAppliances') === 'None') { + tips.push('Invest in water-efficient appliances like low-flow faucets and dual-flush toilets.'); + } + + // Display tips + const tipsContent = document.getElementById('tipsContent'); + const tipsDiv = document.getElementById('tips'); + + if (tips.length > 0) { + tipsContent.innerHTML = tips.map(tip => `
  • ${tip}
  • `).join(''); + tipsDiv.style.display = 'block'; + } else { + tipsContent.innerHTML = '

    Thank you for your responses! You are already making great choices for water conservation.

    '; + tipsDiv.style.display = 'block'; + } +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..bedb23c --- /dev/null +++ b/style.css @@ -0,0 +1,96 @@ +/* body{ + background-image: url(water.jpg); + background-repeat: no-repeat; + background-position: center; + background-attachment: fixed; + background-size:cover; +} */ + +body { + font-family: Arial, sans-serif; + line-height: 1.6; + margin: 0; + padding: 0; + background-color: #6487aa; + color: #ededed; +} +.together{ + display: flex; + align-items: center; + justify-content: center; +} +.container { + max-width: 800px; + margin: 20px auto; + margin-top: 50 px; + /* background: #fff; */ + padding: 20px; + border: 1px solid black; + background-color: rgba(47, 65, 72, 0.23); + box-shadow: inset -5px -5px rgba(0, 0, 0, 0.5); + border-radius: 25px; +} +h1 { + text-align: center; + color: #000202; +} +.form-group { + margin-bottom: 15px; +} +label { + display: block; + margin-bottom: 5px; + font-weight: bold; +} +input[type="text"], input[type="email"], textarea { + width: 65%; + padding: 8px; + /* margin: 20px ; */ + border: none; + outline: none; + border-radius: 20px; + background-color: rgba(0, 0, 0, 0.5); + box-shadow: inset -3px -3px rgba(0, 0, 0, 0.5); + color: white; + font-size:1rem; +} +input[type="radio"] { + margin-right: 10px; +} +textarea { + resize: vertical; + height: 80px; +} +button { + align-items:center; + display: block; + width: 50%; + padding: 10px 20px; + margin: 0 auto; + background-color: rgba(0, 0, 0, 0.5); + box-shadow= inset -3px -3px rgba(0, 0, 0, 0.5); + color: #fff; + border: none; + outline: none; + border-radius: 20px; + font-size:1rem; + cursor: pointer; + font-size: 16px; +} +button:hover { + background-color: #005bb5; +} +#tips { + margin-top: 20px; + padding: 15px; + background-color: #898f90; + border-left: 4px solid #0066cc; + display: none; +} +.top-left-image { + position: static; + top: 0; + left: 0; + width: 150px; + height: auto; +} \ No newline at end of file diff --git a/water.jpg b/water.jpg new file mode 100644 index 0000000..f40131b Binary files /dev/null and b/water.jpg differ