Skip to content

Commit dabd6cf

Browse files
committed
fixed annoucement issue #7
1 parent ec5e5c6 commit dabd6cf

File tree

3 files changed

+23
-125
lines changed

3 files changed

+23
-125
lines changed

assets/css/home.css

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -419,64 +419,4 @@ main{padding-top:72px}
419419
}
420420
.hero-inner{padding:32px 20px}
421421
.logo img{width:48px;height:48px}
422-
}
423-
424-
/* Login modal styles */
425-
.modal{
426-
/* works for both fallback overlay (div) and native <dialog> element */
427-
position:fixed;
428-
inset:0;
429-
display:flex;
430-
align-items:center;
431-
justify-content:center;
432-
background:rgba(2,6,23,0.45);
433-
opacity:0;
434-
pointer-events:none;
435-
transition:opacity 220ms ease;
436-
z-index:1200;
437-
}
438-
.modal.open,
439-
.modal[open]{
440-
/* [open] is the attribute set on <dialog> when shown */
441-
opacity:1;
442-
pointer-events:auto;
443-
}
444-
.modal-dialog{
445-
position:relative;
446-
background:var(--card);
447-
border-radius:12px;
448-
padding:22px;
449-
width:100%;
450-
max-width:420px;
451-
box-shadow:0 20px 40px rgba(2,6,23,0.18);
452-
transform:translateY(0);
453-
}
454-
.modal {
455-
/* Remove default dialog chrome when using <dialog> in supporting browsers */
456-
background: rgba(2,6,23,0.45);
457-
}
458-
dialog.modal{
459-
border: none;
460-
padding: 0;
461-
background: transparent;
462-
}
463-
.modal h3{margin:0 0 12px}
464-
.modal .modal-close{
465-
position:absolute;
466-
top:10px;
467-
right:10px;
468-
background:transparent;
469-
border:0;
470-
font-size:22px;
471-
line-height:1;
472-
cursor:pointer;
473-
}
474-
.login-form label{display:block;margin-bottom:12px;font-size:14px;color:var(--muted)}
475-
.login-form input{width:100%;padding:10px 12px;border-radius:8px;border:1px solid #E6E9EE;font-size:14px;margin-top:6px;background:#fff}
476-
.login-form .form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
477-
.btn-secondary{background:transparent;border:1px solid #E6E9EF;padding:10px 14px;border-radius:8px}
478-
479-
.login-form a {
480-
text-decoration: none !important;
481-
color: inherit;
482-
}
422+
}

assets/js/home.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,3 @@ function toggleAboutDescription() {
1717
}
1818
}
1919

20-
// Carousel functionality
21-
function initCarousel() {
22-
const carousel = document.querySelector('.carousel');
23-
if (!carousel) return;
24-
25-
const slides = carousel.querySelectorAll('.carousel-slide');
26-
const dots = carousel.querySelectorAll('.dot');
27-
let currentSlide = 0;
28-
let autoplayInterval;
29-
30-
function showSlide(index) {
31-
slides.forEach(slide => {
32-
slide.classList.remove('active');
33-
slide.style.transform = '';
34-
});
35-
dots.forEach(dot => {
36-
dot.classList.remove('active');
37-
dot.setAttribute('aria-selected', 'false');
38-
});
39-
40-
slides[index].classList.add('active');
41-
dots[index].classList.add('active');
42-
dots[index].setAttribute('aria-selected', 'true');
43-
currentSlide = index;
44-
}
45-
46-
function nextSlide() {
47-
showSlide((currentSlide + 1) % slides.length);
48-
}
49-
50-
function prevSlide() {
51-
showSlide((currentSlide - 1 + slides.length) % slides.length);
52-
}
53-
54-
function startAutoplay() {
55-
stopAutoplay();
56-
autoplayInterval = setInterval(nextSlide, 5000); // Change slide every 5 seconds
57-
}
58-
59-
function stopAutoplay() {
60-
if (autoplayInterval) {
61-
clearInterval(autoplayInterval);
62-
}
63-
}
64-
}

home.php

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width,initial-scale=1" />
77
<title>Saklaw</title>
8-
9-
<!-- Google Font -->
108
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap" rel="stylesheet">
119
<script src="https://kit.fontawesome.com/f02a36f28e.js" crossorigin="anonymous"></script>
1210
<link rel="stylesheet" href="./assets/css/home.css">
13-
<script src="../Saklaw/assets/js/home.js"></script>
11+
<script src="../Saklaw/assets/js/home.js"></script>
1412
</head>
1513
<body>
1614
<header class="site-header">
@@ -113,7 +111,7 @@
113111
<h2 class="section-title">Announcements</h2>
114112
<div class="carousel">
115113
<div class="carousel-inner">
116-
<a class="carousel-slide">
114+
<a class="carousel-slide active">
117115
<h4>Barangay Clean-Up Drive</h4>
118116
<p>Our scheduled clean-up drive will be on September 20. Join us at 7:00 AM at the community center.</p>
119117
<time datetime="2025-09-20">Sep 20, 2025</time>
@@ -140,6 +138,25 @@
140138
</div>
141139
</div>
142140
</section>
141+
<<script>
142+
const slides = document.querySelectorAll('.carousel-slide');
143+
const dots = document.querySelectorAll('.dot');
144+
let current = 0;
145+
146+
function showSlide(index) {
147+
slides.forEach((slide, i) => slide.classList.toggle('active', i === index));
148+
dots.forEach((dot, i) => dot.classList.toggle('active', i === index));
149+
current = index;
150+
}
151+
152+
// Auto-rotate every 5 seconds
153+
setInterval(() => {
154+
showSlide((current + 1) % slides.length);
155+
}, 5000);
156+
157+
// Dot click navigation
158+
dots.forEach((dot, i) => dot.addEventListener('click', () => showSlide(i)));
159+
</script>
143160
144161
<!--About-->
145162
<section id="about" class="section about-section">
@@ -188,21 +205,7 @@
188205
</div>
189206
</div>
190207
</section>
191-
</main>
192-
193-
<!-- Google AdSense -->
194-
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6318920818085530"
195-
crossorigin="anonymous"></script>
196-
<!-- first-ads -->
197-
<ins class="adsbygoogle"
198-
style="display:block"
199-
data-ad-client="ca-pub-6318920818085530"
200-
data-ad-slot="4856050510"
201-
data-ad-format="auto"
202-
data-full-width-responsive="true"></ins>
203-
<script>
204-
(adsbygoogle = window.adsbygoogle || []).push({});
205-
</script>
208+
</main>
206209
207210
<footer class="site-footer">
208211
<div class="wrap footer-inner">

0 commit comments

Comments
 (0)