-
Notifications
You must be signed in to change notification settings - Fork 0
/
mk.html
327 lines (287 loc) · 8.83 KB
/
mk.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Maraba Dairy Farm</title>
<style>
/* CSS styles */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
transition: background-color 0.5s ease;
}
header {
background-color: #4CAF50;
padding: 10px 0;
text-align: center;
}
nav ul {
list-style: none;
padding: 0;
}
nav ul li {
display: inline;
margin: 0 10px;
}
nav ul li a {
color: white;
text-decoration: none;
font-weight: bold;
}
.container {
width: 80%;
margin: 20px auto;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
animation: fadeIn 20s ease-in-out;
}
h1, h2 {
color: #08b30e;
text-align: center;
}
p, ul {
text-align: center;
}
img {
max-width: 100%;
height: auto;
display: block;
margin: 20px auto;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
transition: transform 0.5s ease, box-shadow 0.5s ease;
}
img:hover {
transform: scale(1.05);
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}
.gallery {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.gallery img {
width: 30%;
}
.carousel {
position: relative;
max-width: 100%;
margin: auto;
overflow: hidden;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.carousel img {
width: 100%;
height: auto;
}
.carousel-button {
position: absolute;
top: 50%;
width: 30px;
height: 30px;
background-color: rgba(0, 0, 0, 0.5);
color: white;
border: none;
cursor: pointer;
transform: translateY(-50%);
z-index: 1;
}
.carousel-button.left {
left: 10px;
}
.carousel-button.right {
right: 10px;
}
.info-section {
margin-top: 40px;
padding: 20px;
background-color: #4CAF50;
color: white;
border-radius: 5px;
text-align: center;
animation: slideIn 1s ease-in-out;
}
form {
display: flex;
flex-direction: column;
align-items: center;
}
label {
margin: 10px 0 5px;
}
input, textarea {
width: 80%;
padding: 10px;
margin-bottom: 20px;
border-radius: 5px;
border: 1px solid #ccc;
}
button {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideIn {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
</style>
<script>
// JavaScript for carousel
let currentSlide = 0;
document.addEventListener('DOMContentLoaded', function () {
const slides = document.querySelectorAll('.carousel img');
function showSlide(index) {
slides.forEach((slide, i) => {
slide.style.display = i === index ? 'block' : 'none';
});
}
function nextSlide() {
currentSlide = (currentSlide + 1) % slides.length;
showSlide(currentSlide);
}
function prevSlide() {
currentSlide = (currentSlide - 1 + slides.length) % slides.length;
showSlide(currentSlide);
}
// Initialize the carousel
showSlide(currentSlide);
// Auto-slide functionality
setInterval(nextSlide, 3000); // Change slide every 3 seconds
// Form submission (for contact form)
document.querySelector('form')?.addEventListener('submit', function(event) {
event.preventDefault();
alert('Thank you for your message. We will get back to you soon!');
});
// Assign functions to global scope for button clicks
window.nextSlide = nextSlide;
window.prevSlide = prevSlide;
});
function showPage(pageId) {
const pages = document.querySelectorAll('.container');
pages.forEach(page => {
page.style.display = 'none';
});
document.getElementById(pageId).style.display = 'block';
}
// Show the home page by default
document.addEventListener('DOMContentLoaded', function() {
showPage('home');
});
</script>
</head>
<body>
<header>
<nav>
<ul>
<li><a href="#" onclick="showPage('home')">Home</a></li>
<li><a href="#" onclick="showPage('about')">About</a></li>
<li><a href="#" onclick="showPage('products')">Products</a></li>
<li><a href="#" onclick="showPage('contact')">Contact</a></li>
</ul>
</nav>
</header>
<div id="content">
<div id="home" class="container">
<h1>Welcome to Maraba Dairy Farm</h1>
<p>Explore our beautiful dairy farm through these images:</p>
<div class="carousel">
<button class="carousel-button left" onclick="prevSlide()">❮</button>
<button class="carousel-button right" onclick="nextSlide()">❯</button>
<img src="C:\Users\hp\Downloads\cow.jpg" alt="Cow in the field">
<img src="C:\Users\hp\Downloads\barn.jpg" alt="Barn on the farm" style="display:none;">
<img src="C:\Users\hp\Downloads\feed.jpg" alt="Milking cows" style="display:none;">
</div>
<div class="info-section">
<h2>About Maraba Dairy Farm</h2>
<p>Maraba Dairy Farm is dedicated to providing the highest quality dairy products. Our cows are well-cared for and our farm is maintained to the highest standards. We welcome visitors to come and see our operations firsthand.</p>
</div>
<div class="gallery">
<img src="C:\Users\hp\Downloads\cow.jpg" alt="Cow in the field">
<img src="C:\Users\hp\Downloads\barn.jpg" alt="Barn on the farm">
<img src="C:\Users\hp\Downloads\milking.jpg" alt="Milking cows">
</div>
</div>
<div id="about" class="container" style="display:none;">
<h1>About Us</h1>
<p>Maraba Dairy Farm has been a family-owned business for over 50 years, dedicated to producing high-quality dairy products with sustainable farming practices. Our farm is located in the heart of the countryside, offering the perfect environment for our cows to thrive.</p>
<div class="info-section">
<h2>Our History</h2>
<p>Founded in 1970, Maraba Dairy Farm started as a small farm with just a few cows. Over the years, we have grown into a larger operation while maintaining our commitment to quality and sustainability. Our farm is a testament to the hard work and dedication of our family and team.</p>
</div>
<div class="gallery">
<img src="C:\Users\hp\Downloads\farmhistory.jpg" alt="Farm history image">
<img src="C:\Users\hp\Downloads\family222.jpg" alt="Family running the farm">
<img src="C:\Users\hp\Downloads\practicesss.jpg" alt="Sustainable farming practices">
</div>
</div>
<div id="products" class="container" style="display:none;">
<h1>Our Products</h1>
<p>We offer a wide range of dairy products made with the freshest ingredients. Our commitment to quality ensures that you receive the best products every time.</p>
<div class="info-section">
<h2>Product List</h2>
<ul>
<li>Fresh Milk</li>
<li>Cheese</li>
<li>Yogurt</li>
<li>Butter</li>
<li>Ice Cream</li>
</ul>
</div>
<div class="gallery">
<img src="C:\Users\hp\Downloads\fresh milk.jpg" alt="Fresh Milk">
<img src="C:\Users\hp\Downloads\cheese.jpg" alt="Cheese">
<img src="C:\Users\hp\Downloads\yoghurt.jpg" alt="Yogurt">
</div>
</div>
<div id="contact" class="container" style="display:none;">
<h1>Contact Us</h1>
<p>We'd love to hear from you! Whether you have questions about our products or want to learn more about our farm, feel free to get in touch.</p>
<div class="info-section">
<h2>Contact Information</h2>
<p>Email: <a href="mailto:info@marabadairyfarm.com">info@marabadairyfarm.com</a></p>
<p>Phone: 0759330299</p>
<p>Address: 227 Burnt Forest, Uasin Gishu, Kenya</p>
</div>
<div class="info-section">
<h2>Send Us a Message</h2>
<form action="contact.php" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="message">Message:</label>
<textarea id="message" name="message" required></textarea>
<button type="submit">Submit</button>
</form>
</div>
</div>
</div>
</body>
</html>